Mailscanner on Freebsd
Raylund Lai
raylund.lai at KANKANWOO.COM
Tue Jan 3 01:26:51 GMT 2006
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
Here are some of my notes/steps on installing MS on FreeBSD 6. I'm not
having time to sort them out and some are not relevant to you (it's a
mail gateway), but you could follow the logic in setting up.
Cheers
Raylund
Free BSD 6 Installation
1. sysinstall Main Menu
+ Standard
2. Install Boot Manager for boot drive
+ Standard - Install a standard MBR (no boot manager)
3. Choose Distributions
+ [8] User
o Install FreeBSD ports collection - No
+ [B] Custom
o src
o All
4. enable SSH login - Yes
5. enable Linux binary compatibility - No
6. browse the FreeBSD package collection - Yes
+ perl-5.8.7
7. add initial user account - No
Installation of ports
1. cd /usr/ports/sysutils/webmin/
+ make
+ make install
+ /usr/local/lib/webmin/setup.sh
+ cd /etc/
+ cp rc.conf rc.conf.ORIG
+ vi rc.conf
o add: webmin_enable="YES"
o or echo 'webmin_enable="YES"' >> rc.conf
2. cd /usr/ports/mail/p5-Mail-ClamAV/
+ make
+ make install
3. cd /usr/ports/mail/p5-Mail-Spamassassin/
+ make
o select AS_ROOT, RAZOR, SPF_QUERY only
+ make install
4. cd /usr/ports/security/f-prot/
+ make
+ make install
5. install BitDefender
+ cd /usr/ports/distfiles/
+ fetch -v
ftp://ftp.bitdefender.com/pub/freebsd/5/final/bdc-7.0.1.2-fbsd5.tar.gz
+ cd /usr/ports/security/bdc/
+ make
+ make install
+ vi rc.conf
o add: compat5x_enable="YES"
o or echo 'compat5x_enable="YES"' >> rc.conf
6. cd /usr/ports/misc/compat4x/ (somehow bdc needs compat4x instead of
compat5x, may be fixed already)
+ make
+ make install
+ vi rc.conf
o add: compat4x_enable="YES"
o or echo 'compat4x_enable="YES"' >> rc.conf
7. cd /usr/ports/mail/mailscanner/
+ make
+ make install
+ make initial-config
8. cd /usr/ports/sysutils/portupgrade/
+ make
+ make install
9. reboot
10. pkgdb -F
Configuration of sendmail
1. cd /etc/mail/
2. cp freebsd.mc freebsd.mc.ORIG
3. cp access.sample access
4. cp mailertable.sample mailertable
5. vi freebsd.mc
+ add: FEATURE(`relay_hosts_only')
+ add: define(`confPRIVACY_FLAGS', `authwarnings, ...,
nobodyreturn')
+ dnl FEATURE(blacklist_recipients)
+ dnl FEATURE(virtusertable,....)
+ dnl DAEMON_OPTIONS(`Name=IPv6,...)
6. m4 /usr/share/sendmail/cf/m4/cf.m4 freebsd.mc > sendmail.cf
7. vi mailertable
+ only entry is: yourdomain.com smtp:[192.168.0.1]
8. makemap hash mailertable < mailertable
9. vi access
+ only entry is: Connect:192.168.0.1 RELAY
10. makemap hash access < access
11. vi relay-domains
+ only entry is: yourdomain.com
12. cd /etc/
13. vi rc.conf
+ add: sendmail_enable="NONE"
+ or echo 'sendmail_enable="NONE"' >> rc.conf
Install milter-ahead
1. transfer downloaded files (www.SnertSoft.com) of LibSnert and
milter-ahead to ~/tmp/
2. cd ~/tmp/
3. tar zxvf libsnert-1.48.tar.gz
4. tar zxvf milter-ahead-0.9.tar.gz
5. cd ~/tmp/com/snert/src/lib/
6. ./configure --without-db
7. make build
8. cd ../milter-ahead
9. ./configure --without-db
10. make build
11. make install
12. modify /etc/mail/freebsd.mc accordingly
Configuration of MailScanner
1. mkdir -p /var/spool/MailScanner/incoming/
2. mkdir /var/spool/MailScanner/quarantine/
3. mkdir /var/spool/mqueue.in/
4. chgrp daemon /var/spool/MailScanner
5. chgrp daemon /var/spool/MailScanner/*
6. chgrp daemon /var/spool/mqueue.in
7. cd /usr/local/etc/rc.d
8. cp mta.sh.sample mta.sh
9. cp mailscanner.sh.sample mailscanner.sh
10. cd /usr/local/etc/MailScanner/mcp/
11. cp mcp.spam.assassin.prefs.conf.sample mcp.spam.assassin.prefs.conf
12. mkdir /var/spool/spamassassin/
13. chgrp daemon /var/spool/spamassassin
14. edit/create file bounce.rules to /usr/local/etc/MailScanner/rules/
15. edit/create file notices.to.rules to
/usr/local/etc/MailScanner/rules/
16. edit/create file spam.checks.rules to
/usr/local/etc/MailScanner/rules/
17. edit/create file spam.header.rules to
/usr/local/etc/MailScanner/rules/
18. edit/create file virus.scanning.rules to
/usr/local/etc/MailScanner/rules/
19. edit /usr/local/etc/MailScanner/MailScanner.conf
20. edit /usr/local/etc/MailScanner/spam.assassin.prefs.conf
21. edit /usr/local/etc/MailScanner/virus.scanners.conf
22. edit /usr/local/libexec/MailScanner/bitdefender-autoupdate
23. edit /usr/local/libexec/MailScanner/f-prot-autoupdate
24. add cron job for update_virus_scanners every 15 minutes
+ crontab -e
+ 6,21,36,51 * * * *
/usr/local/libexec/MailScanner/update_virus_scanners
25. transfer file bayes_backup /var/spool/spamassassin/
26. restore bayes backup
BB wrote:
After the mailscanner install it gives a brief message to
make the install complete.
Something like -
make config
Don't recall exactly but you will see it. It copes all the
sample filename extensions to the usable ones.
I have not installed mailscanner on 6.x . Haven't heard of
any problems on 6.x
Use the standard cvsup so your not running on the bleeding
edge.
On 1/2/06, Julian Field <MailScanner at ecs.soton.ac.uk> wrote:
Need to install Mail::SPF::Query
Install the following:
make install name=clamav
make install name=p5-Mail-ClamAV
make install name=p5-DBI
make install name=p5-Net-Ident
You need to make all the queue directories by
hand and rename all the
silly .sample files freebsd seems to use, which
just makes life harder
for you.
Start by getting the modules installed.
/usr/local/libexec/MailScanner/MailScanner -v
shoulud produce everything installed except
Mail::ClamAV, Net::LDAP and
SAVI, they aren't needed.
Then hunt /usr/local for every ".sample" file and
rename them so they
don't end in that.
mkdir -p /var/spool/MailScanner/incoming
mkdir /var/spool/MailScanner/quarantine
That should be enough to get you started.
If you could document what you do and add it to
the wiki at
wiki.mailscanner.info that would be *REALLY*
helpful for other people.
Lance Haig wrote:
> Hi Julian,
>
> I have just looked on their website and it says
6 is a production release.
>
> Does that mean it is unstable?
>
> Where can I find the documentation for
installing MS on Freebsd.
>
> I have seen the document on
>
http://www.sng.ecs.soton.ac.uk/*mailscanner*/FreeBSD.html
>
> Are there other documents ?
>
> Thanks
>
> Lance
>
> Julian Field wrote:
>
>> Use the "port".
>> cd /usr/ports
>> make install name=mailscanner
>>
>> Once you've done all that, I've got a little
list of things you have
>> to do extra, as I've just done this myself.
>> I hope you're not using this in production,
freebsd 6 isn't finished
>> yet!
>>
>> Lance Haig wrote:
>>
>>> I am looking at installing MS on a freebsd 6
system.
>>>
>>> Has anyone done this before?
>>> How does it compare with Suse or Redhat with
regards to management.
>>>
>>> Thanks
>>>
>>> Lance
>>>
>>> ------------------------ MailScanner list
------------------------
>>> To unsubscribe, email jiscmail at jiscmail.ac.uk
with the words:
>>> 'leave mailscanner' in the body of the email.
>>> Before posting, read the Wiki
(http://wiki.mailscanner.info/) and
>>> the archives (
http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>>
>>> Support MailScanner development - buy the
book off the website!
>>
>>
>>
>
> ------------------------ MailScanner list
------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk
with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the Wiki (
http://wiki.mailscanner.info/)
> and the archives
(http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> *Support MailScanner development - buy the book
off the website!*
--
Julian Field
www.MailScanner.info
Buy the MailScanner book at
www.MailScanner.info/store
Professional Support Services at
www.MailScanner.biz
MailScanner thanks transtec Computers for their
support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6
5947 1415 B654
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
------------------------ MailScanner list
------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk
with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki
(http://wiki.mailscanner.info/) and
the archives (
http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book
off the website!
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/)
and the archives
(http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/)
and the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list