Install Spamassassin, ClamAV, and Amavisd-new
You can just run emerge on these packages. Note that as of today, the mail-filter/spamassassin in Portage is still version 3.2.1, which is a bit old. If you want the latest, you can find the latest dev version from Gentoo mail-filter category packages page. To install the masked mail-filter/spamassassin-3.2.5, put the following line in /etc/portage/package.keywords:
=mail-filter/spamassassin-3.2.5
Now let's do it:
# emerge mail-filter/spamassassin mail-filter/amavisd-new app-antivirus/clamav
* Messages for package mail-filter/spamassassin-3.2.5:
*
* spamd is not designed to listen to an untrusted network
* and is vulnerable to DoS attacks (and eternal doom) if
* configured to do so
*
* If you plan on using the -u flag to spamd, please read the notes
* in /etc/conf.d/spamd regarding the location of the pid file.
* A note from the SA developers:
* Perl 5.8 now uses Unicode internally by default, which causes trouble for
* SpamAssassin (and almost all other reasonably complex pieces of perl
* code!).
*
* We've worked around this in most places, as far as we know, but there may
* still be some issues. In addition, there is a speed hit, which it would
* be nice to avoid.
*
* Setting the LANG environment variable before any invocation of
* SpamAssassin sometimes seems to help fix it, like so:
*
* export LANG=en_US
*
* Notably, the LANG setting must not include "utf8". However, some folks
* have reported that this makes no difference. ;)
* For spf support, please emerge dev-perl/Mail-SPF-Query
* For dcc support, please emerge mail-filter/dcc
* For pyzor support, please emerge dev-python/pyzor
* For razor support, please emerge mail-filter/razor
* For addtional functionality, you may wish to emerge:
* dev-perl/IP-Country dev-perl/Net-Ident
* dev-perl/Mail-DKIM
* Messages for package mail-filter/amavisd-new-2.6.1-r1:
* Amavisd-new no longer requires SpamAssassin, but no anti-spam checking
* will be performed without it. Since you do not have SpamAssassin installed,
* all spam checks have been disabled. To enable them, install SpamAssassin
* and comment out the line containing:
* @bypass_spam_checks_maps = (1); in /etc/amavisd.conf.
* As of amavisd-new-2.4.5 p0f-analyzer.pl only binds to the loopback interface
* by default instead of to all interfaces. You will need to change
* in p0f-analyzer.pl to '0.0.0.0' if p0f-analyzer.pl is running on a different
* host from amavisd or from other querying clients.
* Adjusting permissions for /etc/amavisd.conf (0 for world, owner root:amavis)
* Messages for package app-antivirus/clamav-0.94.2:
* The soname for libclamav has changed in clamav-0.94.
* If you have upgraded from that or earlier version, it is
* recommended to run revdep-rebuild, in order to fix anything
* that links against libclamav.so library.
In the message for spamassassin, it stated "For spf support, please emerge dev-perl/Mail-SPF-Query". Don't worry about it. Mail::SPF::Query has been deprecated by Mail::SPF, which isn't available in Portable yet. You just have to use CPAN to install it and all of its dependants.
Configure Postfix, Amavisd, and ClamAV
Follow http://www.gentoo.org/doc/en/mailfilter-guide.xml#doc_chap2 to configure postfix, amasivd, and clamAV.
Now start the daemons:
# /etc/init.d/clamvd start
# /etc/init.d/spamd start
# /etc/init.d/amavisd restart
# /etc/init.d/postfix reload
# rc-update add clamvd default
# rc-update add spamd default
# rc-update add amavisd default
Install Razor and DCC
# emerge razor
* Messages for package mail-filter/razor-2.84:
*
* Run 'razor-admin -create' to create a default config file in your
* home directory under /home/user/.razor. (Remember to change user to
* your username from root before running razor-admin)
*
* Razor v2 requires reporters to be registered so their reputations can
* be computed over time and they can participate in the revocation
* mechanism. Registration is done with razor-admin -register. It has to be
* manually invoked in either of the following ways:
*
* To register user foo with 's1kr3t' as password:
*
* razor-admin -register -user=foo -pass=s1kr3t
*
* To register with an email address and have the password assigned:
*
* razor-admin -register -user=foo@bar.com
*
* To have both (random) username and password assgined:
*
* razor-admin -register
*
* razor-admin -register negotiates a registration with the Nomination Server
* and writes the identity information in
* /home/user/.razor/identity-username, or /etc/razor/identity-username
* when invoked as root.
*
* You can edit razor-agent.conf to change the defaults. Config options
* and their values are defined in the razor-agent.conf(5) manpage.
*
* The next step is to integrate razor-check, razor-report and
* razor-revoke in your mail system. If you are running Razor v1, the
* change will be transparent, new versions of razor agents will overwrite
* the old ones. You would still need to plugin razor-revoke in your MUA,
* since it's a new addition in Razor v2. If you are not running Razor v1,
* refer to manpages of razor-check(1), razor-report(1), and
* razor-revoke(1) for integration instructions.
*
# emerge -pv dcc
...
Configure Razor and DCC
Follow http://www.gentoo.org/doc/en/mailfilter-guide.xml#doc_chap2 to configure razor and DCC, including the firewall setting. No need to worry about the above message.
Follow my Setup DCC to Use Remote Public Servers to setup DCC.
Reference:
Recent comments
8 weeks 6 days ago
9 weeks 5 days ago
20 weeks 5 days ago
22 weeks 23 hours ago
30 weeks 6 days ago
31 weeks 16 hours ago
32 weeks 5 hours ago
32 weeks 6 days ago
32 weeks 6 days ago
33 weeks 17 hours ago