HowTo: MailScanner 4.24 for Exim 4.24

i did have the same on RH9:

Good. You have the patch command.

Your /usr/src/redhat, /usr/src/RPM or /usr/src/packages
tree is missing.
If you have access to an RPM called rpm-build
install it first and come back and try again.
 
ProWebUK said:
try the following

Stop mailscanner

# pico -w /etc/init.d/MailScanner

ctrl & w

enter 'sendmail.in.pid'

replace sendmail.in.pid with sendmail.pid

*start* mailscanner

This may work, it may not.

Chris

Just wondering, exim calls it's pid file exim.pid, so why not use that one instead of sendmail ?
We aren't really using the sendmail service while using exim, so why use it's pid file for MailScanner ?
 
Have no idea where or why I thought of that... in another thread which is basically the same problem i gave the soloution:

in /etc/rc.d/init.d/MailScanner you need to replace the lines:

INPID=/var/run/sendmail.in.pid
OUTPID=/var/run/sendmail.out.pid

Will modify my post to match that in a moment
 
I did a
Code:
locate sendmail | grep -v webmin | grep -v php
On two servers, but didn't find anything relevant.
I must admit, on one of the servers the Exim installation isn't perfect, but shouldn't those pid files be there when Exim is running ?
Or is there indeed something wrong with the names ?
 
Sendmail should not be installed.... which is why the sendmail.*.pid files should *not* exist....

why i said to replace sendmail.*.pid files with sendmail.pid, I honestly have no idea!
 
In my system, I only get the errors when shutting down MailScanner.

When I launch it I got no error and I can see sendmail.out.pid in # ps aux | grep sendmail
 
check /var/run for any other sendmail PID files..... should be there if you have sendmail, although if you read the DirectAdmin installation page it suggests you remove it if you have it before the installation and it is not on the installation list.

Chris
 
I have no sendmail.pid in /var/run
but I have this :

/usr/lib/sendmail
/usr/sbin/sendmail

even though I have not install any sendmail rpm.

ps aux gives me this:
mail 20492 0.0 0.0 6232 380 ? S Dec22 0:00 /usr/sbin/sendmail -q15m -OPidFile=/var/run/sendmail.out.pid
mail 15647 0.0 0.0 6228 376 ? S Dec22 0:00 /usr/sbin/sendmail -q15m -OPidFile=/var/run/sendmail.out.pid
mail 25219 0.0 0.2 6236 1240 ? S 00:42 0:00 /usr/sbin/sendmail -q15m -OPidFile=/var/run/sendmail.out.pid

Would that mean that I have to change my /etc/rc.d/init.d/MailScanner ?

My problem is that emails are being scanned, so I'm a bit puzzled....
 
I had the same problem with the pid files, even after editing /etc/rc.d/init.d/MailScanner

After looking further into it i found that there is another file in /etc/sysconfig.

What i have done is:

# service MailScanner stop
# vi /etc/sysconfig/MailScanner

Edited the folowing lines:

#
# Sendmail Settings
#
#INPID=/var/run/exim.pid
#OUTPID=/var/run/exim.pid

Saved the file.

# service MailScanner start

And that was the end of the errors.

It now scans incoming mail, and places the X-orgname-MailScanner tags in the headers.
 
I've modified the howto to use exim exclusively.

This requires more changes to be made.

I've also found out that we shouldn't start exim manually. Mailscanner is starting the two deamons for us. In order to avoid conflicts at boot time, we should type:
#chkconfig exim off

To start mailscanner after the latest changes, use this:
#service MailScanner stop
#service exim stop
#killall exim
#killall sendmail
#service MailScanner start

Now...
The main problem seems to come from DA. If we restart exim from the cp, we won't restart Mailscanner. If someone knows where to change this, let me know.
 
interfasys said:
I've modified the howto to use exim exclusively.

This requires more changes to be made.

I've also found out that we shouldn't start exim manually. Mailscanner is starting the two deamons for us. In order to avoid conflicts at boot time, we should type:
#chkconfig exim off

To start mailscanner after the latest changes, use this:
#service MailScanner stop
#service exim stop
#killall exim
#killall sendmail
#service MailScanner start

Now...
The main problem seems to come from DA. If we restart exim from the cp, we won't restart Mailscanner. If someone knows where to change this, let me know.

You may also want to remove sendmail from boot if you have it

chkconfig --del sendmail

and if you want you may also add mailscanner to replace that :)

chkconfig --level 2345 MailScanner on

followed then by your start command after installing:

service MailScanner start

Chris
 
From what I've seen,
chkconfig --del sendmail
shouldn't be necessary since we don't have sendmail installed (DA removes it at install time).
Sendmail only appears in the list of deamons when using the old MailScanner.conf

chkconfig --level 2345 MailScanner on
shouldn't be necessary since this is already done by the installation script ;)

As always...I could be wrong ;)
 
To check if sendmail is there just run

chkconfig --list

If it is, remove it else your ok :)

you can also check if mailscanner is there and if not add it using the command above.

Chris
 
Hello there, I have followed the how to, everything seems to be running properly but I still get mails with attached viruses.
In the header, I have :

X-Priority: 3
X-MSMail-Priority: Normal
Message-Id: <[email protected]>
X-behostings.be-MailScanner: Found to be infected, Found to be clean
X-Mail-Format-Warning: Bad RFC2822 header formatting in This is a multi-part message in MIME format.
X-Spam-Status: No, hits=1.8 required=5.0
tests=MISSING_MIMEOLE,NO_REAL_NAME,PRIORITY_NO_NAME
version=2.55
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
X-behostings.be-MailScanner-Information: Please contact the ISP for more information
Subject: {Filename?}



What do I have to do to have this kind of email directly deleted by MailScanner ?
 
Last edited:
Ill probably test it within the next day or two if you have that time to wait.

Chris
 
# pico -w /etc/sysconfig/MailScanner

MTA=exim
EXIM=/usr/sbin/exim
EXIMINCF=/etc/exim.conf # Incoming configuration file
EXIMSENDCF=/etc/exim_outgoing.conf # Outgoing configuration file
What is this on a FreeBSD system? There is no /etc/sysconfig/MailScanner on FreeBSD.
 
Back
Top