分享
 
 
 

Installing Sendmail, SpamAssassin, and Mailscanner on FC1

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

This guide is meant to build a spam and virus scanner to be put in place with an existing mail setup. All mail to the domain will come through this server, and then be relayed for normal delivery, with spam forwarded to spam@yourdomain.com. This has been tested in front of Domino.

This doc is a collaboration from James and Derek at PCA (thanks guys), various docs at fedoranews.org, Ugo Bellavance, and my own experiences.

First things first, you need these software packages to continue:

Fedora Core 1

MailScanner

Webmin

Sendmail (should install with OS)

SpamAssassin - do not install from Fedora, get the source tarball

DCC

Pyzor

Razor

Clam-AV

Fedora Core 1 Install

In the FC1 install, select ONLY Sendmail and Sendmail-cf under Mail Server, Development Tools, and Kernel Development. Nothing else is needed from Fedora.

Run yum update as soon as you're done booting up This will ensure a fully up-to-date system to work with.

Before you begin, make sure you have the following packages installed:

Perl

Sendmail

wget

unzip

gcc

patch

rpm-build Webmin w/ SSL Install -

http://www.webmin.com

Before you install webmin, install Net:SSLeay with:

rpm -ivh perl-Net-SSLeay-x.xx-x.rhfc1.dag.i386.rpm

with the package specifically for FC1 put together by Dag Wieers.

Once the install is complete, download webmin and install it with: rpm -ivh webmin-x.xxx-x.noarch.rpm

Open up a web browser, and point to https://your-box:10000.

Once you're logged into webmin, you can click on the system tab,

and go to bootup/shutdown and turn off any unnecessary services, and stop them from starting up.

Install MailScanner -

http://www.sng.ecs.soton.ac.uk/mailscanner/downloads.shtml

There have been some posted problems with man2prod errors, to avoid this type:

LANG=C

Unpack the tar file with:

tar xvzf MailScanner-x.xx-x.tar.gz

cd MailScanner-x.xx-x

./install.sh (You may need to run ./Update-MakeMaker.sh)

Create Sendmail-cf

Open up your favorite text editor and edit /etc/mail/sendmail.mc, and comment out the following lines by placing dnl in front of them:

dnl DAEMON_OPTIONS('Port=smtp,Adr=127.0.0.1, Name=MTA')

dnl FEATURE('accept_unresolvable_domains') dnl

Close and save. Now recreate the sendmail.cf at a command prompt with:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Install SpamAssassin -

http://www.spamassassin.org/downloads.html

Get the following four rpms:

spamassassin-x.xx-x.i386.rpm

perl-Mail-SpamAssassin-x.xx-x.i386.rpm

spamassassin-tools-x.xx-x.i386.rpm

perl-Digest-SHA1-x.xx-x.i386.rpm

Install all of these. That is it for now.

Install DCC -

http://www.dcc-servers.net/dcc/source/dcc-dccd.tar.Z

Extract the package with tar zxvf dcc-dccd.tar.Z, cd into the directory, and to install type:

./configure; make install

SpamAssassin will automagically pick up DCC and use it.

Install Pyzor -

http://pyzor.sourceforge.net

You will need the package python-devel for Pyzor

Extract the package with tar zxvf pyzor-0.4.0.tar.gz, cd into the directory, and to install type:

python setup.py build

python setup.py install

Pyzor will automagically be picked up by SpamAssassin as well.

Install Razor -

http://razor.sourceforge.net

Download the razor-agents, and the razor-agents-sdk tarballs, along with Net::DNS and Time::HiRes perl modules.

Extract the razor-agents-sdk first with:

tar zxvf razor-agents-sdk-2.03.tar.gz

tar zxvf razor-agents-2.40.tar.gz

cd into the agents-sdk directory first, and type:

perl Makefile.PL

make

make test

make install

When you're done with both packages, type in: razor-client, which creates the needed symlinks.

Razor will automagically be picked up by SpamAssassin.

Make this a shell script, and chmod 744 it. I put it in /etc/cron.daily

#!/bin/sh

pyzor discover

razor-admin -discover

/var/dcc/libexec/updatedcc

Install Clam-AV -

http://www.clamav.net

First, create the clamav user and group.

groupadd clamav

useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav

Download clam-av, and extract it with:

tar zxvf clamav-x.xx.tar.gz

cd into the directory, and run:

./configure

make

make check

make install

MailScanner will update your Clam-AV defs for you.

Configure MailScanner

Modify the following in /etc/MailScanner/MailScanner.conf

MTA = sendmail

Use SpamAssassin = yes

Delivery Method = queue

Spam Actions = forward spam@yourdomain.com

High Scoring Spam Actions = forward spam@yourdomain.com

Virus Scanners = clamav

Comment out the following lines in /etc/MailScanner/spam.lists.conf

#MAPS-RBL blackholes.mail-abuse.org

#MAPS-DUL dialups.mail-abuse.org

#MAPS-RSS relays.mail-abuse.org

#MAPS-RBL+ rbl-plus.mail-abuse.org

*Note - make sure you make an account spam@yourdomain.com

Configure Sendmail

From Webmin, click on Servers, click on Sendmail Configuration.

Go to Domain Routing (mailertable) and manually edit /etc/mail/mailertable and add the following line:

yourdomain.com esmtp:normalmailserver.xxx.com

normalmailserver.xxx.com is the full hostname of the mail server that spam server will forward all mail to.

Make sure to separate with the tab key and save the settings.

Next, Click on Relay domains and add yourdomain.com

http://fedoranews.org/contributors/andrew_bassett/mailscanner

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有