Following the tutorial regarding the setting up of postfix and dovecot just a matter of typing. I skipped Squirelmail and setting up the firewall as the mail server was going to be behind one already. MailScanner, although this should've bee a piece of cake, was giving me some grief. Nearly all of it boiled down to permissions. I knew they were wrong, but I wasn't given any indiction as to what about them was wrong i.e. who was the service running as, what permission did they need and on what file. MailScanner appeared to be working in that it scanned for viruses and then deposited the mail for postfix to process, but that was as far as the mail was getting. After much digging and playing around with configuration files I found out that the owner on /var/spool/postfix/active/random/file was actually root. I don't know what the file is, but it is necessary to deliver your mail, and the owner must be postfix, not root. After fixing that, one of my problems went away. The other problem was with Clamav.
For some reason installing Clamav via yum on CentOS 5 gives you a /etc/clamd.conf file that is slightly different than what you'd expect. The location of the socket that clamd will use is different than in the tutorial and will have to be changed either in /etc/MailScanner/MailScanner.conf or /etc/clamd.conf so they match. The exact part you'll need to change in MailScanner.conf is the Clamd Socket. It defaults to /tmp/clamd.sock, or something like that but in the clamd.conf file it will be in /var/run/clamav/clamd.sock. Go figure.
My Recommendation on this is to follow the tutorial to the letter as far as creating directories goes. If the permissions are at all wrong it will become obvious very quickly and be somewhat difficult to track down.
One thing to note, make sure to get all the perl modules needed before installing MailScanner. If you don't you'll have to look in /var/log/maillog to see which module you're missing and install it before you can go any further. I have little experience with perl but I did learn how to setup and configure cpan as well as install a module from source.
To check your MailScanner installation is setup correctly, and your virus scanners are working, do "MailScanner --lint".
ReplyDeleteTo check your installed Perl modules for MailScanner, do "MailScanner --version".
If you need any more help, feel free to email me at MailScanner@ecs.soton.ac.uk.
I wrote it :-)