July 13, 2011, 9:18am
Sendmail configuration is tested, and relaying works just fine. But, when leaving a voicemail message, the email is not sent due to the fact that asterisk is not taking info account the “serveremail” I configured.
It always uses
firstname.lastname@example.org in stead of my configured email@example.com
Here the logs:
Jul 13 10:27:06 aster sendmail: p6D8R62l001039: from=asterisk, size=19092, class=0, nrcpts=1, msgid=
Jul 13 10:27:06 aster sm-mta: p6D8R6vF001040: from= firstname.lastname@example.org, size=19218, class=0, nrcpts=1, msgid= Asterisk-11-519344691-user1-784@aster, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul 13 10:27:06 aster sendmail: p6D8R62l001039: to=“user1” email@example.com, ctladdr=asterisk (104/112), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=49092, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p6D8R6vF001040 Message accepted for delivery)
Jul 13 10:27:07 aster sm-mta: p6D8R6vF001040: to= firstname.lastname@example.org, ctladdr= email@example.com (104/112), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=139218, relay=smtp.isp.com [126.96.36.199], dsn=5.6.0, stat=Data format error
Jul 13 10:27:07 aster sm-mta: p6D8R6vF001040: p6D8R7vF001042: DSN: Data format error
Jul 13 10:27:07 aster sm-mta: p6D8R7vF001042: to= firstname.lastname@example.org, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
What am I missing here?
Basicly you need to get your servers hostname correct .
drupal.org/node/1155 has a bit of info. and if you google the error thats in the log
“DSN: Data format error” you will find lots more help and many different ways to fix it
July 13, 2011, 10:10am
Thank you for your message. Indeed I have been looking on the web for a solution and there are indeed a lot of causes for this problem.
The problem is not in my hostname or sendmail configuration.
If I test my sendmail config via “telnet localhost 25” and sending an email from cli, it all works fine and the correct from address is used, I can choose any from address as long as it is on the correct format…
The problem here is that in voicemail.conf I have defined the serveremail in the
email@example.com format, and asterisk is not using it. In stead it is just using from:asterisk.
July 13, 2011, 10:16am
Here a post from someone with the same issue:
My serveremail is also defined under [general] …
Have you set up domain masquerading ?
It is a sendmail config “problem” we have seen it many many times. and normally just use domain masquerading.
July 13, 2011, 11:46am
I have looked into masquerading the from domain, and it didn’t resolve the issue…
I used MASQUERADE_AS( mydomain.com)
It still shows from
July 13, 2011, 12:05pm
Did another test using telnet and, masquerading doesn’t look to be the issue here. Relaying works fine…
Other possible causes?
root@aster:~# telnet localhost 25
Connected to localhost.
Escape character is ‘^]’.
220 aster.home ESMTP Sendmail 8.14.3/8.14.3/Debian-9.1ubuntu1; Wed, 13 Jul 2011 13:51:14 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
250 aster.home Hello localhost [127.0.0.1], pleased to meet you
250 2.1.0 firstname.lastname@example.org… Sender ok
250 2.1.5 email@example.com… Recipient ok
354 Enter mail, end with “.” on a line by itself
250 2.0.0 p6DBpErX001403 Message accepted for delivery
221 2.0.0 aster.home closing connection
Connection closed by foreign host.
root@aster:~# tail /var/log/mail.log
Jul 13 13:52:22 aster sm-mta: p6DBpErX001403: firstname.lastname@example.org, size=5, class=0, nrcpts=1, msgid= 201107131152.p6DBpErX001403@aster.home, proto=SMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jul 13 13:52:22 aster sm-mta: p6DBpErX001403: email@example.com, delay=00:00:06, xdelay=00:00:00, mailer=relay, pri=120005, relay=smtp.skynet.be [188.8.131.52], dsn=2.0.0, stat=Sent (ok: Message 581352252 accepted)
July 13, 2011, 1:22pm
From the docs:
serveremail: Serveremail sets the e-mail address that voicemail-waiting e-mails
should appear to originate from. This value will be used in the ‘From:’ field of the
It is clearly not doing this?