Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to have my Postfix server block emails that contain links that are highly likely to be spam - specifically links that contain a format similar to mysite.com.something.dn where the recipient is supposed to be fooled into thinking it's mysite.com when in reality it is something else. i am trying to use a regexp in the body check to do this, but for some reason it is not working. initially, i tried blocking using /.*http:.*?\.(com|org)\./ which worked but found that there were legitimate sites that contained mysite.com.com. As a result, i decided to only block emails that contained a standard root domain but did not end with that actual root domain: /.*http:.*?\.(com|org)\.(?!(com|org)).*/ (any link containing .com or .org not followed by .com or .org. It's primitive, I know, but for my operation it would be effective and i am prepared to take the risk of false positives. Unfortunately, this is not working. I debugged the mail going through and it clearly contained an entry which should have matched but didn't. Does Postfix have the ability to perform a negative lookahead in a regexp?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.