SPF

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Ubuntu 8.04

apt-get install libmail-spf-query-perl:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libnet-cidr-lite-perl libnet-dns-perl libnet-ip-perl libsys-hostname-long-perl
The following NEW packages will be installed:
  libmail-spf-query-perl libnet-cidr-lite-perl libnet-dns-perl libnet-ip-perl libsys-hostname-long-perl
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 388kB of archives.
After this operation, 1430kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com hardy/universe libsys-hostname-long-perl 1.4-1 [11.1kB]
Get:2 http://us.archive.ubuntu.com hardy/universe libnet-ip-perl 1.25-2 [30.3kB]
Get:3 http://us.archive.ubuntu.com hardy/universe libnet-dns-perl 0.63-1 [261kB]
Get:4 http://us.archive.ubuntu.com hardy/universe libnet-cidr-lite-perl 0.20-1 [13.6kB]                                                                               
Get:5 http://us.archive.ubuntu.com hardy/universe libmail-spf-query-perl 1:1.999.1-3 [71.7kB]                                                                         
Fetched 388kB in 16s (23.7kB/s)                                                                                                                                       
Selecting previously deselected package libsys-hostname-long-perl.
(Reading database ... 46646 files and directories currently installed.)
Unpacking libsys-hostname-long-perl (from .../libsys-hostname-long-perl_1.4-1_all.deb) ...
Selecting previously deselected package libnet-ip-perl.
Unpacking libnet-ip-perl (from .../libnet-ip-perl_1.25-2_all.deb) ...
Selecting previously deselected package libnet-dns-perl.
Unpacking libnet-dns-perl (from .../libnet-dns-perl_0.63-1_amd64.deb) ...
Selecting previously deselected package libnet-cidr-lite-perl.
Unpacking libnet-cidr-lite-perl (from .../libnet-cidr-lite-perl_0.20-1_all.deb) ...
Selecting previously deselected package libmail-spf-query-perl.
Unpacking libmail-spf-query-perl (from .../libmail-spf-query-perl_1%3a1.999.1-3_all.deb) ...
Setting up libsys-hostname-long-perl (1.4-1) ...
Setting up libnet-ip-perl (1.25-2) ...
Setting up libnet-dns-perl (0.63-1) ...
Setting up libnet-cidr-lite-perl (0.20-1) ...
Setting up libmail-spf-query-perl (1:1.999.1-3) ...

Edit spamassassin config at /opt/zimbra/conf/spamassassin/local.cf and add something like this (customize it on your own):

ok_languages en es 
ok_locales en es 
trusted_networks 127. 10.70. 192.168.
use_bayes 1
skip_rbl_checks 0
dns_available yes 

## Optional Score Increases 
## Choose your preferred values...
score DCC_CHECK 4.000
score SPF_FAIL 10.000  
score SPF_HELO_FAIL 10.000
score BAYES_99 4.300
score BAYES_90 3.500
score BAYES_80 3.000
bayes_ignore_header Received: from mail3.example.com
bayes_ignore_header Received: from localhost
bayes_ignore_header Received: from mail1.example.com
bayes_ignore_header Received: from mail2.example.com

sample local.cf (from zimbra-5.015

# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
###########################################################################

#   Add *****SPAM***** to the Subject header of spam e-mails
#
# rewrite_header Subject *****SPAM*****


#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1


#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
#
# trusted_networks 212.17.35.


#   Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock


#   Set the threshold at which a message is considered spam (default: 5.0)
#
# required_score 5.0


#   Use Bayesian classifier (default: 1)
#
# use_bayes 1


#   Bayesian classifier auto-learning (default: 1)
#
# bayes_auto_learn 1


#   Set headers which may provide inappropriate cues to the Bayesian
#   classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status

References

http://wiki.zimbra.com/index.php?title=Improving_Anti-spam_system#SPF

http://wiki.zimbra.com/index.php?title=Ajcody-MTA-Postfix-Topics#What.27s_Your_SPF_Records_Say.2C_When_Getting_.22does_not_designate_74.x.x.x_as_permitted_sender_Errors.22

https://www.zimbra.com/forums/installation/10480-spf-question.html

Jump to: navigation, search