Re: Postfix header_checks not working: Invalid preceding regular expression

2019-12-09 Thread Simone Marchioni
Il 09/12/19 16:10, Wietse Venema ha scritto: Simone Marchioni: Any idea why with postmap -q it shows REJECT but in real usage it doesn't work? What happens when you do $ LANG=C postmap -q Hint: Postfix daemons run in the C locale, and you may have some UTF8 in your pattern.

Re: Postfix header_checks not working: Invalid preceding regular expression

2019-12-09 Thread Wietse Venema
Simone Marchioni: > Any idea why with postmap -q it shows REJECT but in real usage it > doesn't work? What happens when you do $ LANG=C postmap -q Hint: Postfix daemons run in the C locale, and you may have some UTF8 in your pattern. Wietse

Re: Postfix header_checks not working: Invalid preceding regular expression

2019-12-09 Thread Simone Marchioni
Il 09/12/19 15:34, Dominic Raferd ha scritto: On Mon, 9 Dec 2019 at 14:13, Simone Marchioni > wrote: I have a problem with Postfix. Recently we are receiving mail messages with malformed "From:" headers as these: From: "Name Surname

Re: Postfix header_checks not working: Invalid preceding regular expression

2019-12-09 Thread @lbutlr
On 09 Dec 2019, at 07:12, Simone Marchioni wrote: > I have a problem with Postfix. Recently we are receiving mail messages with > malformed "From:" headers as these: > > From: "Name Surname " > From: "u...@good-domain.com" There is nothing malformed about these headers. -- A closed

Re: Postfix header_checks not working: Invalid preceding regular expression

2019-12-09 Thread Dominic Raferd
On Mon, 9 Dec 2019 at 14:13, Simone Marchioni wrote: > I have a problem with Postfix. Recently we are receiving mail messages > with malformed "From:" headers as these: > > From: "Name Surname " > From: "u...@good-domain.com" > > Ended up with a solution based on PCRE header checks, with these

Postfix header_checks not working: Invalid preceding regular expression

2019-12-09 Thread Simone Marchioni
I have a problem with Postfix. Recently we are receiving mail messages with malformed "From:" headers as these: From: "Name Surname " From: "u...@good-domain.com" Ended up with a solution based on PCRE header checks, with these two regexp: /^From:.+(".+<(.*@+.*)>").*<((?!\2).*)>$/ REJECT

AW: header_checks not working

2015-03-13 Thread Krinninger, Reinhold
Hello, thanks for all the fast(!) and interesting responses. I'm trying to use this proposal, looks for me to be best solution: Simplify... /^From: .*root@itu-smtp2\.br\.de/ WARN /^From: .*@itu-smtp2\.br\.de/ REJECT invalid hostname in From: header /^From: .*\@.*/ WARN /^From: / WARN

header_checks not working

2015-03-12 Thread Krinninger, Reinhold
Hello, i'm trying to stop some spammails with a header_check. The header_check looks for the hostname of our smtp-server in the From:-Line in the headers of incoming mail. I want to reject all Mails with this or similar From: Lines: From: DHL Team

Re: header_checks not working

2015-03-12 Thread Noel Jones
On 3/12/2015 7:31 AM, Krinninger, Reinhold wrote: Hello, i'm trying to stop some spammails with a header_check. The header_check looks for the hostname of our smtp-server in the From:-Line in the headers of incoming mail. I want to reject all Mails with this or similar From: Lines:

Re: header_checks not working

2015-03-12 Thread nicolas
El 2015-03-12 12:31, Krinninger, Reinhold escribió: Hello, i use this header_check: I assume that you're actually using header_checks (ended in **s**) and that your table type is regex: in order this to work. /etc/postfix/header_checks: /^From: (?!.*\root).*\@itmu\-smtp2\.br\.de\/

header_checks not working correctly

2009-12-07 Thread Christopher Adams
I am trying to ban an address from sending through my system. I have this in main.cf: header_checks = regexp:/etc/postfix/header_checks In the header_checks file, I have this: /^From: .*someplace.org/ DISCARD I did a 'postfix reload' Messages from someplace.org are still being delivered.

Re: header_checks not working correctly

2009-12-07 Thread Ansgar Wiechers
On 2009-12-07 Christopher Adams wrote: I am trying to ban an address from sending through my system. I have this in main.cf: header_checks = regexp:/etc/postfix/header_checks In the header_checks file, I have this: /^From: .*someplace.org/ DISCARD I did a 'postfix reload'

Re: header_checks not working correctly

2009-12-07 Thread Sahil Tandon
On Mon, 07 Dec 2009, Christopher Adams wrote: I am trying to ban an address from sending through my system. I have this in main.cf: header_checks = regexp:/etc/postfix/header_checks In the header_checks file, I have this: /^From: .*someplace.org/ DISCARD I did a 'postfix reload'

Re: header_checks not working correctly

2009-12-07 Thread Sahil Tandon
On Tue, 08 Dec 2009, Ansgar Wiechers wrote: On 2009-12-07 Christopher Adams wrote: I am trying to ban an address from sending through my system. I have this in main.cf: header_checks = regexp:/etc/postfix/header_checks In the header_checks file, I have this: /^From:

Re: header_checks not working correctly

2009-12-07 Thread Christopher Adams
Thank you for your helpful reply. So, now I have this in main.cf: smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_blacklist I have a file sender_blacklist: m...@somplace.org/ REJECT I issued the command 'postmap hash:/etc/postfix/sender_blacklist' I

Re: header_checks not working correctly

2009-12-07 Thread Wietse Venema
Christopher Adams: Thank you for your helpful reply. So, now I have this in main.cf: smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_blacklist I have a file sender_blacklist: m...@somplace.org/ REJECT I issued the command 'postmap

Re: header_checks not working correctly

2009-12-07 Thread Christopher Adams
Okay, no more ignorant posts. I will give you all that I have based on the protocol as spelled out. 1. Summary of the problem: attempting to ban an email address using a hash map does not work. The message is delivered anyway. 2. Error messages: none 3. Logging: Maillog shows that the message

Re: header_checks not working correctly

2009-12-07 Thread Daniel V. Reinhardt
From: Christopher Adams adam...@gmail.com To: Postfix users postfix-users@postfix.org Sent: Tue, December 8, 2009 5:00:37 AM Subject: Re: header_checks not working correctly Okay, no more ignorant posts. I will give you all that I have based on the protocol as spelled out. 1. Summary

Re: header_checks not working correctly

2009-12-07 Thread Sahil Tandon
On Mon, 07 Dec 2009, Christopher Adams wrote: Okay, no more ignorant posts. I will give you all that I have based on the protocol as spelled out. 1. Summary of the problem: attempting to ban an email address using a hash map does not work. The message is delivered anyway. Sorry, this is a

Re: header_checks not working correctly

2009-12-07 Thread Christopher Adams
Okay, it is obvious that my approach to getting assistance is all wrong. True, I did not understand the posting protocol, mainly because I don't post often to this list. Yes, I did begin the posting with the subject of header_checks. Some kind fellow gave me some assistance and I attempted to try

Re: header_checks not working correctly

2009-12-07 Thread Daniel V. Reinhardt
From: Christopher Adams adam...@gmail.com To: postfix-users@postfix.org Sent: Tue, December 8, 2009 5:51:13 AM Subject: Re: header_checks not working correctly Okay, it is obvious that my approach to getting assistance is all wrong. True, I did not understand the posting protocol, mainly

Re: header_checks not working correctly

2009-12-07 Thread Sahil Tandon
On Mon, 07 Dec 2009, Christopher Adams wrote: Okay, it is obvious that my approach to getting assistance is all wrong. True, I did not understand the posting protocol, mainly because I don't post often to this list. Yes, I did begin the posting with the subject of header_checks. Some kind