Le 19/07/2011 01:53, Robert Schmid a écrit : > > On Jul 18, 2011, at 5:47 PM, mouss wrote: > >> Le 18/07/2011 21:41, Robert Schmid a écrit : >>> Ever since I discovered wildcard addressing in qmail (recipient delimiters >>> in postfix) I have been using them to identify which companies and >>> organizations sell my address. In each case, if I give my email address to >>> foo.com, I send it myaddr-...@domain.dom. >>> >>> I'd like to have postfix do this checking for me since I've developed a >>> fairly long list of blacklisted recipient addresses now. I want postfix to >>> check the address extension against the domain root and allow or deny >>> accordingly. >>> >> >> you want do what exactly? > > given an email to > > joe-...@example.com > > if sender is from @foo.com then permit > else reject >
if the "to condition" can be organized into few cases, then you can use restriction classes. if it is "fine grain" (individual recipients get different configurations) then you need a policy service or a milter. for the first case, things go something like this: smtpd_recipient_restrictions = policy1 policy2 ... policy1 = check_sender_access cdb:/etc/postfix/cdb/access_sender_policy1 policy2 = check_sender_access cdb:/etc/postfix/cdb/access_sender_policy2 ... smtpd_sender_restrictions = check_recipient_access cdb:/etc/postfix/access_recipient == access_recipient j...@example.com policy1 f...@example.net policy2 == access_sender_policy1 some...@example.org REJECT other@ok.example DUNNO ... > >> >> with an sql table, you can return whatever result you want for a >> joe-...@exampl.com >> >> >>> I know I could do this by writing a script (like greylist.pl) but I was >>> wondering if anyone could identify a built-in solution amongst the many >>> access restrictions and filters provided by postfix. >>> >>> Any ideas? >>> >>> Robert Schmid >> >