On 12/18/2019 1:22 PM, 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.

For example in EXIM MTA it can be done with exim.filter, smth like:

|if FROM contains A then deliver to B,C,D|

and so on.

I have lurked through http://www.postfix.org/addon.html

but could not find anything useful there.

Header_checks internal feature of Postfix has limitations that make it useless in my case, IMHO.

Any help would be most appreciated!



Try milter-regex.




Reply via email to