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 /opt/zimbra/conf/salocal.cf (from zcs-NETWORK-5.0.15_GA_2851.UBUNTU8_64)

# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
# rewrite_header Subject *****SPAM*****
# report_safe 1
# trusted_networks 212.17.35.
# lock_method flock

header DSPAM_SPAM X-DSPAM-Result =~ /^Spam$/
describe DSPAM_SPAM DSPAM claims it is spam
score DSPAM_SPAM 1.5

header DSPAM_HAM X-DSPAM-Result =~ /^Innocent$/
describe DSPAM_HAM DSPAM claims it is ham
score DSPAM_HAM -0.5

trusted_networks 192.168.1/28, 127.0.0.1/32
lock_method flock

rewrite_header Subject *SPAM* _STARS(*)_
bayes_auto_learn 1
bayes_min_spam_num 60
bayes_min_ham_num 60
clear_headers
add_header spam Flag _YESNOCAPS_
add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
add_header all Level _STARS(*)_
add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_

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