Skip to contentSkip to conversation

post-receive-email: ensure sent messages are not empty

PATCH Kevin P. Fleming 1 participant 1 message Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · Kevin P. Fleming

Changes the logic in the script to determine whether an email message will be sent before invoking the send_mail() function; otherwise, if the logic determines that a message will not be sent, send_mail() will cause an empty email to be sent. In addition, ensures that if multiple refs are updated and a message cannot be sent for one of them, the others are still processed normally.

Just bringing this one back to the list again, since Junio's preparing for a freeze for 1.7.3. Allowing post-receive-email to generate an empty email message can be quite problematic, depending on the MTA in use on the system where the script is run... in our case, it caused the MTA to generate bounce messages which were then delivered to the admin of our corporate MTA, who had no clue what was causing them since they had no content.

Signature · 5 lines
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: [email protected]
Check us out at www.digium.com & www.asterisk.org