Envoyer un mail en console via mail

Bonjour,

Je suis sous Debian Squueeze 2.6.39.4 sur processeur arm (DreamPlug)
j’ai besoin d’envoyer des mails, mais quand je tape

root@debian:~# echo "Un message de test" | mail -s "sujet de test" monmail@free.fr root@debian:~#
ou

root@debian:~# mail monmail@free.fr Subject: test test . EOT root@debian:~#

Je ne reçois rien dans ma boite mail de Evolution.
Ou donc dois-je spécifier l’adresse du serveur SMTP ?

Merci.

Bonjour.

et ça raconte quoi dans /var/log/syslog et /var/log/mail.log ?

Bonjour,

root@debian:~# cat /var/log/mail.log root@debian:~#

Pour “/var/log/syslog” trop long. mais y a rien dedans concernant mail.

Ou donc dois-je spécifier l’adresse du serveur SMTP ?

Merci

Vas faire un tour sur le wiki, il me semble que c’est évoqué.

bonjour,

Je n’ai pas trouver sur le wiki
wiki.debian.org/PageD%27Accueil? … edirect=fr

Dans “/var/mail/mail” toutes mes mails sont resté.

[code]From MAILER-DAEMON Wed Apr 11 16:16:44 2012
Return-path: <>
Envelope-to: root@debian
Delivery-date: Wed, 11 Apr 2012 16:16:44 +0000
Received: from Debian-exim by debian with local (Exim 4.72)
id 1SI0Ds-0001HR-7A
for root@debian; Wed, 11 Apr 2012 16:16:44 +0000
Date: Wed, 11 Apr 2012 16:16:44 +0000
Message-Id: E1SI0Ds-0001HR-7A@debian
X-Failed-Recipients: xxxxxxx@free.fr
Auto-Submitted: auto-replied
From: Mail Delivery System Mailer-Daemon@debian
To: root@debian
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

xxxxxxx@free.fr
Mailing to remote domains not supported

------ This is a copy of the message, including all the headers. ------

Return-path: root@debian
Received: from root by debian with local (Exim 4.72)
(envelope-from root@debian)
id 1SI0Dr-0001HP-RX
for xxxxxxx@free.fr; Wed, 11 Apr 2012 16:16:43 +0000
Date: Wed, 11 Apr 2012 16:16:43 +0000
From: Asterisk PBX asterisk@debian
To: " client1" < xxxxxxx@free.fr>
Subject: [PBX]: New message 1 in mailbox 11
Message-ID: Asterisk-1-315698888-11-4872@debian
X-Asterisk-CallerID: 12
X-Asterisk-CallerIDName: 12
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----voicemail_11148721693679932"

This is a multi-part message in MIME format.

------voicemail_11148721693679932
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Dear client1:

Just wanted to let you know you were just left a 0:18 long message (number 1)

in mailbox 11 from 12, on Wednesday, April 11, 2012 at 04:16:43 PM so you might
want to check it when you get a chance. Thanks!

			--Asterisk

------voicemail_11148721693679932
Content-Type: audio/x-WAV; name="msg0000.WAV"
Content-Transfer-Encoding: base64
Content-Description: Voicemail sound attachment.
Content-Disposition: attachment; filename=“msg0000.WAV”

UklGRrdyAABXQVZFZm10IBQAAAAxAAEAQB8AAFkGAABBAAAAAgBAAWZhY3QEAAAAwDMCAGRh
aRw1Q4Bkx5UjWaKZ6U1GBrZxLLex7wDGlRtLjjoCOJLtRK6pANaN68aO54mf2pYKgOPGkew2
LmAjx440mUqA5LSRHLlLYCtXcuOonvZlTd4CyJEdt41JATaOHEmuNwRGruS2crQGuJHbSm0=

------voicemail_11148721693679932–

From MAILER-DAEMON Wed Apr 11 16:33:24 2012
Return-path: <>
Envelope-to: root@debian
Delivery-date: Wed, 11 Apr 2012 16:33:24 +0000
Received: from Debian-exim by debian with local (Exim 4.72)
id 1SI0U0-0001MQ-FF
for root@debian; Wed, 11 Apr 2012 16:33:24 +0000
Date: Wed, 11 Apr 2012 16:33:24 +0000
Message-Id: E1SI0U0-0001MQ-FF@debian
X-Failed-Recipients: monmail@free.fr
Auto-Submitted: auto-replied
From: Mail Delivery System Mailer-Daemon@debian
To: root@debian
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

xxxxxxx@free.fr
Mailing to remote domains not supported

------ This is a copy of the message, including all the headers. ------

Return-path: root@debian
Received: from root by debian with local (Exim 4.72)
(envelope-from root@debian)
id 1SI0U0-0001MO-5o
for monmail@free.fr; Wed, 11 Apr 2012 16:33:24 +0000
Date: Wed, 11 Apr 2012 16:33:24 +0000
From: Asterisk PBX asterisk@debian
To: " poste11" < xxxxxxx@free.fr>
Subject: [PBX]: New message 1 in mailbox 11
Message-ID: Asterisk-1-1243724442-11-5180@debian
X-Asterisk-CallerID: 12
X-Asterisk-CallerIDName: 12
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----voicemail_11151801747095940"

This is a multi-part message in MIME format.

------voicemail_11151801747095940
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Dear poste11:

Just wanted to let you know you were just left a 0:24 long message (number 1)

in mailbox 11 from 12, on Wednesday, April 11, 2012 at 04:33:24 PM so you might
want to check it when you get a chance. Thanks!

			--Asterisk

------voicemail_11151801747095940
Content-Type: audio/x-WAV; name="msg0000.WAV"
Content-Transfer-Encoding: base64
Content-Description: Voicemail sound attachment.
Content-Disposition: attachment; filename=“msg0000.WAV”

UklGRpycAABXQVZFZm10IBQAAAAxAAEAQB8AAFkGAABBAAAAAgBAAWZhY3QEAAAAAAIDAGRh
dGFonAAAYTibFoNCgOQ0iuQ2I4DbVm7kRg2AI8mJI7duYNvIcdwUhnRlbekAto0cNZItAMZt
I8dtXQJIThzZaTQA2K0kx41iN13WlgtgWylKIxkHQBpHktt4BIAcuY0kuSZg3EaS3BZ+taVN
7QRGctRIcl8ESJLktnLGBEhuJKlxxQTIcdtKTmE4XRJ1DmDdtm3cKARg4kZu6gZmgGtHcmpL
mdXhTKgE2m2dyUXYAlqa1NitwwI0ifRaTrAGIp4dSyk=

------voicemail_11151801747095940–

From MAILER-DAEMON Wed Apr 11 16:55:19 2012
Return-path: <>
Envelope-to: root@debian
Delivery-date: Wed, 11 Apr 2012 16:55:19 +0000
Received: from Debian-exim by debian with local (Exim 4.72)
id 1SI0pD-0001Mk-SH
for root@debian; Wed, 11 Apr 2012 16:55:19 +0000
Date: Wed, 11 Apr 2012 16:55:19 +0000
Message-Id: E1SI0pD-0001Mk-SH@debian
X-Failed-Recipients: xxxxxxx@free.fr
Auto-Submitted: auto-replied
From: Mail Delivery System Mailer-Daemon@debian
To: root@debian
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

xxxxxxx@free.fr
Mailing to remote domains not supported

------ This is a copy of the message, including all the headers. ------

Return-path: root@debian
Received: from root by debian with local (Exim 4.72)
(envelope-from root@debian)
id 1SI0pD-0001Mi-M8
for xxxxxxx@free.fr; Wed, 11 Apr 2012 16:55:19 +0000
Message-Id: E1SI0pD-0001Mi-M8@debian
Date: Wed, 11 Apr 2012 16:55:19 +0000
To: xxxxxxx@free.fr
Subject: sujet de test
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: root root@debian

Un message de test

From MAILER-DAEMON Wed Apr 11 17:20:37 2012
Return-path: <>
Envelope-to: root@debian
Delivery-date: Wed, 11 Apr 2012 17:20:37 +0000
Received: from Debian-exim by debian with local (Exim 4.72)
id 1SI1Dh-0001N6-D9
for root@debian; Wed, 11 Apr 2012 17:20:37 +0000
Date: Wed, 11 Apr 2012 17:20:37 +0000
Message-Id: E1SI1Dh-0001N6-D9@debian
X-Failed-Recipients: xxxxxxx@free.fr
Auto-Submitted: auto-replied
From: Mail Delivery System Mailer-Daemon@debian
To: root@debian
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

xxxxxxx@free.fr
Mailing to remote domains not supported

------ This is a copy of the message, including all the headers. ------

Return-path: root@debian
Received: from root by debian with local (Exim 4.72)
(envelope-from root@debian)
id 1SI1Dh-0001N4-5q
for xxxxxxx@free.fr; Wed, 11 Apr 2012 17:20:37 +0000
Message-Id: E1SI1Dh-0001N4-5q@debian
Date: Wed, 11 Apr 2012 17:20:37 +0000
To: xxxxxxx@free.fr
Subject: test
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: root root@debian

test[/code]

je ne sais pas de quoi dépend /var/mail/mail niveau config smtp ?

En tout les cas sur un autre pc avec la même commande,

[laurent@localhost ~]$ echo "Un message de test" | mail -s "sujet de test" xxxxxx@free.fr [laurent@localhost ~]$ j’ai reçus ceci dans evolution :

Merci.

il faut configurer ton mailer (exim4) correctement

dpkg-reconfigure exim4-config

et spécifier ton smarthost (le serveur de mail smtp de free)

Je te parlais de NOTRE wiki :
lien sur la barre rouge du haut à DR.