Has anyone seen this? My voicemail-to-e-mail stopped working at some point a week or two ago and I can find no reasoning.
I can leave voicemail and retrieve it; I can see the WAV file created in the spool directory. I can even see in the debug messages where it’s supposed to be sending:
[2021-12-13 09:33:52] DEBUG[C-00000591]: app_voicemail.c:4682 last_message_index: /var/spool/asterisk/voicemail/default/1101/INBOX map = 1, count = 1
[2021-12-13 09:33:52] DEBUG[C-00000591]: app_voicemail.c:5591 sendmail: Attaching file '/var/spool/asterisk/voicemail/default/1101/INBOX/msg0001', format 'wav', uservm is '2048', global is 2048
[2021-12-13 09:33:52] DEBUG[C-00000591]: app_voicemail.c:5454 make_email_file: creating attachment filename msg0001.wav, no second attachment.
[2021-12-13 09:33:52] DEBUG[C-00000591]: app_voicemail.c:5602 sendmail: Sent mail to [email protected] with command '/usr/sbin/sendmail -t'
[2021-12-13 09:33:52] DEBUG[C-00000591]: app_voicemail.c:8160 queue_mwi_event: Queueing event for mailbox [email protected] New: 2 Old: 1
it claims to send the message using sendmail -t, but /var/log/mail.log has no sign of it, nor does the mail.err file.
Sending mail from the commandline using the
sendmail command works fine.
What ver of asterisk? I’m not seeing an issue with 16.20.0.
I found the messages. There are a bunch of
astmail-* files in
/tmp and if I do
sendmail -t < astmail-xx it will send the message to me.
But this is what asterisk is supposed to be doing, so I am unsure how to debug further.
@lgaetz Asterisk 16.2.1~dfsg-1+deb10u2 (the version packaged for Debian 10)
Are you running sendmail or postfix on the fpbx server? Likewise, do you have access to a destination that runs postfix? Postfix has pretty good log files. Other MTAs maybe equally helpful, but I am familiar with postfix and have seen these things a couple of times in the past.
Edit: this is probably my fault. I see a change I made to the system on the day before this stopped working. It looks like it should have nothing to do with calling “sendmail” but it definitely broke it.
I’ve seen a couple of times that the destination was changed, or the receiving MTA suddenly had stricter rules. Usually adding a proper generic map solved the problem. On the other hand, suggesting that without having seen the log file doesn’t make sense.
The funny thing is there is nothing in the postfix logs at all for these messages, which made it hard to figure out.
It’s not a deliverability problem, it’s a problem with calling the
sendmail command. (
sendmail runs and returns 0 for success even though it fails to do anything)
The TL;DR is that I “poisoned” Asterisk’s environment and this must be why the call out to sendmail is broken (sendmail probably doesn’t like this)…
The details are found on this page: Tls - VoIPmonitor.org
I think as a workaround I just need to set “mailcmd” in the voicemail.conf file and use some other mailer.
It’s a simple system() call with the hard coded sendmail path /usr/sbin/sendmail -t. If tail -f does not react, you have a problem. If something has changed the access rights of some files and dirs on the system, you have indeed poisoned your system…
Got it worked out… thanks for the assist.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.