Re: Dovecot Sieve and Postfix header_checks Issue
"Klaipedaville on Google" klaipedaville@gmail.com writes:
However, my header_checks file has just 5 lines of regexp as follows: ... /^From:.*\@.*\.tw/ REJECT Sorry, Taiwanese mail is not allowed.
Can't speak about the other issues you are having, but is this regexp pattern what you want? Unless Postfix PCRE automatically right-anchors these regexps, aren't you rejecting mail from someone@mail.twinpeaks.org, or even twitter notifications (from *@bounce.twitter.com).
Joseph Tam jtam.home@gmail.com
Joseph Tam writes:
However, my header_checks file has just 5 lines of regexp as follows: ... /^From:.*\@.*\.tw/ REJECT Sorry, Taiwanese mail is not allowed.
Can't speak about the other issues you are having, but is this regexp pattern what you want? Unless Postfix PCRE automatically right-anchors these regexps, aren't you rejecting mail from someone@mail.twinpeaks.org, or even twitter notifications (from *@bounce.twitter.com). I am not sure I even understand what you were trying to say. It's either because you have no idea how to write any regexp / pcre rules or I did not understand your wording. The rule means: / means a regular expression. Any regular expression is enclosed in forward slashes. For example /Josepsh/ is already the simplest rule in regexp and pcre. ^ it is called caret and indicates the beginning of a line / expression From: is the field I refer to . means any character
- matches zero or any number of occurrences of the previous character \ it's called escape that treats any character after it as a regular character (item), not regexp tw means two letters at the end of an email address for example mail@example.tw What it basically does it blocks any email address that ends on .tw Plus, if you refer to the post I wrote it clearly says that running the following on your command line postmap –q "From: mail@example.tw” regexp:/etc/postfix/header_checks will tell you if the rule is correct or not. This is a bullet / fool proof method. The file called header_checks has to exist of course and it has to contain the rule mentioned above. Plus, I also said in my post that regexp were not the problem in my case at all as it literally takes only 5 seconds and has a couple of dozen various methods to check if the rules are correct or not despite the fact that they come from "stone age" computing like I do myself as well. Honestly speaking it was funny to see how so many people started picking on regexpes in the first place without actually having any clear understanding about how they work.
On 27/09/14 11:49, Klaipedaville on Google wrote:
Joseph Tam writes:
However, my header_checks file has just 5 lines of regexp as follows: ... /^From:.*\@.*\.tw/ REJECT Sorry, Taiwanese mail is not allowed.
Can't speak about the other issues you are having, but is this regexp pattern what you want? Unless Postfix PCRE automatically right-anchors these regexps, aren't you rejecting mail from someone@mail.twinpeaks.org, or even twitter notifications (from *@bounce.twitter.com). I am not sure I even understand what you were trying to say. It's either because you have no idea how to write any regexp / pcre rules
I don't understand why you seem to think there is some kind of magical interaction between postfix and dovecot. Once postfix passes to the Dovecot LDA that's the end of its responsibility. Likewise dovecot has no inside knowledge of that Postfix does.
Certainly in grep that /would/ match ,eg, foo@bar.twister.com because as Joseph said the .tw is not anchored to the end of the pattern. Now whether this applies in headerchecks is not for this list.
if it was
^From:.*\@.*\.tw$
it would not.
And again according to the man page, $ is usable:
"/^(.*)-outgoing@(.*)$/"
You seem to think that you are the worlds greatest regexp expert and to be frank it comes off as a bit arrogant.
Alex
Alex: if it was
^From:.*\@.*\.tw$ it would not. $ is optional and it only means the end of expression, the rule works either with or without it in the problem I was trying to solve.
And again according to the man page, $ is usable:
"/^(.*)-outgoing@(.*)$/"
This is again an option ($), not a must, the rule would be valid either way.
You seem to think that you are the worlds greatest regexp expert and to be frank it comes off as a bit arrogant. Alex
I am not the world greatest regexp expert but definitely not the worst one. My rules work the way I want and need them to work. Period. I have neither time no desire to prove that 2+2=4. I will not clutter this list speaking off Dovecot issues any more as I feel sorry for time wasted for list readers
Am 27.09.2014 um 15:16 schrieb Klaipedaville on Google:
Alex: if it was
^From:.*\@.*\.tw$ it would not. $ is optional and it only means the end of expression, the rule works either with or without it in the problem I was trying to solve.
And again according to the man page, $ is usable:
"/^(.*)-outgoing@(.*)$/"
This is again an option ($), not a must, the rule would be valid either way.
you are a ignorant fool
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.tw" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.twitter" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ cat /home/harry/Desktop/bla.cf /^From:.*\@.*\.tw/ REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.tw" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.twitter" regexp:/home/harry/Desktop/bla.cf
[root@srv-rhsoft:~]$ cat /home/harry/Desktop/bla.cf /^From:.*\@.*\.tw$/ REJECT
You seem to think that you are the worlds greatest regexp expert and to be frank it comes off as a bit arrogant.
knowledge often comes arrogant to ignorant people
I am not the world greatest regexp expert but definitely not the worst one
you are the worst one because you argue instead realize your error
My rules work the way I want and need them to work. Period.
no they don't damned
I have neither time no desire to prove that 2+2=4
no, but you telling us it's 5
I will not clutter this list speaking off Dovecot issues any more as I feel sorry for time wasted for list readers
please do so
Wasnt that productive?
I'm hoping the hubris will lead to some self-realisation later but I doubt it.
Also felt like he was testing us, posting regexes for us to look at and then when we pointed out the errors in them suddenly declaring they were deliberate errors for testing!
Alex
On 27/09/14 14:28, Reindl Harald wrote:
Am 27.09.2014 um 15:16 schrieb Klaipedaville on Google:
Alex: if it was
^From:.*\@.*\.tw$ it would not. $ is optional and it only means the end of expression, the rule works either with or without it in the problem I was trying to solve.
And again according to the man page, $ is usable: "/^(.*)-outgoing@(.*)$/" This is again an option ($), not a must, the rule would be valid either way. you are a ignorant fool
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.tw" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.twitter" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ cat /home/harry/Desktop/bla.cf /^From:.*\@.*\.tw/ REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.tw" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.twitter" regexp:/home/harry/Desktop/bla.cf
[root@srv-rhsoft:~]$ cat /home/harry/Desktop/bla.cf /^From:.*\@.*\.tw$/ REJECT
You seem to think that you are the worlds greatest regexp expert and to be frank it comes off as a bit arrogant. knowledge often comes arrogant to ignorant people
I am not the world greatest regexp expert but definitely not the worst one you are the worst one because you argue instead realize your error
My rules work the way I want and need them to work. Period. no they don't damned
I have neither time no desire to prove that 2+2=4 no, but you telling us it's 5
I will not clutter this list speaking off Dovecot issues any more as I feel sorry for time wasted for list readers please do so
Am 27.09.2014 um 15:34 schrieb Alex Crow:
Wasnt that productive?
i would call it funny :-)
I'm hoping the hubris will lead to some self-realisation later but I doubt it
forget it
Also felt like he was testing us, posting regexes for us to look at and then when we pointed out the errors in them suddenly declaring they were deliberate errors for testing!
i doubt
looking at the subject mixing two complete different layers of a mail system points out clueless from the very beginning and every time i say the truth which is "do not run a mailserver without qualification and real understanding" i am the bad ass everywhere
such people are responsible for a lot of spam out there because filter out customer-ranges with potential zombies is easy, but mailservers maintained by people lacking the knowledge how to verify that the configuration does what they think is hard
there are two ways to run a mailserver
- knowing what you are doing
- don't do it
On 27/09/14 14:28, Reindl Harald wrote:
Am 27.09.2014 um 15:16 schrieb Klaipedaville on Google:
Alex: if it was
^From:.*\@.*\.tw$ it would not. $ is optional and it only means the end of expression, the rule works either with or without it in the problem I was trying to solve.
And again according to the man page, $ is usable: "/^(.*)-outgoing@(.*)$/" This is again an option ($), not a must, the rule would be valid either way. you are a ignorant fool
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.tw" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.twitter" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ cat /home/harry/Desktop/bla.cf /^From:.*\@.*\.tw/ REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.tw" regexp:/home/harry/Desktop/bla.cf REJECT
[root@srv-rhsoft:~]$ postmap -q "From: bla@bla.twitter" regexp:/home/harry/Desktop/bla.cf
[root@srv-rhsoft:~]$ cat /home/harry/Desktop/bla.cf /^From:.*\@.*\.tw$/ REJECT
You seem to think that you are the worlds greatest regexp expert and to be frank it comes off as a bit arrogant. knowledge often comes arrogant to ignorant people
I am not the world greatest regexp expert but definitely not the worst one you are the worst one because you argue instead realize your error
My rules work the way I want and need them to work. Period. no they don't damned
I have neither time no desire to prove that 2+2=4 no, but you telling us it's 5
I will not clutter this list speaking off Dovecot issues any more as I feel sorry for time wasted for list readers please do so
Am 27.09.2014 um 12:49 schrieb Klaipedaville on Google:
Joseph Tam writes:
However, my header_checks file has just 5 lines of regexp as follows: ... /^From:.*\@.*\.tw/ REJECT Sorry, Taiwanese mail is not allowed.
Can't speak about the other issues you are having, but is this regexp pattern what you want? Unless Postfix PCRE automatically right-anchors these regexps, aren't you rejecting mail from someone@mail.twinpeaks.org, or even twitter notifications (from *@bounce.twitter.com)
I am not sure I even understand what you were trying to say. It's either because you have no idea how to write any regexp
the only one having no clue are you (bseides wrong mailing-list)
/^From:.*\@.*\.tw/ is bullshit and matches twitter.com and so on /^From:.*\@.*\.tw$/ at least would make sure it *ends with* tw
frankly your rule matchs *anything* having a @ and .tw
participants (4)
-
Alex Crow
-
Joseph Tam
-
Klaipedaville on Google
-
Reindl Harald