Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q0901

Question

I would like add some custom headers to selected outgoing mail based on a specific domain and the subject line.

Answer

To the remote_smtp transport, add something like

headers_add = ${if and{\
              {eq{$domain}{spec.dom}}\
              {matches{$h_subject:}{whatever}} }\
              {Content-Type: text/html; charset="us-ascii"} fail }

This example shows a Content-Type: header, but you can have anything you like, and multiple headers can be inserted by using \n to separate them.


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.