Debian – Exim4: How to add or rewrite Reply-to: header in outgoing messages

configurationdebianemail-servereximsmtp-headers

How can I configure exim header rewriting to take care of forgotten Reply-To: headers in emails leaving our company?

We want to have certain Reply-To: headers added to all official
emails leaving the company. E.g. Reply-To: sales@company.example.com,
Reply-To: support@company.example.com, …

A single person might get sick, take a day off, go on a vacation or something like this. The addresses mentioned as example Reply-To: addresses above are aliases which distribute the incoming replies from clients to a group of colleagues in order to make sure that somebody will read and act on them in a timely manner.

I've studied the filter section of the exim documentation but I still feel unable to apply this to my particular problem. A working example would be fine.

Our mail server is debian based and uses the so called split configuration scheme if this matters.

Best Answer

    acl_smtp_rcpt    = acl_rcpt
    begin acl
    acl_rcpt:
      warn   domains = !+local_domains
           condition = ${lookup{$sender_address}lsearch{/path/salesmen.list}{yes}}
       remove_header = Reply-to
          add_header = Reply-to: sales@domain.com

      warn   domains = !+local_domains
           condition = ${lookup{$sender_address}lsearch{/path/servicemen.list}{yes}}
       remove_header = Reply-to
          add_header = Reply-to: support@domain.com
. . . . .

Lists are plaintext files with one email address per line

Related Topic