Article 5MBV9 regex help - postfix spam

regex help - postfix spam

by
compused
from LinuxQuestions.org on (#5MBV9)
hi
why won't this regex work, as inserted into /etc/postfix/header_checks :
Code:/^From.*\.(?!(net|com|edu|gov|org)).*$/ DISCARDie block all emails *not* from .net, from .com, from .edu?

running a postmap -q test shows that .com is DISCARDed, though I can't work out why:
Code:postmap -q 'From: john.smith@icloud.com' pcre:/etc/postfix/header_test
DISCARDthanks
Compfusedlatest?d=yIl2AUoC8zA latest?i=2LEoeBpIW4E:d7UG-kSdJBA:F7zBnMy latest?i=2LEoeBpIW4E:d7UG-kSdJBA:V_sGLiP latest?d=qj6IDK7rITs latest?i=2LEoeBpIW4E:d7UG-kSdJBA:gIN9vFw2LEoeBpIW4E
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments