Amavisd updating

So remove comment "#" character and change socket path into /tmp/clamd on the lines below in

These lines starts with #cd /usr/local/src #groupadd clamav #useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav #tar -zxf clamav-0.88.2gz #cd clamav-0.88.2 #./configure --sysconfdir=/etc #make #make install #mkdir /var/lib/clamav #chown clamav:clamav /var/lib/clamav Clamav is installedl Lets make a test to see how clamav is working.

We are doing our test under /usr/local/clamav-88.2 directory which contains sample virus-like files. #/usr/local/bin/clamscan -r -l /usr/local/clamav-0.88.2 Edit /etc/and modify variables like below; #Example Log File /tmp/Database Directory /var/lib/clamav User amavis UPDATING CLAMAV VIRUS DATABASE Every second a new virus/worm is created, we must update our virus database. Before running freshclam edit file and modify the line "Example" like below.

(Put # in front of it) #Example No create necessary log file and run freshclam; #touch /var/log/#chmod 600 /var/log/#chown amavis /var/log/#/usr/local/bin/freshclam --datadir=/var/lib/clamav -l /var/log/CLAMAV IN CRONTAB Create a crontab entry so that clamav will update its database everyday at regularly.

(in reply to end of DATA command))(host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=07106-07, quar notif FAILED: temporarily unable to quarantine: 451 4.5.0 Local delivery(1) to /etc/amavisd/quarantine/spam-30fdce5ac4b70ac9e958f8bfc3ca6189-20170622T113406-lt R0xhnb Grcl failed: Can't create file /etc/amavisd/quarantine/spam-30fdce5ac4b70ac9e958f8bfc3ca6189-20170622T113406-lt R0xhnb Grcl: Read-only file system at (eval 131) line 203., id=07106-07 at /usr/sbin/amavisd line 17592.

(in reply to end of DATA command))Hi Zhang,thank you.

Note Because of this setup, it is quite easily possible, to have these 3 mail 'handlers' on 3 different hosts.It could be possible to have the primary mailserver, that listens on port 25 on the firewall, have it forward to a safe isolated server running only amavis and have amavis sent mail to an internal postfix server where it delivers mail to the mail storage.perl -MCPAN -e shell install Archive:: Tar install Archive:: Zip install Compress:: Zlib install Convert:: UUlib install MIME:: Base64 install Mail:: Internet install Net:: Server install Net:: SMTP install Digest:: MD5 install IO:: Stringy install Time:: Hi Res install Unix:: Syslog install Berkeley DB install MIME:: Tools install Convert:: TNEF b) Create user account and home directory of amavis #mkdir /var/amavis #groupadd amavis #useradd amavis -g amavis -d /var/amavis -s /bin/bash #chmod 750 /var/amavis #mkdir /var/amavis/tmp #mkdir /var/amavis/db #chown -R amavis:amavis /var/amavis c) Install amavisd-new #cd /usr/local/src #tar -zxf amavisd-new-2.4.0gz #cd amavisd-new-2.4.0 #cp amavisd /usr/local/sbin #chown root /usr/local/sbin/amavisd #chmod 755 /usr/local/sbin/amavisd #cp /etc #chown root /etc/#chmod 644 /etc/#mkdir /var/virusmails #chmod 750 /var/virusmails/ #chown amavis /var/virusmails/ d) Edit /etc/file and adjust variables as below (If you haven't used the above scheme for directory structure, you will also need to change more variables than below) $mydomain = 'test.com'; $daemon_user = 'amavis'; $daemon_group = 'amavis'; $final_virus_destiny = D_REJECT; $final_banned_destiny = D_PASS; $final_spam_destiny = D_PASS; $final_bad_header_destiny = D_PASS; $warnvirussender = 1; $virus_admin = "genco\@$mydomain"; $mailfrom_notify_admin = "genco\@$mydomain"; $mailfrom_notify_recip = "genco\@$mydomain"; $mailfrom_notify_spamadmin = "NOSPAMMER\@$mydomain"; $sa_tag2_level_deflt = 5; e) You can set many virus scanners in file but we are going to use only clamav.If you create a file, it will be loaded after is loaded.This is the supported method for doing customizations of Spam Assassin for ZCS 8.

Leave a Reply