On Mon, Jun 01, 2015 at 11:56:18PM +0000, Daniel Miller wrote: > Is there a way of removing return-receipt requests from internal senders > for a particular external recipient? ?Or does this require a separate > tool/script to pass sent messages through?
This requires a content-filter. Return receipts (MDN not DSN) are requested via the "Disposition-Notification-To" header. This would have to be removed for particular senders only, and mere built-in header checks don't easily do that. However, you can use a policy service to arrange for an extra hop through a Postfix smtpd/cleanup where the removal of the header is unconditional. main.cf: smtpd_sender_restrictions = check_policy_service inet:127.0.0.1:12345 nonmdn_header_checks = pcre:${config_diretory}/nonmdn_header.pcre master.cf: 127.0.0.1:2525 inet ... smtpd -o cleanup_service_name=nonmdn-cleanup -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_relay_restrictions=permit_mynetworks,reject -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= -o smtpd_end_of_data_restrictions= nonmdn-cleanup unix ... cleanup -o header_checks=$nonmdn_header_checks nonmdn_header.pcre: /^disposition-notification-to:/ IGNORE The policy service has to return "FILTER smtp:[127.0.0.1]:2525" when the sender recipient pair matches your needs. -- Viktor.