Daily Archives: June 29, 2004

Creating a Mail Gateway for Microsoft Exchange

Setting Up a Spam-Filtering Mail Gateway

For Microsoft Exchange

Using Fedora Core 1, Postfix 2.0.19,

Amavisd-New and Razor2

If you find this document useful, or have any additions or corrections, please send a message to the Webmaster.

Document Conventions

Configuration filename–link to example file Command prompt Command typed by user Comments Input to text editor

Install Fedora Core 1

Use “server” configuration

(need to detail this…)

Install Fedora Core 1 Updates

[root]# rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/1/apt/apt-0.5.15cnc3-0.1.fr.i386.rpm [root]# vi /etc/apt/sources.list

add the lines: rpm http://apt.sw.be redhat/fc1/en/i386 dag

rpm-src http://apt.sw.be redhat/fc1/en/i386 dag

rpm http://ftp.WL0.org apt/fedora/fc1/i386 postfix

rpm-src http://postfix.WL0.org ftp/apt/fedora/fc1/i386 postfix

[root]# apt-get remove sendmail sendmail-cf [root]# apt-get update [root]# apt-get upgrade You may have to run this multiple times. After APT updates the first time, you may get an error about not finding sources.list. If so, do: [root]# mv /etc/apt/sources.list.rpmsave /etc/apt/sources.list (you can ignore errors about duplicate sources).

Compile and Install Postfix

[root]# apt-get source postfix [root]# apt-get install rpm-build gcc gawk sed ed patch [root]# apt-get install mysql mysql-devel (if using mysql) [root]# cd /usr/src/redhat/SOURCES [root]# export POSTFIX_MYSQL_REDHAT=1 (if using mysql) [root]# export POSTFIX_PCRE=1 [root]# export POSTFIX_SASL=2 (if using SASL for SMTP AUTH) [root]# export POSTFIX_TLS=1 (for SMTP AUTH) [root]# export POSTFIX_SMTPD_MULTILINE_GREETING=1 [root]# sh make-postfix.spec [root]# cd ../SPECS [root]# rpmbuild -ba postfix.spec you will probably get some errors about needed RPM devel packages. for each one, do: [root]# apt-get install [root]# cd ../RPMS/i386 [root]# rpm -ivh postfix.*.rpm (or: rpm -Uvh postfix.*.rpm if postfix is already installed) [root]# chkconfig postfix off [root]# postfix stop [root]# cd /etc/postfix [root]# vi main.cf (linked file) [root]# vi master.cf (linked file) [root]# ./postfix-chroot.sh enable

Install Amavisd-New and Pflogsumm (Postfix Log Summarizer)

[root]# apt-get install pflogsumm amavisd-new [root]# chkconfig amavisd off [root]# service amavisd stop [root]# vi /etc/amavisd.conf (linked file) [root]# vi /var/spool/amavis/notify-spam-sender.txt
(linked file) [root]# mkdir -p /var/spool/amavis/tmp [root]# mkdir -p /var/spool/amavis/lookups [root]# cd lookups [root]# touch blacklist_sender whitelist_sender
(edit as necessary) [root]# vi spam_lovers add: postmaster@domain.com abuse@domain.com [root]# vi virus_lovers (same thing – add postmaster and abuse) [root]# cd ../.. [root]# chown -R amavis:amavis amavis

Install Razor2

[root]# cd ~ [root]# wget http://aleron.dl.sourceforge.net/sourceforge/razor/razor-agents-2.40.tar.gz [root]# perl -MCPAN -e shell cpan> install Net::Ping cpan> install Net::DNS cpan> install Time::HiRes cpan> install Digest::SHA1 cpan> install GetOpt::Long cpan> install File::Copy cpan> install Digest::Nilsimsa cpan> install URI::Escape cpan> quit [root]# tar xvfz razor-agents-2.40.tar.gz [root]# cd razor-agents-2.40 [root]# perl Makefile.PL [root]# make [root]# make test [root]# make install [root]# su amavis [amavis]$ razor-client [amavis]$ razor-admin -create [amavis]$ razor-admin -register [amavis]$ cd /var/spool/amavis/.razor [amavis]$ vi razor-agent.conf debuglevel=1 [amavis]$ exit

Configure reporting tools

[root]# cd /usr/local/sbin [root]# vi pflogs.sh (attached file)

[root]# vi rejections.sh (attached file)

[root]# chmod a+x pflogs.sh
[root]# cd /etc/logrotate.d [root]# vi maillog
add before “endscript”:


Configure SpamAssassin Rule updates

[root]# wget http://maxime.ritter.eu.org/Spam/rule-get [root]# vi rule-get change: my $real_path=”/etc/mail/spamassassin” [root]# chmod a+x rule-get [root]# cd /etc/mail/spamassassin [root]# rule-get get-rules [root]# rule-get install BackHair Weeds2 ChickenPox BigEvil TripWire EvilNumbers

$100 a plate?

Ed. Note: this is in regards to a celebration for the 100th Anniversary of St. Mary’s Catholic Center, the Catholic Campus Ministry for Texas A&M University. From a letter to the St. Mary’s Development Office.

Why did the planning committee for the 100 year anniversary of Catholic ministry to Texas A&M decide to place such a high price per person to attend this gala?

The committee is pricing out a large portion of former students from St Mary’s who would love to attend, but can’t because of the price. Many are young families with or without children who will not be able to justify the cost, even for such a good cause as St Mary’s. If the cost had been lower, say $30-40 a plate, I think that the Development Office would find that many more people might attend and even find that they are able to make a donation in addition to the cost of the Gala.

St Mary’s means so much to so many people. It would seem to me that an event like this would be cause to bring together as many former students as possible to share what St Mary’s meant to them while they attended Texas A&M. Setting the price at $100 a plate will likely turn people away who would otherwise attend. It sets the tone that only people who can afford to pay are welcome here, and that’s not what St Mary’s is about.

It is also a concern that only a handful of people may find out about this event. When the Aggie Awakening 20th Anniversary reunion came around last fall, it appeared that only those on St Mary’s mailing list found out about it. I talked to several people who were very active with Aggie Awakening who either did not know about the reunion or found out in too little time to plan to attend. To my knowledge, efforts were not made to place advertisements in diocesean newspapers around Texas or in the Texas Aggie Magazine to reach out to those who have lost contact with St Mary’s. By spending a relatively small amount of money in advertising this event, so many more people would have attended because of the opportunity to see old friends, not to mention how much Aggie Awakening touched their lives. In turn, by advertising and reducing the cost to attend the Gala, I feel that more people would feel welcome and want to attend a celebration of St Mary’s ministry to Texas A&M.


Terri ’98]]>