I need to check letter's heading (subject) and if subject doesn't contain
some passphrase check this letter with greylisting or rbl. I can't
understand how can I solve such problem with postfix. My server should check
all smtpd_*_restrictions for SMTP headers, then start to receive data and if
data doesn't contain some passphrase, check smtpd_data_restrictions, in
which I want to add greylisting. So I need some option like
check_policy_service for smtpd_data_restrictions, which will send to
external service not only SMTP headers, but also a letter's body. And then
add to main.cf something like

smtpd_data_restrictions =
  reject_unauth_pipelining
  *check_data??? # What I should place here? *
  check_policy_service inet:localhost:60000  # Greylisting
  reject_rbl_client bl.spamcop.net # RBL

My company has a lot of new clients and my managers should be able to say
some passphrase to client (by phone eg) for passing my spamfilter without
checking RBL and without Greylisting. I can't add clients to whitelist, so
passphrase is the easest solution for my users, but I can't understand how
to implement it with Postfix. In a few words: I need to check data
*before*accepting a letter to be able to reject a letter with SMTP
error code based
on its content. How can I do it with postfix?

Reply via email to