My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

Sender Policy Framework Checking for Exim with Mail::SPF

Nathan Salt -

PROBLEM

I want to use Sender Policy Framework

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version
  • Webmail Only Installations: Version 6.0 > Current Version

CAUSE

SPFQuery binaries are not installed with Atmail natively.

RESOLUTION

When compiled with Exim, the libspf libraries can sometimes cause issues. Sometimes it is best to use the SPFQuery binaries for SPF support.

To use SPFQuery with Exim, just go through the following steps:

- download Mail::SPF from http://search.cpan.org/CPAN/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.006.tar.gz

- untar, install:

% tar xvfz Mail-SPF-v2.006.tar.gz
% cd Mail-SPF-v2.006
% perl Makefile.PL && make && make install

- open the /usr/local/atmail/mailserver/configure file (or where your Exim configuration file is located).

- find this line:

accept  local_parts   = postmaster
domains       = +local_domains

- below this, add:

# SPF Acl clause
warn  set acl_m1  = --ip-address=$sender_host_address  --mfrom=$sender_address --helo=$sender_helo_name
set acl_m1  = ${run{/usr/bin/spfquery $acl_m1}{$value}{fail}}

deny message    = SPF check fail. $sender_host_address is not allowed to send mail from $sender_address_domain.
condition   = ${if eq {$runrc}{1}{1}{0}}

- restart exim:

% killall -HUP exim

- you can also add this line to check for soft failures:

warn message    = SPF check soft fail. Your host is not set as an allowed sender for $sender_address_domain.     condition   = ${if eq {$runrc}{2}{1}{0}}

 

 

Have more questions? Submit a request

Comments