On 18 Dec 2019, at 14:22, voroni...@soft-masters.ru wrote:

I have a mail system on Postfix+dovecot+amavisd+spamassassin+clamav. Now there is a task, an easy one, actually, but I still cannot find a solution. I need to change headers in emails according to several rules. For example,

IF (<TO> CONTAINS 'ALIAS_1' AND <TO> CONTAINS 'SOMEONE FROM ALIAS_1')
OR (IF <TO>='ALIAS_1' AND <CC> CONTAINS 'SOMEONE FROM ALIAS_1')
THEN (DELETE 'THIS SOMEONE FROM ALIAS_1' FROM <TO> AND DELIVER TO OTHERS)

or

IF <FROM>=ANYBODY_FROM_ALIAS_1 AND <TO>=ALIAS_1
THEN DELETE 'ONE_EMAIL_ADDRESS_FROM_ALIAS_1' FROM <TO> AND DELIVER TO
OTHERS.

or if such requirements could not be met at least some tool would be nice
that can add another TO_header or remove some for some conditions.

MIMEDefang (www.mimedefang.org) is a Milter which can do anything to a message that you can implement as a Perl snippet. In addition to manipulating messages and their routing, it also has hooks for SpamAssassin and a wide range of AV tools, which are its most common uses.


--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not For Hire (currently)

Reply via email to