INSTALLING

Use the supplied setup.py to install this package:

$ python setup.py build

Gain root priviledges using su or sudo (distribution dependent)

# python setup.py install

You will need to integrate python-policyd-spf with Postfix:

   CONFIGURING POSTFIX

      Add to your postfix master.cf:

         policy-spf  unix  -       n       n       -       -       spawn
            user=nobody argv=/usr/bin/python /usr/bin/policyd-spf

      Next, main.cf must be configured so that "smtpd_sender_restrictions" or
      "smtpd_recipient_restrictions" includes a call to the policy-spf policy 
      filter.  If you already have a "smtpd_sender_restrictions" line(s), you 
      can add the following line anywhere after the line which reads 
      "reject_unauth_destination".

         check_policy_service unix:private/policyd-spf

      WARNING: It's very important that you have
      "reject_unauth_destination" before the "check_policy_service".  If
      you do not, your system may be an open relay.

      So, for example, a minimal "smtpd_sender_restrictions" may look like:

         smtpd_sender_restrictions = \
            reject_unauth_destination, \
            check_policy_service unix:private/policyd-spf

      Please consult the postfix documentation for more information on
      these and other settings you may wish to have in the
      "smtpd_recipient_restrictions" configuration.

     Similar considerations apply to "smtpd_recipient_restrictions".  Since SPF
     checks require external DNS lookups it may be more effecient to place this
     policy check in "smtpd_recipient_restrictions" after invalid recipients 
     have already been rejected.

      You will also need to have a line in the main.cf which reads:

         policy_time_limit = 3600

