& Lt; email anti-spam & gt;, email Anti-Spam

Source: Internet
Author: User

<Anti-spam and anti-virus of emails>

This chapter -- the tool used to send and receive emails is Thunderbird.

 

Install

# Yum install dovecot-mysql.x86_64 dovecot. x86_64-y

Edit File

Vim 10-mail.conf

Mail_location = maildir:/home/vmail/% d/% n/Maildir/first_valid_uid = 800

Enable

! Include auth-sql.conf.ext

# Vim auth-sql.conf.ext.

The file prompts you to find The args =/etc/dovecot/dovecot-sql.conf.ext but the file is not in the/etc/dovecot directory.

Tip for reference template: # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext

/Usr/share/doc/dovecot-2.0.9/example-config cp dovecot-sql.conf.ext/etc/dovecot/

 

# Vim dovecot-sql.conf.ext // mainly modify the following lines

Driver = mysql

Connect = host = localhost dbname = extmail user = extmail password = extmail

Default_pass_scheme = PLAIN

Password_query = \ SELECT username, domain, password \ FROM mailbox WHERE username = '% U'

User_query = SELECT maildir, 800 AS uid, 800 AS gid FROM mailbox WHERE username = '% U'

Restart the dovecot service to test whether the tofu block is successful:

# Telnet to localhost 110

User redhat@extmail.org pass redhat

Bean curd SASL Certification

First, check the help documentation and how to install the SASl authentication library of the bean curd block.

Cd/usr/share/doc/postfix-2.6.6/README_FILES

# Less SASL_README

View postfix parameter information postconf-d | grep smtpd_sasl

Write it to the main configuration file of main. cf postfix.

Postconf-e smtpd_sasl_auth_enable = yes

Postconf-e smtpd_sasl_authenticated_header = yes

View the SASL encryption authentication.

Postconf-d | grep smtpd_recipient

Postconf-e "smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit_sasl_authenticated"

Smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit_sasl_authenticated

Enable the SASL authentication/authentication header.

Smtpd_sasl_auth_enable = yes

Smtpd_sasl_authenticated_header = yes

The system's default help documentation is not very good. You can find a package to view it yourself.

Postfix-2.10.2.tar.gz

Tar zxf postfix-2.10.2.tar.gz cd postfix-2.10.2

Less SASL_README

Vim/etc/sasl2/smtpd. conf

Pwcheck_method: auxprop

Auxprop_plugin: SQL

Mech_list: PLAIN loin CRAM-MD5 DIGEST-MD5 NTLM

SQL _engine: mysql

SQL _hostnames: 127.0.0.1

SQL _user: extmail

SQL _passwd: extmail

SQL _database: extmail SQL _select: SELECT

Password FROM mailbox WHERE username = '% u @ % R'

Yum list cyrus-sasl *

Rpm-ivh cyrus-sasl-sql-2.1.23-13.el6_3.1.x86_64.rpm

Yum install cyrus-sasl-md5.x86_64 cyrus-sasl-devel.x86_64 cyrus-sasl-plain.x86_64-y

 

Authentication

Postconf-d | grep smtpd_tls // search for the tls authentication items and write them to the postfix master file.

Postconf-e smtpd_tls_security_level = encrypt cd/etc/pki/tls/certs/make postfix. pem

Postconf-e smtpd_tls_cert_file =/etc/pki/tls/certs/postfix. pem

Postconf-e smtpd_tls_received_header = yes

Postconf-e "smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache"

Postconf-e smtpd_tls_auth_only = yes/etc/init. d/postfix restart/etc/init. d/clamd start

 

 

 

Anti-spam and anti-virus of emails

Yum install spamassassin-y cd/usr/share/spamassassin/

Yum localinstall clam *-y

Download virus Database

# Rm-rf virusdb/# chown clamav. clamav *

# Yum install-y rpm-build

#./Install. sh

# Vim mailconsumer. conf // The following option parameters to be modified for this library

Incoming Queue Dir =/var/spool/postfix/hold

Outgoing Queue Dir =/var/spool/postfix/incoming Run As User = postfix Run As Group = postfix MTA = postfix

Incoming Work Group = clamav

Incoming Work Permissions = 0640

Virus Scanners = clamd

Monitors for ClamAV Updates =/var/clamav/*. cld/var/clamav/*. cvd

# Rpm-ql clamd

# Cd/var/run/clamav/clamd. pid clamd. sock

Clamd Socket =/var/run/clamav/clamd. sock

Always Include SpamAssassin Report = yes

SpamAssassin User State Dir =/var/spool/mailool/spamassassin

Spam Actions = delete High Scoring Spam Actions = delete

[Root @ vm1 mailtoken] # mkdir spamassassin

# Chown-R postfix. clamav.

# Cd/etc/postfix/

# Vim main. cf

Remove the following #

Header_checks = regexp:/etc/postfix/header_checks

# Vim header_checks low-line inbound/^ Received:/HOLD

The following are the syntax errors and solutions.

Mail‑lint

Error solution:

ERROR: The "envelope_sender_header" in your spam. assassin. prefs. conf ERROR: is not correct, it shocould match X-yoursite-mailparts-From

# Cd/etc/maillogs/

Envelope_sender_header X-yoursite-mailentries-From

Error: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mail?. cf": use_auto_whitelist 0

Comment out this line # use_auto_whitelist 0

Error: Unrar is not installed, it shoshould be in/usr/bin/unrar. This is required for RAR archives to be read to check filenames and filetypes. Virus scanning is not affected.

Installation Package unrar-4.2.4-1.el6.x86_64.rpm

[Root @ vm1 mailpattern] #/etc/init. d/postfix status master is stopped

[Root @ vm1 mail1_] #/etc/init. d/mail1_start

Starting MailScanner daemons: incoming postfix: [OK] outgoing postfix: [OK] mailfix: [OK]

[Root @ vm1 mailpattern] #/etc/init. d/postfix

Status master (pid 10891) is running...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


What is the difference between anti-virus and anti-spam in Kabbah?

Email anti-virus: it refers to monitoring daily emails. If a virus is detected, it will be detected and killed in time!

Anti-spam: controls the sending of spam to your mailbox. Keep all emails you receive normally.

The two functions have different purposes and different directions!

The configuration items are described in detail. You will understand it after studying it more!

There are some software optimization settings in Kabbah's official forum. Of course, if your computer configuration is not too bad, you can set it by default.

Q: How does the email system implement anti-spam?

The Anti-Spam function of TurboMail is a nine-layer anti-spam engine with a spam Effect of more than 96%. It has a well-known open-source Anti-Virus engine ClamAV, which has a 99.9% anti-spam capability on mail viruses, it also supports automatic and timed update of virus feature libraries for Embedded anti-virus and gateway anti-virus.

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.