Use AMAVISD-NEW + SOPHOS to scan mail viruses

Source: Internet
Author: User
Article Title: Using AMAVISD-NEW + SOPHOS to scan mail viruses. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   Note:
1. My POSTFIX is included in the installation system, so I didn't introduce its installation method, so I hope it will not be troublesome.
2. SOPHOS is a commercial software. If it is used for commercial purposes, you need to pay for it ......
3. the email server configuration is troublesome. Please do not expect this article to be available in one step. I can only wish you good luck ~
  
######################################## #############
#
# --------------------------- Sophos anti-VIRUS
#
######################################## #############
: Http://www.sophos.com, download a little trouble, you have to fill out the form.
For example, extract the package to/usr/tmp/sav-install/
Create
-Create a user group and a user named "sweep". You can also use other names to run anti-virus software.
-Installation:
/Usr/tmp/sav-install/install. sh
This is basically usable.
  
######################################## #############
#
# ------------------------- AMAVISD-NEW
#
######################################## #############
  
DOWNLOAD:
Http://www.ijs.si/software/amavisd/#download
Decompress the package. Assume that the package is decompressed to the/usr/tmp/amavisd/directory.
  
INSTALL:
  
1. Install PERL MODULES
========================================================== ==========
(Perl version 5.005 or later is required)
Check the INSTALL in the installation package. Generally, all the listed MODULES must be installed:
Quote:
--------------------------------------------------------------------------------
Archive: Tar (Archive-Tar-x.xx)
Archive: Zip (Archive-Zip-x.xx)
Compress: Zlib (Compress-Zlib-x.xx)
Convert: TNEF (Convert-TNEF-x.xx)
Convert: UUlib (Convert-UUlib-x.xxx)
MIME: Base64 (MIME-Base64-x.xx)
MIME: Parser (MIME-Tools-x.xxxx)
(The patched MIME-tools by David F. Skoll is recommended over 5.411,
As it better handles broken/bad MIME syntax:
Http://www.mimedefang.org/-> Download section)
Mail: Internet (MailTools-1.58 or later have workarounds for Perl 5.8.0 bugs)
Net: Server (Net-Server-x.xx)
Net: SMTP (libnet-x.xx)
Digest: MD5. (Digest-MD5-x.xx)
IO: Stringy (IO-stringy-x.xxx)
Time: HiRes (Time-HiRes-x.xx)
Unix: Syslog (Unix-Syslog-x.xxx)
Mail: SpamAssassin
--------------------------------------------------------------------------------
   Installation Method:
Method 1 (relatively simple)
Install SHELL first
# Perl-MCPAN-e shell
>
Then you can install
For example, install Net: SMTP,
> Install Net: SMTP
  
Method 2 (complicated)
Here: http://www.perl.com/CPAN-local/modu...ules.index.html
Download the related installation software package and decompress and install it one by one.
  
2. Install AMAVISD-NEW
========================================================== ==========
-Create a user group and a user named amaivs. You can also use other names to run AMAVISD.
  
-Create the/var/amavis directory, change the owner to amavis, and change the Directory attribute to 750, that is:
Mkdir/var/amavis
Chown amavis: amavis/var/amavis
Chmod 750/var/amavis
  
-Copy/usr/tmp/amavisd to/usr/local/sbin/, set the attribute to 755, and set everyone to root.
  
-Copy/usr/tmp/amavisd. conf to/etc/, set the attribute to 755, and set everyone to root.
  
-Create the/var/virusmails/directory, set the attribute to 750, and set all people and groups to amavis.
  
-Edit/etc/amavisd. conf based on local conditions, which is mainly the variable settings in Section I, for example:
$ Daemon_group, $ daemon_user, $ MYHOME, $ TEMPBASE, $ QUARANTINEDIR, $ mydomain
  
-In Section VII of the/etc/amavisd. conf file, if the "clamav" option is commented out by "#", remove the annotator.
  
-Use the "debug" attribute to start amavisd and check whether the system has any error message:
/Usr/local/sbin/amavisd debug
  
-If it is normal, you can use "/usr/local/sbin/amavisd stop/start" to close and open the service.
2. Use POSTFIX
========================================================== ==========
-Edit/etc/postfix/master. cf and add:
Smtp-amavis unix--y/n-2 smtp
-O smtp_data_done_timeout = 1200
-O disable_dns_lookups = yes
  
127.0.0.1: 10025 inet n-y/n-smtpd
-O content_filter =
-Edit/etc/postfix/main. cf and add:
Content_filter = smtp-amavis: [127.0.0.1]: 10024
  
-Make sure that AMAVISD is enabled and restart POSTFIX:
Postfix reload
  
At this time, if the installation is successful, the mail system will already have the anti-virus function. You can send a letter with a virus to test the content of the mail:
X5O! P % @ AP [4 \ PZX54 (P ^) 7CC) 7 }$ EICAR-STANDARD-ANTIVIRUS-TEST-FILE! $ H + H *
  
   Additional instructions
========================================================== ==========
-By default, all toxic and junk emails detected by the system are archived under/var/viursmails /.
-To disable the anti-virus function, you only need to comment out content_filter = smtp-amavis: [127.0.0.1]: 10024 in/etc/postfix/main. cf.
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.