OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Debian+Postfix+SPF

From: Alejandro Cabrera Obed (acabrerasintys.gov.ar)
Date: Tue Jan 08 2008 - 07:45:43 CST


Dear all,

I have a mail server with Debian Etch + Postfix 2.3.8 + libmail-spf-query-perl 1.999.

In order to setup SPF, I do the following:

#cp libmail-spf-query-perl /usr/local/sbin/smptd-policy.perl

#chown nobody:root usr/local/sbin/smptd-policy.perl

#chmod 755 usr/local/sbin/smptd-policy.perl

Add in /etc/postfix/master.cf:

policy unix - n n - - spawn
      user=nobody argv=/usr/bin/perl /usr/libexec/postfix/smtpd-policy.pl

In /etc/postfix/main.cf I have:

smtpd_recipient_restrictions =
        check_recipient_access hash:/etc/postfix/access
        permit_mynetworks
        reject_unknown_sender_domain
        reject_unauth_destination
        check_policy_service unix:private/policy

In /etc/spamassassin/init.pre:

# SPF - perform SPF verification.
loadplugin Mail::SpamAssassin::Plugin::SPF

After restart Postfix, I check the /var/log/mail.log file and I see this error:

Jan 8 10:34:00 mail postfix/spawn[10433]: warning: command /usr/bin/perl exit status 2
Jan 8 10:34:00 mail postfix/smtpd[10431]: warning: premature end-of-input on private/policy while reading input attribute name
Jan 8 10:34:01 mail postfix/spawn[10433]: warning: command /usr/bin/perl exit status 2
Jan 8 10:34:01 mail postfix/smtpd[10431]: warning: premature end-of-input on private/policy while reading input attribute name
Jan 8 10:34:01 mail postfix/smtpd[10431]: warning: problem talking to server private/policy: Connection reset by peer

What can I do to use SPF in my mail server ???

And how can I see if SPF is working properly ???

Really thanks

Alejandro