Voicemail to email not delivered


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 asterisk@aster.home in stead of my configured serveremail=asterisk@somedomain.com

Here the logs:

Jul 13 10:27:06 aster sendmail[1039]: p6D8R62l001039: from=asterisk, size=19092, class=0, nrcpts=1, msgid=Asterisk-11-519344691-user1-784@aster, relay=asterisk@localhost
Jul 13 10:27:06 aster sm-mta[1040]: p6D8R6vF001040: from=asterisk@aster.home, size=19218, class=0, nrcpts=1, msgid=Asterisk-11-519344691-user1-784@aster, proto=ESMTP, daemon=MTA-v4, relay=localhost []
Jul 13 10:27:06 aster sendmail[1039]: p6D8R62l001039: to=“user1” user1@somedomain.com, ctladdr=asterisk (104/112), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=49092, relay=[] [], dsn=2.0.0, stat=Sent (p6D8R6vF001040 Message accepted for delivery)
Jul 13 10:27:07 aster sm-mta[1042]: p6D8R6vF001040: to=user1@somedomain.com, ctladdr=asterisk@aster.home (104/112), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=139218, relay=smtp.isp.com [], dsn=5.6.0, stat=Data format error
Jul 13 10:27:07 aster sm-mta[1042]: p6D8R6vF001040: p6D8R7vF001042: DSN: Data format error
Jul 13 10:27:07 aster sm-mta[1042]: p6D8R7vF001042: to=asterisk@aster.home, 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


Hi Ian,

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 user@server.xxx format, and asterisk is not using it. In stead it is just using from:asterisk.


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.


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 asterisk@aster.home


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
Trying ::1…
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 []
HELO test.be
250 aster.home Hello localhost [], pleased to meet you
MAIL FROM:voicemail@mydomain.com
250 2.1.0 voicemail@mydomain.com… Sender ok
RCPT TO:someone@anotherdomain.com
250 2.1.5 someone@anotherdomain.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[1403]: p6DBpErX001403: from=voicemail@mydomain.com, size=5, class=0, nrcpts=1, msgid=201107131152.p6DBpErX001403@aster.home, proto=SMTP, daemon=MTA-v4, relay=localhost []
Jul 13 13:52:22 aster sm-mta[1406]: p6DBpErX001403: to=someone@anotherdomain.com, delay=00:00:06, xdelay=00:00:00, mailer=relay, pri=120005, relay=smtp.skynet.be [], dsn=2.0.0, stat=Sent (ok: Message 581352252 accepted)

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?