I am currently managing an email server that is being handled by Exim 4.85 This server currently adds a footer to all outgoing messages. The line that adds this functionality can be found on several guides:
transport_filter=/usr/bin/altermime --input=- --disclaimer=/etc/exim_footer --disclaimer-html=/etc/exim_footer_html
However, it is now necessary to keep certain outgoing emails as they were originally. The advantage is that this has to be done for a single email address, namely [email protected]
, and all of these emails will be text-only (ie no HTML).
Example:
[email protected] sends email ===> exim adds footer ===> delivered
[email protected] sends email =========================> delivered
I figured I could make use of the string expansion capabilities and make altermime
use a blank file for that but it has been a nightmare so far. I have basically been getting
Expansion of [...] failed: condition name expected, but found ""
and
transport filter process failed (127): unable to execute command
What bothers me, is that testing the expansion via the exim -bem
command returns the desired output.
These are just a few of my failed attempts:
transport_filter=/usr/bin/altermime --input=- --disclaimer='${if eq {$sender_address}{[email protected]}{/etc/exim_footer}{/etc/empty_file}}'
transport_filter=/usr/bin/altermime --input=- --disclaimer=${if eq {$sender_address}{[email protected]}{/etc/empty_file}{/etc/exim_footer}} --disclaimer-html=/etc/exim_footer_html
transport_filter={${if eq {$sender_address}{[email protected]}{/etc/empty_file}{/usr/bin/altermime --input=- --disclaimer=/etc/exim_footer --disclaimer-html=/etc/exim_footer_html}}}
Any ideas on how to do this?