# SHORT DESC: Sendmail milter that implements SPF # LONG DESC: SPF Sendmail milter is a lightweight, fast, and reliable Sendmail milter that implements the Sender Policy Framework anti-spam technology with the help of the libSPF2 library. It checks SPF records to make sure that email messages are authorized by the domain name from which it is coming. It has a flexible configuration with options to tag, quarantine, or block the spoofed email messages. It's an alternative for the spfmilter, spf-milter, and milter-spiff milters. # FORCE INCLUDE: /var/run/smfs # COMPILE REQUIREMENT: libspf2 rm -f /etc/mail/smfs/smf-spf.conf # FIXUP: GRR, smf-spf ignores the definition of "USER" in the Makefile sed 's@^#[ \t]*define[ \t][ \t]*USER[ \t].*$@#define USER "mail"@' smf-spf.c > smf-spf.c.new; cat smf-spf.c.new > smf-spf.c # FIXUP: Do not provide verbose information during SPF failures, especially links to external sites sed 's@"Rejected, look [^"]*"@"Requested action not taken: mailbox unavailable (SPF)"@' smf-spf.c > smf-spf.c.new; cat smf-spf.c.new > smf-spf.c make USER=mail GROUP=mail PREFIX=/usr # Install ## Install socket directory mkdir -p /var/run/smfs chmod 700 /var/run/smfs chown mail:mail /var/run/smfs touch /var/run/smfs/placeholder ## Install configuration mkdir -p /etc/mail/smfs/ cp smf-spf.conf /etc/mail/smfs/ chmod 644 /etc/mail/smfs/smf-spf.conf chmod 755 /etc/mail/smfs chown root:root /etc/mail/smfs /etc/mail/smfs/smf-spf.conf ## Install binary cp smf-spf /usr/sbin/ chown root:root /usr/sbin/smf-spf chmod 755 /usr/sbin/smf-spf ## Install SysV init script mkdir -p /etc/rc.d/init.d/ cat init/smfspf.slackware | sed "s@^[ \t]*/usr/local/sbin/smf-spf[ \t]*\$@ chown mail:mail /var/run/smfs\n /usr/sbin/smf-spf@;s@/usr/local/sbin/@/usr/sbin/@" > /etc/rc.d/init.d/smfspf chmod 755 /etc/rc.d/init.d/smfspf chown root:root /etc/rc.d/init.d/smfspf # Done exit 0 |