MailScanner with Exim
Raymond Dijkxhoorn
raymond at PROLOCATION.NET
Wed Sep 3 23:07:15 IST 2003
Hi!
> I recently changed from MailScanner/Sendmail to MailScanner/Exim. The
> whole process was really straightforward thanks to the installation
> guide for MS/Exim. Everything is working fine but I have noticed a very
> large number of files building up in /var/spool/exim.in/msglog. Each
> one contains a single log entry for the reception of the message
> referenced by the filename.
>
> Is it usual for these files to be produced? If so, how are others
> dealing with them - cron job to delete them every day?
I wrote a little HOW-TO a few days ago, wil submit it on the website
also. What you need it in there also, have a look:
HOW-TO migrate from Sendmail to Exim with a MailScanner setup.
23 August 2003.
By Raymond Dijkxhoorn, Prolocation.
raymond at prolocation.net / www.prolocation.net
This dokument can be used as guideline when you want to migrate
from Sendmail to Exim but allready have MailScanner installed.
Its a guideline for a RPM installed box, but most likely pretty
easy to follow for other installations also.
Download the latest Exim 4.x package from ftp.exim.org. The one
we used was the RPM install, but the package itselfs is pretty
simple to build. Version used when making this dokument was Exim 4.22
Stop your running MailScanner setup. Make sure cron isnt restarting it.
service MailScanner stop
(service crond stop)
Install the Exim RPMs
rpm -Uvh exim-4.22-1_10.rh9.i386.rpm
exim-perl-4.22-1_10.rh9.i386.rpm
Now we need to change the MailScanner.conf, these are the changed we did:
Run As User = exim
Run As Group = exim
Incoming Queue Dir = /var/spool/exim.in/input
Outgoing Queue Dir = /var/spool/exim/input
MTA = exim
Sendmail = /usr/sbin/exim
Sendmail2 = /usr/sbin/exim
These are about the changes you need, be sure to check the split spool
settings.
Now make the needed dirs:
mkdir /var/spool/exim.in
mkdir /var/spool/exim.in/input
Link the exim msglog dirs so the msglog mechanism exim uses wont break.
ln -s /var/spool/exim/msglog /var/spool/exim.in/msglog
On busy systems you could disable the use of the msglog dirs, this will
save
on disk io. You can do this in your exim config
no_message_logs
Alter the rights of the dir so exim can write
chown exim.exim /var/spool/exim.in -R
The next part is for people who also installed SpamAssasin, we had SA
running
with Pyzor, Razor and DCC installed. Since exim is running as user exim,
and
the test also are executed as exim you have to 'save' your old settings.
Move the old dirs to /var/spool/exim, the exim homedirectory...
.pyzor
.razor
.spamassassin
Chown them to exim.exim, and you are set. If you had the bayes files
elsewhere
then dont forget to chown those also to exim.exim.
There is a nice install dokument on the MailScanner Exim install, so for
that part,
goto: http://www.sng.ecs.soton.ac.uk/mailscanner/install/exim.shtml
We used the 'One Exim configuration file' part of that dokument.
Dont forget the crontab for Exim that cycles the logs and cleans up the
hints databases, also mentioned on the same page.
YOu now only need to configure exim with your site specific settings.
The config file is located in /etc/exim
When migrating from sendmail you most likely had a relay-domains file
and a mailertable file, you can simple use this to replace that within
exim.
domainlist relay_to_domains = /etc/exim/relay-domains
mailertable_router:
driver = manualroute
domains = ! +local_domains
route_data = ${lookup{$domain}lsearch{/etc/exim/mailertable}}
transport = remote_smtp
You need to alter the format of the files a little, exim takes the list
like <domain> <host> for the mailertable, the relay-domains i had
unchanged
After you are done with the exim config you should not forget to change
/etc/sysconfig/mailscanner
You also have to tell there you switched over to exim. My config is called
exim4.conf so i changed that also in that same file.
You might need to remove the MS lock files in /tmp, they are most likely
having the wrong owners also. Just delete them, MS will recreate them.
Thats about it.
You can now have a try and startup MailScanner again, with your fresh Exim
installation.
service MailScanner start
(service crond start)
If you have things like MailScanner-MRTG installed, look carefully if that
wont break anything.
Good luck migrating.
Bye,
Raymond.
More information about the MailScanner
mailing list