I'm trying to play with the postfix after queue. Basically, I want to see if I can modify outgoing email. (I'm not interested at all in incoming email). I did the following (based on http://www.postfix.org/FILTER_README.html) :
- launch ec2 on aws (ubuntu 16.04)
- install postfix
- created filter with user filter
modify the master.cf by adding the -o content_filter=filter:dummy
smtp inet n - y - - smtpd -o content_filter=filter:dummy
add the filter service definition at the end of the master.cf file
filter unix - n n - 10 pipe flags=Rq user=filter null_sender= argv=/home/ubuntu/run_filter.sh -f ${sender} -- ${recipient}
Send email using
echo "hello world" | mail -s "second message" [email protected]
But the filter is not called. And the email is sent without any change.
It seems like I'm missing something very basic. If someone can help, thanks!
echo "hello world" | mail -s "second message" [email protected], what happens in/var/log/mail.log?