/etc/postfix/master.cf
redirect2admin unix - n n - - pipe
flags=F user=www-data argv=/bin/bash /etc/postfix/redirect2admin.bash
/etc/postfix/main.cf
header_checks = pcre:/etc/postfix/header_checks
smtpd_sender_restrictions = check_sender_access pcre:/etc/postfix/check_sender_access
/etc/postfix/header_checks
if /^From:/
/@domain1.com\b/ DUNNO
/@domain2.com\b/ DUNNO
/@/ FILTER redirect2admin:redirect2admin
endif
/etc/postfix/check_sender_access
/@domain1.com$/ OK
/@domain2.com$/ OK
/@/ FILTER redirect2admin:redirect2admin