[P-U] Correct way to disable sender_canonical

2023-03-08 Thread SysAdmin EM via Postfix-users
I am administering a Postfix that uses sender_canonicals to do a rewrite of the header from but I need to disable that option. I have commented the sender_canonical file but when reloading the configuration I try to send an email and the service fails. #sender_canonical_maps = regexp:/etc/postfix

[pfx] Sender Caninical Condition

2023-03-10 Thread SysAdmin EM via Postfix-users
Good days, request help, is it possible to use conditions in the sender_canonical file? we are migrating an entire system and some customers do not have our SPF added. I would like to add a condition for you to rewrite the from when it does not match a condition. Example, If the from is not doma

[pfx] Re: Sender Caninical Condition

2023-03-10 Thread SysAdmin EM via Postfix-users
I’ve created the next rule but I don’t know if it’s works. !if !/^(.*)@(domainclient1.com|domainclient2.com|domainclient3.com)$/ nore...@mydomain.com endif At the moment there are only domains that have our spf, as there are many domains that do not have our spf, I want to create a rule to rewrit

[pfx] header_checks not work with regexp

2023-04-14 Thread SysAdmin EM via Postfix-users
Sorry for such a basic question but I couldn’t find a solution on my part. I’m trying to block a Subject using header_checks but it’s not working. This is my rule: /^Subject:.*Invalid HTTP_HOST header.*/ DISCARD SUBJECTALERT I used postmap to test the rule but not match. postmap -q "[KIS] ERROR

[pfx] Re: header_checks not work with regexp

2023-04-14 Thread SysAdmin EM via Postfix-users
RAL any ideas?? On Fri, Apr 14, 2023 at 3:50 PM Viktor Dukhovni via Postfix-users < postfix-users@postfix.org> wrote: > On Fri, Apr 14, 2023 at 03:31:17PM -0300, SysAdmin EM via Postfix-users > wrote: > > > Sorry for such a basic question but I couldn’t find a solution o

[pfx] Re: header_checks not work with regexp

2023-04-17 Thread SysAdmin EM via Postfix-users
Hello everyone the problem persists. Maybe I’m doing something wrong. Step 1, I add the rule in the /etc/postfix/header_checks file /^Subject:.*You may need to add/ DISCARD TMP_BLOCK Step 2, postmap /etc/postfix/header_checks and postfix surcharge. Are these steps correct? Could the problem oc

[pfx] Block based on subject and rcpt to

2023-08-14 Thread SysAdmin EM via Postfix-users
Hi, Is it possible to discard an email based on the Subject and the destination email address? I try this and not work: /^Subject:.*Test email subject .*To:.*m...@me.com/ DISCARD Any helps? ___ Postfix-users mailing list -- postfix-users@postfix.org To