Greylisting and Cloud-based mail
Monday, October 17th, 2011
If your running Greylisting on your external mail gateways, and you implement one of the Cloud based e-mails for the another domain or sub-domain, then your mail from the Cloud will experience a delay on reaching those on the internal mail system.
There’s a number of Greylisting solutions out there. This particular solution is based on using (or should I say working around it!) For details on Alun Jones Greylisting module – see http://users.aber.ac.uk/auj/spam/. Typically I’ve implemented this on the Exim mail servers, with a few colleges.
The obviously choice would be to configure all the IP addresses of the Cloud-based mail system to either by-pass Greylisting or add them into the Greylisting IPwhitelist table. However, with the way the Cloud-based mail services work then it’s likely that there are a large number of IP address that could then change a lot.
With this in mind then it’s a good idea to implement something called SPF or Sender Policy Framework (bit much to explain SPF here – read http://openspf.org ) for the Cloud-based mail system. Microsoft seem to recommend it by using an include statement to ref to the SPF record for outlook.com, when implementing Live@Edu. Not sure if Google Mail do?
With this in place then actual workaround is quite simple.
Firstly, you need to make sure Exim has SPF support (exim -bV should confirm). If you don’t then you need to add this. For the Gentoo distribution, then you need to add the ‘spf’ USE flag (either globally in /etc/make.conf or for the package in /etc/portage/package.use). If compiling Exim from source then you need EXPERIMENTAL_SPF=yes in your Local/Makefile.
Secondly, you need the following snip before the Greylisting call in your Exim configure file (or in Gentoo exim.conf)
accept sender_domains = xyz.domain1.ac.uk
spf = pass
Other than a restart of Exim, and some testing and then that’s it. (Exim -bh is of course useful if you don’t want to actually generate some e-mail!)
