Op 18-7-2011 8:29, Marky Yehezkiel[SNC] schreef:

Hi All,

Sorry if I re-posting again, maybe someone has posted this one before.

I am using postfix and want to certain recipient only receive email from outside with certain subject. such as t...@mydomain.com only receive email with subject "test 1" and "test 2"

 Is it possible? If yes does anyone has done it ? and how to do that?

Hi marky,

Do you have a spamfilter running? (I have Spamasassin set up, which could do the trick) You could write a rule (in local.cf) only allowing very speciffic mails and giving all other mails an exptremely high SPAM-score resulting in deletion (do try to prevent auto-spam/ham learning at this point..)

If you are a bit handy with regular expressions, you should get there, here is something that may help (worte this one down as an example, with "!", you'll get the "not", haven't tried that one here, but it should work)
# SPAM TEST_1
header  __TEST_1_1 From =~ /senderfa...@faultydomain.nl/i
header  __TEST_1_2 Subject =~ /A wrong subject/i
body    __TEST_1_3 /Stuff in the boddy you do not want to see/i
meta    LOCAL_TEST_1     ( __TEST_1_1 || (__TEST_1_2 && __TEST_1_3) )
score   LOCAL_TEST_1     99.0
describe        LOCAL_TEST_1     LOCAL_TEST_1

for debugging your local filter use "spamassassin --lint"

Best regards,

Eesger

Reply via email to