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