Voicemail notification: Blank lines between recipient and subject

I have a brand new FreePBX installation (Incredible PBX 2020) and am configuring email notifications. I have a virtual extension that callers reach through an IVR that needs to send a notification email.

I have customized the email subject and body in voicemail config and the email is being sent, but there are two blank lines in the header between the recipient (To:) line and the subject line. When I look at the raw message that comes out the other side, I see this:

--- email routing headers here ---
From: Voicemail Notification <[email protected]>
To: IVR Voice Mail <[email protected]>
--- blank line ---
--- blank line ---
Subject: New voicemail from 12125551212

The blank lines after the “To:” line cause the mail server to think that the header has ended, so the “Subject” line shows up as the body. The real message body doesn’t come through because the blank lines that should be between the subject and body cause sendmail to think that is the end of the message. I expect the problem with the body will be resolved if I can get rid of the extraneous blank lines before the “Subject:” line.

Here is what I see in voicemail.conf:

emailsubject=New voicemail from ${VM_CIDNUM}
emailbody=There is a new voicemail from ${VM_CIDNUM}.\nLength: ${VM_DUR} seconds
fromstring=Voicemail Notification

I have searched through configuration files and can’t find what is causing these two blank lines. How do I fix this?

Is there a custom script handling the voicemail email notifications? What is the output (if any) of:

grep mailcmd /etc/asterisk/voicemail.conf

I haven’t customized voicemail notifications. Here is the grep result:


You may not have, but someone has. If you comment out that line by putting a semi-colon in front of it, and the do a reload with fwconsole r test another vm->email to see if the issue persists. If that resolves it, then the problem is in that script.

That fixed it. I’m smarter now. Thank you!

I’ll head over to the Incredible PBX forum and report the issue.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.