MailScanner on freebsd

Marc Dufresne Marc.Dufresne at PARKS.ON.CA
Sun Nov 20 16:11:25 GMT 2005

I am going to explain my understanding of the MailScanner setup. Please
reveiw and let me know if I'm understanding this correctly?

When MailScanner.conf is configured, the following parameters should be
set if I'm using sendmail on FreeBSD 5.4:

#MTA used for the Gateway

#Set how to invoke MTA when sending messages MailScanner has created
(e.g. to sender/recipient saying "found a virus in your message"). This
can also be the filename of a ruleset.

#Incoming mail queue directory for Sendmail
Incoming Queue Directory=/var/spool/mqueue

#Outgoing mail queue directory for Sendmail
Outgoing Queue Directory=/var/spool/mqueue

#Incoming Queue Directory for MailScanner

#Quarantine Directory for MailScanner

System Startup should be as follows:

1) #Disable sendmail from loading at system startup
modify /etc/rc.conf to disable sendmail load

Section FreeBSD 5.0-STABLE and Later



2) #Load MailScanner at system startup.
    #Make sure file is located under /usr/local/etc/rc.d
in order to load MailScannner process at startup. should
invoke sendmail and mailscanner process to start scanning/delivering


First Problem

I cannot disable sendmail on bootup on FreeBSD 5.4!!!! I tried
everything. Sendmail still loads at startup???????

Second Problem

Once system is completly loaded and sitting at the login prompt, I
receive an error 
 NOQUEUE:SYSERROR(root):opendaemon socket:daeomon IPv4:cannot bind
address already in use

I login, and run ps -ax (This is what I see)

375  ??  Ss     0:00.07 sendmail: accepting connections (sendmail)
379  ??  Is     0:00.00 sendmail: Queue runner at 00:30:00 for    

426  ??  Is     0:00.01 sendmail: Queue runner at 00:15:00 for
430  ??  Is     0:00.01 sendmail: Queue runner at 00:15:00 for

613  ??  Ss     0:00.02 /usr/bin/perl -I/usr/local/lib/MailScanner
/usr/local 614  ??  S      0:02.33 /usr/bin/perl
-I/usr/local/lib/MailScanner /usr/local
627  ??  S      0:02.19 /usr/bin/perl -I/usr/local/lib/MailScanner
630  ??  S      0:02.15 /usr/bin/perl -I/usr/local/lib/MailScanner
635  ??  S      0:02.17 /usr/bin/perl -I/usr/local/lib/MailScanner
636  ??  S      0:00.11 /usr/bin/perl -I/usr/local/lib/MailScanner

Third Problem

I run tail -f /var/log/maillog

I will send test e-mails from the outside and watch sendmail receive
and process incoming mail. Everyone receives e-mails from the outside,
but mailscanner does not scan any messages.

I will issue a mailq to view /var/spool/mqueue directory. Directory is
always empty. 

I'm completely stumped here as to why Sendmail refuses to disable at
startup and MailScanner refuses to scan e-mail messages!!!!!

Any ideas????

Marc Dufresne, Corporate IT Officer
St. Lawrence Parks Commission
13740 County Road 2
Morrisburg, ON  K0C 1X0

E-mail: Marc.Dufresne at
Voice: 613-543-3704  Ext#2455
Fax: 613-543-2847
Corporate website:

>>> BB <brent.bolin at> 11/19/2005 12:38 AM >>>
Don't know if they ever got the list fixed for my replies, so I'm doing
direct and through the list.

Change /etc/rc.conf or /etc/defaults/rc.conf

Verify mailscanner is starting up with /usr/local/etc/rc.d/mailscanner

Think you need to manually create some of the directores. Verify
MailScanner.conf for directories.

tail -f /var/log/maillog will show you the details

The only reason to rebuild <> is to
IPv6 stuff. I would use m4 macro for that. Webmin would be a good
choice to

# SMTP daemon options

O DaemonPortOptions=Name=IPv4, Family=inet
O DaemonPortOptions=Name=IPv6, Family=inet6, Modifiers=O
O DaemonPortOptions=Port=587, Name=MSA, M=E

ACK and you shall receive

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki ( and
the archives (

Support MailScanner development - buy the book off the website!

    [ Part 2, Text/PLAIN (Name: "Marc Dufresne.vcf")  20 lines. ]
    [ Unable to print this part. ]

More information about the MailScanner mailing list