On 09/26/10 05:24, Michal Bruncko wrote: > Hello list > > I am using postfix (v 2.7.0) with sender policy framework > (postfix-policyd-spf-perl-2.001) and greylisting (postgrey-1.32) with > following configuration: > > smtpd_recipient_restrictions = > ... > check_policy_service unix:private/policy > check_policy_service unix:/var/spool/postfix/postgrey/socket > ... > > where unix:private/policy is SPF socket and followed by greylist rule. > > It is possible in some way to configure postfix, that SPF Passed mails > will be automatically accepted with postfix without greylisting? And > using greylist only for mails with other SPF result codes (none, > softfail,..)? > Current configuration only denies mails with SPF Fail and all other > mails where being greylisted. > > thanks > > michal >
It's probably best to leave things alone as Stan pointed out, but if you really want to do this, you'd have to modify the postfix-policyd-spf-perl code. A policy server can return any action allowed in an access(5) table. So, for example, you could modify (taken from the latest release): if ($helo_result->is_code('fail')) { syslog(info => "%s: SPF %s: HELO/EHLO: %s", $attr->{queue_id}, $helo_result, $attr->{helo_name} ); return "550 $helo_authority_exp"; } ... if ($mfrom_result->is_code('fail')) { return "550 $mfrom_authority_exp"; } to return either the greylist restriction or the name of a restriction class.