Skip to content

Instantly share code, notes, and snippets.

@marcelog
Created May 8, 2016 14:15
Show Gist options
  • Save marcelog/e4846851608abf5c7be893a089c27b94 to your computer and use it in GitHub Desktop.
Save marcelog/e4846851608abf5c7be893a089c27b94 to your computer and use it in GitHub Desktop.
Part of: http://marcelog.github.io/articles/configure_postfix_forward_email_regex_subject_transport_relay.html Setting up the header_checks file in Postfix so we can route emails based on the subject
/^[sS]ubject:.*Confirmation*/ FILTER smtp:smtp.arelay.com
/^[sS]ubject:.*Reminder*/ FILTER smtp:smtp.arelay.com
@djadk84
Copy link

djadk84 commented Oct 4, 2017

@marcelog
Hi, I'm trying to do almost the same thing but I'm getting an error could you please help me out
/^X-SMTPAPI:/ FILTER smtp:smtp.gateway1.com
/^X-RESEND:/ FILTER smtp:smtp.gateway2.com

Oct 4 14:21:09 teserver1 postfix/smtpd[39165]: master_notify: status 1
Oct 4 14:21:09 teserver1 postfix/smtpd[39165]: connection closed
Oct 4 14:21:10 teserver1 postfix/qmgr[39103]: warning: private/smtp socket: malformed response
Oct 4 14:21:10 teserver1 postfix/qmgr[39103]: warning: transport smtp failure -- see a previous warning/fata
l/panic logfile record for the problem description
Oct 4 14:21:10 teserver1 postfix/master[39101]: warning: process /usr/pkg/libexec/postfix/smtp pid 39170 kil
led by signal 6
Oct 4 14:21:10 teserver1 postfix/master[39101]: warning: /usr/pkg/libexec/postfix/smtp: bad command startup
-- throttling
Oct 4 14:21:10 teserver1 postfix/error[39171]: C03CBB79C5: to=[email protected], relay=n
one, delay=1.4, delays=0.3/1.1/0/0.02, dsn=4.3.0, status=deferred (unknown mail transport error)
Oct 4 14:21:13 teserver1 postfix/smtpd[39165]: proxymap stream disconnect
Oct 4 14:21:13 teserver1 postfix/smtpd[39165]: auto_clnt_close: disconnect private/tlsmgr stream
Oct 4 14:21:13 teserver1 postfix/smtpd[39165]: rewrite stream disconnect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment