CentOS mail server with antivirus functionality SPAM

Can have a normal mail server MAIL, but its function less, and do not have anti-virus, anti-spam effectiveness. The realization of this mainly to add this feature! And added to the e-mail traffic monitoring capabilities!

1. Clamav anti-virus software installed;
[root @ mail ~] # yum install clamav


Dependencies Resolved
================================================== ===========================
Package Arch Version Repository Size
================================================== ===========================
Installing:
clamav i386 0.91.2-1.el4.rf dag 1.1 M
Installing for dependencies:
clamav-db i386 0.91.2-1.el4.rf dag 10 M
Transaction Summary
================================================== ===========================
Install 2 Package (s)
Update 0 Package (s)
Remove 0 Package (s)
Total download size: 11 M
Is this ok [y / N]: y
Downloading Packages:
Downloading Packages:
(1 / 2): clamav-0.91.2-1.el 100% |=========================| 1.1 MB 02:31
(2 / 2): clamav-db-0.91.2-1 100% |=========================| 10 MB 21:27
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: clamav-db ######################### [1 / 2]
Installing: clamav ######################### [2 / 2]
Installed: clamav.i386 0:0.91.2-1. El4.rf
Dependency Installed: clamav-db.i386 0:0.91.2-1. El4.rf
Complete!


2. Antivirus software virus definition updates;
[root @ mail ~] # / usr / bin / freshclam
ClamAV update process started at Fri Aug 31 18:55:00 2007
Downloading daily.cvd [100%]
daily.cvd updated (version: 4110, sigs: 16448, f-level: 21, builder: acab)
Database updated (149611 signatures) from db.cn.clamav.net (IP: 58.221.222.69)
WARNING: Clamd was NOT notified: Can't find or parse configuration file / etc / clamd.conf


3. In view of the above signature to upgrade the warning message: it is because the way through the yum RPM installed clamav package, the generated configuration file, not in / etc directory and the file named clamav.conf, according to the following steps:
[root @ mail etc] # find /-name clam *
find: / proc/801/task: No such file or directory
find: / proc/802/task: No such file or directory
find: / proc/803/task: No such file or directory
find: / proc/928/task: No such file or directory
find: / proc/936/task: No such file or directory
/ etc / log.d / conf / services / clamav.conf
[root @ mail etc] # cp / etc / log.d / conf / services / clamav.conf / etc / clamd.conf

4. Spamassassin anti-spam software installation;
[root @ mail ~] # yum-y install spamassassin
Dependencies Resolved
================================================== ===========================
Package Arch Version Repository Size
================================================== ===========================
Installing:
spamassassin i386 3.2.3-1.el4.rf dag 1.0 M
Installing for dependencies:
perl-Archive-Tar noarch 1.32-1.el4.rf dag 47 k
perl-Digest-HMAC noarch 1.01-13 base 11 k
perl-Digest-SHA1 i386 2.07-5 base 19 k
perl-IO-Socket-SSL noarch 1.07-2.el4.rf dag 43 k
perl-IO-Zlib noarch 1.05-1.el4.rf dag 15 k
perl-Net-DNS i386 0.61-1.el4.rf dag 271 k
perl-Net-IP noarch 1.25-1.el4.rf dag 30 k
perl-Net-SSLeay i386 1.30-4.el4.centos extras 198 k
perl-Time-HiRes i386 1.55-3 base 22 k
Updating for dependencies:
perl-HTML-Parser i386 3.55-1.el4.rf dag 140 k
Transaction Summary
================================================== ===========================
Install 10 Package (s)
Update 1 Package (s)
Remove 0 Package (s)
Total download size: 1.8 M
Downloading Packages:
(1 / 11): perl-HTML-Parser-100% |=========================| 140 kB 00:24
(2 / 11): perl-Digest-HMAC-100% |=========================| 11 kB 00:05
(3 / 11): perl-Net-DNS-0.61 100% |=========================| 271 kB 00:35
(4 / 11): perl-Net-SSLeay-1 100% |=========================| 198 kB 00:06
(5 / 11): perl-Digest-SHA1-100% |=========================| 19 kB 00:04
(6 / 11): perl-Net-IP-1.25-100% |=========================| 30 kB 00:06
(7 / 11): perl-Time-HiRes-1 100% |=========================| 22 kB 00:04
(8 / 11): perl-IO-Socket-SS 100% |=========================| 43 kB 00:06
(9 / 11): perl-Archive-Tar-100% |=========================| 47 kB 00:07
(10/11): spamassassin-3.2 100% |=========================| 1.0 MB 02:19
(11/11): perl-IO-Zlib-1.0 100% |=========================| 15 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-Digest-SHA1 ####################### [1 / 12]
Updating: perl-HTML-Parser ####################### [2 / 12]
Installing: perl-Digest-HMAC ####################### [3 / 12]
Installing: perl-IO-Zlib ####################### [4 / 12]
Installing: perl-Archive-Tar ####################### [5 / 12]
Installing: perl-Time-HiRes ####################### [6 / 12]
Installing: perl-Net-IP ####################### [7 / 12]
Installing: perl-Net-DNS ####################### [8 / 12]
Installing: perl-Net-SSLeay ####################### [9 / 12]
Installing: perl-IO-Socket-SSL ####################### [10/12]
Installing: spamassassin ####################### [11/12]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.en"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ( "C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.en"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ( "C").
Cleanup: perl-HTML-Parser ####################### [12/12]
Installed: spamassassin.i386 0:3.2.3-1. El4.rf
Dependency Installed: perl-Archive-Tar.noarch 0:1.32-1. El4.rf perl-Digest-HMAC.noarch 0:1.01-13 perl-Digest-SHA1.i386 0:2.07-5 perl-IO-Socket-SSL . noarch 0:1.07-2. el4.rf perl-IO-Zlib.noarch 0:1.05-1. el4.rf perl-Net-DNS.i386 0:0.61-1. el4.rf perl-Net-IP.noarch 0:1.25-1. el4.rf perl-Net-SSLeay.i386 0:1.30-4. el4.centos perl-Time-HiRes.i386 0:1.55-3
Dependency Updated: perl-HTML-Parser.i386 0:3.55-1. El4.rf
Complete!
[root @ mail ~] #

5. Against the above warning message in red font, we should make some corrections / etc/sysconfig/i18n documents, if we do not modify the installation when MailScanner each are prompted to restart, but not aware of the impact of no other!
[root @ mail ~] # vi / etc/sysconfig/i18n
Add the following command line:
LC_ALL = "C"
And: LANG = "en_US.UTF-8"
Changed to: LANG = "en_US"

6. Next, we installed MailScanner, first of all we have to download, go to the official line, the address: http://www.mailscanner.info/ download.
[root @ mail tmp] # wget http://www.mailscanner.info/files/4/rpm/MailScanner-4.62.9-3.rpm.tar.gz

- 16:40:51 - http://www.mailscanner.info/files/4/rpm/MailScanner-4.62.9-3.rpm.tar.gz
=> `MailScanner-4.62.9-3.rpm.tar.gz '
Resolving http://www.mailscanner.info/ ... 81.17.252.15
Connecting to http://www.mailscanner.info/|81.17.252.15|:80 ... connected.
HTTP request sent, awaiting response ... 200 OK
Length: 4,239,584 (4.0M) [application / x-gzip]
100 %[====================================>] 4,239,584 6.74K / s ETA 00:00
16:50:54 (6.88 KB / s) - `MailScanner-4.62.9-3.rpm.tar.gz 'saved [4239584/4239584]
[root @ mail tmp] # tar zxvf MailScanner-4.62.9-3.rpm.tar.gz # extract the package
[root @ mail tmp] # cd MailScanner-4.62.9-3
[root @ mail MailScanner-4.62.9-3] #. / install.sh # the process is longer, at this time to drink a cup, ha ha!
Good. You have the patch command.
Good, you have / usr / src / redhat in place.
Writing a. Rpmmacros file in your home directory to stop
unpackaged files breaking the build process.
You can delete it once MailScanner is installed if you want to.
Now to install MailScanner itself.
NOTE: If you get lots of errors here, run the install.sh script
NOTE: again with the command ". / Install.sh nodeps"
Preparing ... ########################################### [100% ]
1: mailscanner ########################################### [100%]
Good, SpamAssassin site rules found in / etc / mail / spamassassin
To activate MailScanner run the following commands:
service sendmail stop
chkconfig sendmail off
chkconfig - level 2345 MailScanner on
service MailScanner start
For technical support, please read the MAQ at www.mailscanner.biz/maq/
and buy the book at www.mailscanner.info / store
-------------------------------------------------- --------
Please buy the MailScanner book from http://www.mailscanner.info/!
It is a very useful administration guide and introduction
to MailScanner. All the proceeds go directly to making
MailScanner a better supported package than it is today.


7. POSTFIX configuration settings using MainScanner and MailScanner and clamav call SA; (red words to be modified, green for modified content.
[root @ mail MailScanner-4.62.9-3] # vi / etc / MailScanner / MailScanner.conf
% org-name% = yoursite
% org-name% = centosmail

% org-long-name% = Your Organisation Name Here
% org-long-name% = CentosMail_Leeki.Yan

% web-site% = http://www.your-organisation.com/
% web-site% = http://www.centos.eb.cn/

Run As User =
Run As User = postfix

Run As Group =
Run As Group = postfix

Incoming Queue Dir = / var / spool / mqueue.in
Incoming Queue Dir = / var / spool / postfix / hold

Outgoing Queue Dir = / var / spool / mqueue
Outgoing Queue Dir = / var / spool / postfix / incoming

MTA = sendmail
MTA = postfix

Virus Scanners = auto
Virus Scanners = clamav

Always Include SpamAssassin Report = no
Always Include SpamAssassin Report = yes

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

Incoming Work User =
Incoming Work Group =
Incoming Work User = postfix
Incoming Work Group = postfix

SpamAssassin Install Prefix =
SpamAssassin Install Prefix = / usr / bin

Quarantine User =
Quarantine Group =
Quarantine User = postfix
Quarantine Group = postfix

[root @ mail MailScanner-4.62.9-3] # vi / etc / MailScanner / MailScanner.conf
[root @ mail MailScanner-4.62.9-3] # cd / var / spool / MailScanner /
[root @ mail MailScanner] # ls-al
total 20
drwxr-xr-x 4 root root 4096 Aug 31 20:34.
drwxr-xr-x 16 root root 4096 Aug 31 20:34 ..
drwxr-xr-x 8 root root 4096 Aug 31 21:01 incoming
drwxr-xr-x 2 root root 4096 Aug 31 20:34 quarantine
[root @ mail MailScanner] # mkdir spamassassin
[root @ mail MailScanner] # mkdir. spamassassin
[root @ mail MailScanner] # chown-R postfix: postfix / var / spool / MailScanner / *
[root @ mail MailScanner] # ls-al
total 28
drwxr-xr-x 6 root root 4096 Aug 31 21:48.
drwxr-xr-x 16 root root 4096 Aug 31 20:34 ..
drwxr-xr-x 2 root root 4096 Aug 31 21:48. spamassassin
drwxr-xr-x 8 postfix postfix 4096 Aug 31 21:01 incoming
drwxr-xr-x 2 postfix postfix 4096 Aug 31 20:34 quarantine
drwxr-xr-x 2 postfix postfix 4096 Aug 31 21:48 spamassassin

Main.cf file modified to allow the use of MainScanner;
[root @ mail MailScanner] # vi / etc / postfix / main.cf
Will be: # header_checks = regexp: / etc / postfix / header_checks
Changed to: header_checks = regexp: / etc / postfix / header_checks
[root @ mail MailScanner] # mv / etc / postfix / header_checks / etc / postfix / header_checks.bak
[root @ mail MailScanner] # vi / etc / postfix / header_checks
Add the following command:
(Note that Office space to use tab key, add the following content)
/ ^ Received: / HOLD
[root @ mail MailScanner] # chkconfig spamassassin on
[root @ mail MailScanner] # service spamassassin start
Starting spamd: [OK]
[root @ mail MailScanner] #
[root @ mail MailScanner] # chkconfig postfix off # turn off self-starting postfix, MailScanner start by automatically start postfix
[root @ mail MailScanner] # chkconfig MailScanner on
[root @ mail MailScanner] # / etc / rc.d / init.d / MailScanner start
Starting MailScanner daemons:
incoming postfix: [OK]
outgoing postfix: [OK]
MailScanner: [OK]

See clamav has not started, use the following command:
[root @ mail MailScanner] # ps-aux | grep clamd
Warning: bad syntax, perhaps a bogus' - '? See / usr/share/doc/procps-3.2.3/FAQ
root 12603 0.0 0.2 2992 444 pts / 0 S + 22:08 0:00 grep clamd

8. Restarted the machine about to start testing it!
[root @ mail ~] # tail-f / var / log / maillog
Send a message to start the test can be found in the log to the following:
Aug 31 22:23:18 mail MailScanner [2600]: Using locktype = flock
Aug 31 22:23:18 mail MailScanner [3338]: Using SpamAssassin results cache
Aug 31 22:23:18 mail MailScanner [3338]: Connected to SpamAssassin cache database
Aug 31 22:23:18 mail MailScanner [3338]: Enabling SpamAssassin auto-whitelist functionality ...
Aug 31 22:23:33 mail MailScanner [2709]: Using locktype = flock
Aug 31 22:23:36 mail MailScanner [3264]: Using locktype = flock
Aug 31 22:23:38 mail MailScanner [3336]: Using locktype = flock
Aug 31 22:23:39 mail MailScanner [3338]: Using locktype = flock
Aug 31 22:24:13 mail pop3-login: Login: leeki.yan [:: ffff: 10.0.0.25]
Aug 31 22:25:39 mail postfix / smtpd [3345]: connect from unknown [10.0.0.25]
Aug 31 22:25:39 mail postfix / smtpd [3345]: C38C71702CA: client = unknown [10.0.0.25]
Aug 31 22:25:40 mail postfix / cleanup [3348]: C38C71702CA: hold: header Received: from ts (unknown [10.0.0.25])?? By mail.centos.eb.cn (Postfix) with SMTP id C38C71702CA? ? for ; Fri, 31 Aug 2007 22:25:39 +0800 (CST) from unknown [10.0.0.25]; from = to = proto = SMTP helo =
Aug 31 22:25:40 mail postfix / cleanup [3348]: C38C71702CA: message-id = <001901c7ebdb $ f70f9ff0 $ 1900000a @ triumph>
Aug 31 22:25:40 mail postfix / smtpd [3345]: disconnect from unknown [10.0.0.25]
Aug 31 22:25:43 mail MailScanner [3264]: New Batch: Scanning 1 messages, 934 bytes
Aug 31 22:25:59 mail pop3-login: Login: leeki.yan [:: ffff: 10.0.0.25]
Aug 31 22:25:59 mail MailScanner [3264]: Virus and Content Scanning: Starting
Aug 31 22:26:14 mail MailScanner [3264]: Requeue: C38C71702CA.8937F to 14A741702E8
Aug 31 22:26:14 mail MailScanner [3264]: Uninfected: Delivered 1 messages
Aug 31 22:26:14 mail postfix / qmgr [2579]: 14A741702E8: from = , size = 1212, nrcpt = 1 (queue active)
Aug 31 22:26:14 mail postfix / local [3361]: 14A741702E8: to = , relay = local, delay = 35, status = sent (delivered to maildir)
Aug 31 22:26:14 mail postfix / qmgr [2579]: 14A741702E8: removed
Aug 31 22:28:29 mail pop3-login: Login: leeki.yan [:: ffff: 10.0.0.25]
From the above we can see the log, MailScanner has begun to play a role!

9. MailScanner.conf another configuration file other parameters Description:
a. use mailscanner with letters automatically add this content:
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean
The abolition of such a set method: vi / etc / MailScanner / MailScaner.conf
Sign Clean Messages = yes
Change
Sign Clean Messages = no
b. from the Internet to find a translated Chinese documents report, after warning the event will be made in Chinese warning information;
mv cn /etc/MailScanner/reports即可
/ etc / MailScanner / reports / en
Because some Chinese do not have all the LOG error:
Methods:
cd / etc / MailScanner / reports / cn
cp .. / en / * .. / cn
When prompted coverage, the election can be n!
c. do not set up to scan the area:
Edit / etc / MailScanner / MailScanner.conf documents
Modification Is Definitely Not Spam = / etc / MailScanner / rules / spam.whitelist.rules
vi / etc / MailScanner / rules / spam.whitelist.rules
Join the From: * @ centos.eb.cn yes # centos.eb.cn is a local domain name
Restart MailScannerl.
In / etc / mail / spamassassin / local.cf added inside whitelist_from * @ trinet.com.cn
This e-mail sent out will not be marked as spam, but it has been checked, I would like to ask, the distinction between these two settings there?
A: The settings whitelist_from, actually spam or check will be conducted, whitelist_from Score regard is that at -100
The tag set is not directly spam.whitelist.rules spam, spam is no longer to carry out inspections.
d.
Max Children = 5 #
This is the process of setting MailScanner, and if your computer if not strong, it is recommended you set up a small value, because the cost comparison MailScanner
Source, especially memory
e.Virus Scanner Timeout = 30 # virus killing software scans your e-mail, the longest period
f.Find Phishing Fraud = yes # whether or not to open e-mail anti-phishing detection
g.
Filename Rules =% etc-dir% / filename.rules.conf
Filetype Rules =% etc-dir% / filetype.rules.conf # these two parameters used to set up your e-mail system can receive or send the name of the annex to which
h.
Max SpamAssassin Size = 1024k # set spamassassin to scan only the largest number of e-mail
i:
Syslog Facility = mail
Log Speed = no
Log Spam = no
Log Non Spam = no
Log Permitted Filenames = no
Log Permitted Filetypes = no
Log Silent Viruses = no
Log Dangerous HTML Tags = no # These parameters are set above MailScanner logs in maillog record relevant information. If your computer if not strong, I suggest you no right or election.




10. Mailscanner-mrtg installation to monitor the flow of messages;
[root @ mail tmp] # wget http://nchc.dl.sourceforge.net/sourceforge/mailscannermrtg/mailscanner-mrtg-0.10.00-1.noarch.rpm
[root @ mail tmp] # rpm-ivh mailscanner-mrtg-0.10.00-1.noarch.rpm
warning: mailscanner-mrtg-0.10.00-1.noarch.rpm: V3 DSA signature: NOKEY, key ID e342f442
error: Failed dependencies:
mrtg> = 2.9 is needed by mailscanner-mrtg-0.10.00-1.noarch
Suggested resolutions:
/ home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/mrtg-2.10.15-1.i386.rpm
The above error appears, this is dependent on the causes of packet, then install mrtg, and then install mailscanner-mrtg
[root @ mail tmp] # yum-y install mrtg
Dependencies Resolved
================================================== ===========================
Package Arch Version Repository Size
================================================== ===========================
Installing:
mrtg i386 2.10.15-1 base 914 k
Installing for dependencies:
gd i386 2.0.28-5.4E base 119 k
Transaction Summary
================================================== ===========================
Install 2 Package (s)
Update 0 Package (s)
Remove 0 Package (s)
Total download size: 1.0 M
Downloading Packages:
(1 / 2): gd-2.0.28-5.4E.i38 100% |=========================| 119 kB 02:48
(2 / 2): mrtg-2.10.15-1.i38 100% |=========================| 914 kB 13:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: gd ######################### [1 / 2]
Installing: mrtg ######################### [2 / 2]
Installed: mrtg.i386 0:2.10.15-1
Dependency Installed: gd.i386 0:2.0.28-5.4 E
Complete!
Re-install mailscanner-mrtg, found can be installed, see the following:
[root @ mail tmp] # rpm-ivh mailscanner-mrtg-0.10.00-1.noarch.rpm
warning: mailscanner-mrtg-0.10.00-1.noarch.rpm: V3 DSA signature: NOKEY, key ID e342f442
Preparing ... ########################################### [100% ]
1: mailscanner-mrtg ########################################### [100 %]
Running MRTG to get your initial graphs (Could be slow)
Stopping httpd: [FAILED]
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[OK]

Note: in mailscanner-mrtg installed, it was found inside the maillog below the total reported errors;
Oct 25 15:20:02 mailgate MailScanner-MRTG [5072]: ERROR: Snmpwalk Binary
specified in / etc / MailScanner / mailscanner-mrtg.conf is not executable
or not present. Maybe you need to install the snmp or snmp-utils
packages. See the README.SNMP file in the docs. - Skipping snmp
functions
Oct 25 15:20:02 mailgate MailScanner-MRTG [5072]: Unable to find a
mountpoint for / var / spool. Please set Spool Directory in mailscanner -
mrtg.conf to a valid mountpoint. You can see a list of mointpoints on
your system by using the df command.
Oct 25 15:20:02 mailgate MailScanner-MRTG [5072]: Unable to find a
mountpoint for / var / spool / MailScanner / incoming. Please set MailScanner
Work Directory in mailscanner-mrtg.conf to a valid mountpoint. You can
see a list of mointpoints on your system by using the df command

Error detection of the above: (because there is no snmp package installed, the CPU, MEM, such as for the empty icon)
vi / etc / Mailscanner / mailscanner-mrtg.conf
Shall
Use SNMP = yes
Snmpwalk Binary = / usr / bin / snmpwalk
MailScanner Work Directory = / var / spool / MailScanner / incoming
Spool Directory = / var / spool
Amended to read:
# Use SNMP = yes
# Snmpwalk Binary = / usr / bin / snmpwalk
MailScanner Work Directory = /
Spool Directory = /


11. Apache configuration and self-starting mailscanner-mrtg parameters Laws (on an article is already installed apache)
[root @ mail tmp] # chkconfig httpd on
[root @ mail tmp] # vi / etc / MailScanner / mailscanner-mrtg.conf
MTA = sendmail
MTA = postfix

Incoming Queue Dir = / var / spool / mqueue.in / # Sendmail
Incoming Queue Dir = / var / spool / postfix / hold / # Postfix

Outgoing Queue Dir = / var / spool / mqueue / # Sendmail
Outgoing Queue Dir = / var / spool / postfix / incoming / # Sendmail

Interfaces to Monitor = eth0 (this parameter as the case may be modified, use ifconfig-a check before making a decision)
For example, no need to modify the machine on! See the following: blue font
[root @ mail tmp] # ifconfig-a
eth0 Link encap: Ethernet HWaddr 00: C0: A8: F5: 06: CD
inet addr: 10.6.6.111 Bcast: 10.255.255.255 Mask: 255.0.0.0
inet6 addr: fe80:: 2c0: a8ff: fef5: 6cd/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 5950 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 3547 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 1000
RX bytes: 1585146 (1.5 MiB) TX bytes: 463239 (452.3 KiB)
Click to restart the apache service, and then in the browser, type http:// the IP address of the mail server / mailscanner-mrtg / traffic plans will be able to see the!


12. Other settings;
a. Automatic Updates settings Virus database:
[root @ mail tmp] # vi / etc / freshclam.conf
Increase: LogFileMaxSize 2M
Will be # PidFile / var / run / freshclam.pid
Changed to: PidFile / var / run / freshclam.pid
[root @ mail tmp] # crontab-e
0 * / 12 * * * / usr / bin / freshclam - quiet-l / var / log / clamav / freshclam.log table updates every 12 hours the first time

b. set up spamassassin, support Chinese CCERT spam filtering rule sets and automatic update
[root @ mail tmp] # wget-N-P / usr / share / spamassassin www.ccert.edu.cn / spam / sa / Chinese_rules.cf
[root @ mail tmp] # crontab-e
Copy the following line to the inside, automatically update the rules
0 0 1 * * wget-N-P / usr / share / spamassassin www.ccert.edu.cn / spam / sa / Chinese_rules.cf; / etc / rc.d / init.d / spamassassin restart
# Sa-learn - sync-D-p user_prefs (Learning System)
# sa-learn - dump all (see the data from the study)


13. This anti-virus anti-spam features have been achieved, do not pay particular attention to one thing:
MailScanner.conf in which a parameter
Original value: SpamAssassin Local Rules Dir =
Many online references for this parameter is set to the document:
SpamAssassin Local Rules Dir = / etc / MailScanner
I recommend not setting this parameter, because I found the installation time, in accordance with the relevant Gateway set-line, the e-mail all the cards in the queue, the total weight of the log in the following information is reported, but no error message, depressed ah !
Aug 25 22:58:27 mail MailScanner [5619]: Using SpamAssassin results cache
Aug 25 22:58:27 mail MailScanner [5619]: Connected to SpamAssassin cache database
Aug 25 22:58:27 mail MailScanner [5619]: Enabling SpamAssassin auto-whitelist functionality ...
Aug 25 22:58:30 mail MailScanner [5620]: MailScanner E-Mail Virus Scanner version 4.62.9 starting ...
Aug 25 22:58:30 mail MailScanner [5620]: Read 794 hostnames from the phishing whitelist
Aug 25 22:58:30 mail MailScanner [5620]: SpamAssassin temporary working directory is / var / spool / MailScanner / incoming / SpamAssassin-Temp
Aug 25 22:58:32 mail MailScanner [5620]: Using SpamAssassin results cache
Aug 25 22:58:32 mail MailScanner [5620]: Connected to SpamAssassin cache database
Aug 25 22:58:32 mail MailScanner [5620]: Enabling SpamAssassin auto-whitelist functionality ...
Aug 25 22:58:35 mail MailScanner [5626]: MailScanner E-Mail Virus Scanner version 4.62.9 starting ...
Aug 25 22:58:35 mail MailScanner [5626]: Read 794 hostnames from the phishing whitelist
Aug 25 22:58:36 mail MailScanner [5626]: SpamAssassin temporary working directory is / var / spool / MailScanner / incoming / SpamAssassin-Temp

See queue found: whether or receive letters, e-mail all the cards in the queue: the tests made and received, will be stuck in the queue in
[root @ mail incoming] # mailq
-Queue ID-- Size - ---- Arrival Time ---- -Sender/Recipient-------
695912341DA! 5535 Sat Aug 25 22:55:59 root@centos.eb.cn
root@centos.eb.cn

07D6B2341D8! 11042 Sat Aug 25 22:34:34 leeki.yan @ centos.eb.cn
leeki.yan @ centos.eb.cn

BEEBD2341D9! 2085 Sat Aug 25 23:00:58 leeki.yan @ centos.eb.cn
leeki.yan @ centos.eb.cn

- 18 Kbytes in 3 Requests.

0 评论:

发表评论