Anti-spam virus mail software

Source: Internet
Author: User
Tags spamassassin

Installing Amavisd-new
Yum Install amavisd-new
Chinese filter Rules
CP chinese_rules.cf/usr/share/spamassassin/
Service AMAVISD Start
lsof-i:10024

Installing ClamAV
Yum Install CLAMD
vim/etc/clamd.conf
comment out 80 lines of ' Tcpsocket 3310 ', we will use a UNIX socket instead of TCP, the two cannot coexist

Set Related directory permissions:
Add ClamAV to Amavis Run group and adjust directory permissions, otherwise ClamAV will not be able to scan temporary files generated by amavisd-new
usermod-g Amavis ClamAV
chown Amavis.amavis/var/spool/vscan
chmod 750/var/spool/vscan
chown amavis.amavis/var/spool/vscan/tmp
chmod 750/var/spool/vscan/tmp

start ClamAV and update the virus database
Service CLAMD Start
Configuring the Amavisd.con file
vim/etc/amavisd/amavisd.conf
$mydomain = ' server.com ';
153 $myhostname = ' mail.server.com ';
@local_domains_maps = QW (.); Check for all domains

to modify the Post/intercept method:
158 $final _virus_destiny = d_reject;
$final _spam_destiny = d_reject; The message will not be delivered to the recipient, but will notify the sender that the message was rejected.
$sa _tag2_level_deflt = 19.2; Exceeding this score allows the [SPAM] tag to be added to the message header
$sa _kill_level_deflt = 19.9; Over this score, delete the letter directly after backup

configuration AMAVISD and ClamAV combination
in the
");

@av_scanners_backup = ("
Added above
717
718 [' CLAMAV-CLAMD ',
719 \&ask_daemon, ["Contscan {}\n", "/var/run/clamav/clamd.sock"],
720 qr/\bok$/, qr/\bfound$/,
721 qr/^.*?: (?! Infected Archive) (. *) found$/],
722
723);
724 @av_scanners_backup = (
725
726 # # #http://www.clamav.net/- backs up clamd or Mail::clamav
727 # [' Clamav-clamscan ', ' Clamscan ',
728 # "--stdout--no-summary-r--tempdir= $TEMPBASE {}",
729 # [0], qr/:.*\sfound$/m, qr/^.*?: (?! Infected Archive) (. *) found$/m],
730 [' Clamav-clamscan ', ' Clamscan ',
731 "--stdout--no-summary-r--tempdir= $TEMPBASE {}",
732 [0], qr/:.*\sfound$/, qr/^.*?: (?! Infected Archive) (. *) found$/],

configuration AMAVISD and spam combination
@bypass_spam_checks_maps = (\%bypass_spam_checks,\ @bypass_spam_checks_acl, \ $bypass _spam_checks_re);

configuring Postfix Integration Amavisd-new
Modify /etc/postfix/master.cf to add the following:Smtp-amavis Unix--n-2 SMTP
- o lmtp_data_done_timeout=1200
- o lmtp_send_xforward_command=yes
- o disable_dns_lookups=yes
127.0.0.1:10025 inet n-n--smtpd
- o content_filter=
- o smtpd_client_restrictions=permit_mynetworks,reject
- o smtpd_helo_restrictions=
- o smtpd_sender_restrictions=
- o smtpd_recipient_restrictions=permit_mynetworks,reject
- o smtpd_data_restrictions=reject_unauth_pipelining
- o mynetworks=127.0.0.0/8

Modify the vim/etc/postfix/main.cf file
content_filter=smtp-amavis:[127.0.0.1]:10024
Restart postfix:
Service postfix Restart
Restart AMAVISD:
Service AMAVISD Restart
use Thunderbird to send normal mail tests,
send spam tests,
code:xjs*c4jdbqadn1. nsbn3*2idnen*gtube-standard-anti-ube-test-email*c.34x
Virus code:x5o! p% @AP [4\pzx54 (p^) 7CC) 7} $EICAR-standard-antivirus-test-file! $H +h*
rejected messages are saved in the/var/spool/vscan/tmp directory
Log file/var/log/maillog
Service SpamAssassin Restart

This article is from the "Small Zheng Technology Blog" blog, please be sure to keep this source http://ko178.blog.51cto.com/220419/1734537

Anti-spam virus mail software

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.