Preprocess outgoing email bodies with a linux smtp server/proxy?
Posted
by
jdc0589
on Server Fault
See other posts from Server Fault
or by jdc0589
Published on 2010-12-29T05:53:35Z
Indexed on
2010/12/29
16:55 UTC
Read the original article
Hit count: 224
I have an smtp server running locally on my server, and need to edit the contents of email bodies before they actually get sent out. I have tried using EmailRelay to proxy my smtp server with the --filter option to specify a filter/editing executable, but am getting some odd behavior.
Currently, I specify an executable shell script as the filter program and all it is supposed to do is append some text to a log file and return 0 so I know it actually got called. The weird thing is the email gets sent but nothing shows up in my log file like it should (but it does when I run the script manualy). If I remove the 'exit 0' statement, the email does not send like I would expect.
Are there any other options/suggestions?
© Server Fault or respective owner