Start/Stop script for mailScanner
Will Merkens
willm at merkens.ca
Tue Jun 15 22:41:49 IST 2010
On 12:59 PM, Stephen Swaney wrote:
> Will,
>
> some observations are below.
>
> On Jun 13, 2010, at 8:50 AM, Will Merkens wrote:
>
>> System:
>>
>> MailScanner 4.80.1
>> Sendmail 8.14.3
>>
>> I am finding a issue with the /etc/init.d/MailScanner start/stop
>> script as it is not seem to be stopping sendmail.
>>
>>
>
> Is sendmail still being started by the systems default init script?
> The MailScanner script should be used to start sendmail, NOT the
> systems default script.
>
> You can see if this is the porblem:
>
> 1. Stop MailScanner using the MailScanner init script
> 2. Kill any sendmail processes that are still running
> 3. Start MailScanner using the MailScanner init script
>
> If MailScanner starts working, this was the problem.
>
> You don't say what OS you are using but from the location of the
> MailScanner start script, But it looks like it might be Red Hat,
> CentOS od som other similar Linux variant. If so these commands might
> also help.
>
> To see if the systems sendmail init script is configured "on", run:
>
> chkconfig sendmail --list
>
> This should return
>
> sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off
>
> Anything else is a problem.
>
> To turn off the systems sendmail init script run:
>
> chkconfig sendmail off
>
> I hope this helps,
>
> Steve
> --
> Steve Swaney
> steve at fsl.com <mailto:steve at fsl.com>
> www.fsl.com
> The most accurate and cost effective anti-spam solutions available
>
Yes I made sure that any service related to MailScanner including
sendmail were in a none startup at any runlevel state.
MailScanner 0:off 1:off 2:on 3:on 4:on 5:on 6:off
7:off
clamav-milter 0:off 1:off 2:off 3:off 4:off 5:off 6:off
7:off
clamd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
7:off
freshclam 0:off 1:off 2:off 3:off 4:off 5:off 6:off
7:off
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off
7:off
spamd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
7:off
so the ps ax shows this before I issue a stop
[root at gateway ~]# ps ax | grep send
2251 pts/5 R+ 0:00 grep --color send
2765 ? Ss 0:05 sendmail: accepting
connections
2769 ? Ss 0:00 sendmail: Queue runner at 00:15:00 for
/var/spool/clientmqueue
2775 ? Ss 0:00 sendmail: Queue runner at 00:15:00 for
/var/spool/mqueue
[root at gateway ~]# ps ax | grep Mail
2258 pts/5 R+ 0:00 grep --color Mail
2820 ? Ss 0:00 MailScanner: starting child
16646 ? S 0:02 MailScanner: waiting for messages
22250 ? S 0:02 MailScanner: waiting for messages
23869 ? S 0:02 MailScanner: waiting for messages
26508 ? S 0:02 MailScanner: waiting for messages
32443 ? S 0:02 MailScanner: waiting for messages
Now issue the stop
[root at gateway ~]# service MailScanner stop
Shutting down MailScanner daemons:
MailScanner:
[ OK ]
incoming
[ OK ]
outgoing
[ OK ]
ps ax for sendmail
root at gateway ~]# ps ax | grep send
2706 pts/5 R+ 0:00 grep --color send
2769 ? Ss 0:00 sendmail: Queue runner at 00:15:00 for
/var/spool/clientmqueue
still running
issue a start
Starting MailScanner daemons:
incoming [
OK ]
outgoing [
OK ]
MailScanner: [
OK ]
ps ax sendmail and MailScanner
[root at gateway ~]# ps ax | grep send
2769 ? Ss 0:00 sendmail: Queue runner at 00:15:00 for
/var/spool/clientmqueue
2941 ? Ss 0:00 sendmail: accepting
connections
2945 ? Ss 0:00 sendmail: Queue runner at 00:15:00 for
/var/spool/clientmqueue
2951 ? Ss 0:00 sendmail: Queue runner at 00:15:00 for
/var/spool/mqueue
3102 pts/5 R+ 0:00 grep --color send
[root at gateway ~]# ps ax | grep Mail
2973 ? Ss 0:00 MailScanner: master waiting for children,
sleeping
2974 ? S 0:02 MailScanner: waiting for messages
3030 ? S 0:02 MailScanner: waiting for messages
3037 ? S 0:02 MailScanner: waiting for messages
3041 ? S 0:02 MailScanner: waiting for messages
3045 ? S 0:02 MailScanner: waiting for messages
3106 pts/5 R+ 0:00 grep --color Mail
we can see that there now is 2 clientmqueue, the old one and the new one.
Now it wont work till I stop MailScanner, kill the sendmail pid's and
restart it all.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list