A set of useful header/content processing filters for postfix written in ruby.
piped filter configuration in master.cf
:
filter_reply_to unix - n n - 10 pipe flags=Rq user=filter null_sender= argv=/usr/local/share/postfix-filters/filter_reply_to.rb ${sender} ${recipient}
conditional filter execution in header_checks:
/^To: distribution-list@foo.bar/ FILTER filter_reply_to:dummy
NOTE
For the FILTER
action valid destination is required, since the filter takes care
of delivering the mail using sendmail, therefore it is set to a dummy
value.
run postfix reload
to reload the configuration
cat testmail | ruby ./filter_reply_to.rb sender@foo.com recipient@foo.com
- The specs currently require ruby 1.9
- sendmail must be in the PATH or fully qualified