Skip to main content
added 5 characters in body
Source Link

You should be able to do this without a custom transport, using built-in header checks.

Add to main.cf:

header_checks = pcre:/etc/postfix/rewrite_headers

Your rewrite_headers file will have the existing rule wrapped in a conditional:

if /^To: [email protected]$/i
/^Subject: (.+)$/i REPLACE Subject: [Example tag] $1
endif

This should handle everything without the need for a transport config.

You should be able to do this without a custom transport, using built-in header checks.

Add to main.cf:

header_checks = /etc/postfix/rewrite_headers

Your rewrite_headers file will have the existing rule wrapped in a conditional:

if /^To: [email protected]$/i
/^Subject: (.+)$/i REPLACE Subject: [Example tag] $1
endif

This should handle everything without the need for a transport config.

You should be able to do this without a custom transport, using built-in header checks.

Add to main.cf:

header_checks = pcre:/etc/postfix/rewrite_headers

Your rewrite_headers file will have the existing rule wrapped in a conditional:

if /^To: [email protected]$/i
/^Subject: (.+)$/i REPLACE Subject: [Example tag] $1
endif

This should handle everything without the need for a transport config.

Source Link

You should be able to do this without a custom transport, using built-in header checks.

Add to main.cf:

header_checks = /etc/postfix/rewrite_headers

Your rewrite_headers file will have the existing rule wrapped in a conditional:

if /^To: [email protected]$/i
/^Subject: (.+)$/i REPLACE Subject: [Example tag] $1
endif

This should handle everything without the need for a transport config.