![]() |
|||||||||||||||||||||||||||||||||||||||||||||||
Syndicate Categories Archives
Other Blogs
![]() |
Thu, 15 Jul 2004
Making your Backup MX do recipient verification with Exim...
Well, in response to Kevin and Pascal's posts regarding backup MX's, I decided to actually do something about mine... My backup MX does backup for my domain, as well as for a few friends and acquaintances. One such acquaintance happens to get one hell of a lot of spam traffic to his domain, which is directed at the backup MX... Me. He also happens to have recipient verification turned on. So, I end up with a gazillion messages in the queue on my backup MX. So, I found a solution FOR EXIM *3* which gives the backup MX the ability to do recipient verification, without needing some static list of recipients available for a domain. For those that want to do the same, here's the instructions. To start with, you need an exim with the embedded perl interpreter, which isn't available with woody's exim. Source build time. Commands:
Edit src/EDITME, and uncomment the line: EXIM_PERL=perl.o
Right, now we have an exim package installed with the embedded perl interpreter enabled. Second up, we need to make a few changes to exim.conf, so that we can do verification on domains we relay for. Here's a list:
That's exim done. Now we just need to create the perl script that'll do the job for us. From above, create /etc/exim/relay_verify.pl with the following:
The Code should be fairly self explanatory - in effect, if we can get a reply from the Primary MX for a domain we're relaying for to either fail or defer an arbitrary address, we pass that on to the system contacting the backup MX. If we get no reply in 10 seconds, we just accept the mail, since that's what a backup MX is supposed to do. Setting the Debug option to 1 in the arguments to the Net::SMTP constructor, and using exim's -bh option, you can do some testing to see that this is working. (e.g.: exim -bh <some remote IP> ) [0]: I use files to list the domains my mailservers use, so I have things like:
[04:52] [/Hacking] [permanent link] Mon, 12 Jul 2004This week I'm being subjected to an M$ Training course - "Implementing and Managing Microsoft(R) Exchange Server 2003 (2400BC)". Mainly as a backup, so I've got some knowledge about how it will be talking to the core campus mail servers, and how to make any changes that are needed. The primary Exchange admin is here too... Anyway, to cut a long story short, I cannot work out what I find is the most absurd thing about this "course" - I'm not sure if it's the sickeningly sweet way everything about exchange is presented as if it's the answer to everything, or if it's the way that the trainer is showing us all these neat little things that you can do with Windows to make administration easier... Things that you could do in *nix years ago. Anyway, I'm still coming to terms with this point and click thing... [02:21] [/Work] [permanent link] |
||||||||||||||||||||||||||||||||||||||||||||||