Part II: Anti-virus, Spam: CLAMAV + AMAVISD-New + SPAM

zhaozj2021-02-16  92

Part II: Anti-Virus, Spam: clamav amavisd-new spam welcome to repost this article, but you want to keep the following copyright information: Author: llzqq Source: www.chinaunix.net Contact: llzqq@126.com 1. 0 Installing Clamav: # cd / usr / ports / security / clamav # make install # make clean # vi /usr/local/etc/clamav.conf ================== ============= clamav.conf ===================================== # Comment Or Remove the Line below. # Example LogFile /var/log/clamav/clamd.log LogFileMaxSize 1M LogTime LogVerbose PidFile /var/run/clamav/clamd.pid DataDirectory / usr / local / share / clamav LocalSocket / tmp / clamd StreamMaxLength 10M MaxThreads 10 MaxDirectoryRecursion 15 User clamav ScanMail ScanArchive ScanRAR ArchiveMaxFileSize 10M ArchiveMaxRecursion 5 ArchiveMaxFiles 1000 ClamukoScanOnOpen ClamukoScanOnClose ClamukoScanOnExec ClamukoIncludePath / var / spool / virtual ClamukoMaxFileSize 6M ClamukoScanArchive ========================== ===== clamav.conf ============================ 1.1 update virus definitions # / usr / local / etc / rc. D / CLAMAV-FRESHCLAM.SH Start 2.0 Install Amavisd-New # CD / USR / ports / security / Amavisd-new # make install # make clean # cd / usr / local / etc # mv Amavisd.conf-dist Amavisd.conf # vi amavisd.conf ============ ==

================ amavisd.conf ================================ $ MyHome = '/ var / amavis'; # (default is '/ var / amavis') $ mydomain = 'Nero.3322.org'; # (no useful default) $ daemon_user = 'vscan'; # (no default; customary: vscan or amavis) $ daemon_group = 'vscan'; # (no default; customary: vscan or amavis) $ log_level = 0; $ sa_spam_subject_tag = '*** SPAM ***' $ virus_admin = "root / @ $ mydomain "; $ spam_admin =" llzqq / @ $ mydomain "; $ mailfrom_notify_admin =" llzqq / @ $ mydomain "; $ mailfrom_notify_recip =" llzqq / @ $ mydomain "; $ mailfrom_notify_spamadmin =" llzqq / @ $ mydomain "; $ inet_socket_bind = ' 127.0.0.1 '; $ forward_method =' smtp: 127.0.0.1: 10025 '; $ notify_method = $ forward_method; $ inet_socket_port = 10024; $ max_servers = 2; [' Clam Antivirus-clamd ', / & ask_daemon, [ "CONTSCAN {} / N ", '/ TMP / CLAMD'], QR / / BOK $ /, QR / / BFOUND $ /, QR /^ (. *) Found $ /], == ============================ amavisd.conf ================================================================================================================================================================================================= ============ 2.1 To start ClamAV and Amavisd-New, you need to configure / etc / rc. Conf # vi /etc/rc.conf spamd_enable = "yes" amavisd_enable = "

YES CLAMAV_CLAMD_ENABLE = "YES" 3.0 Since Spamassassin is installed together to configure the following to configure filter rules: # cd / usr / local / etc / mail / spamassassin # env lang = c vi local. Cf =============================== ===================== ================ # spamassassin config file for version x.xx # generated by http://www.yrex.com/spam/spamconfig.php (Version 1.01) # How Many hits before a message is considered spam. required_hits 4.0 # Whether to change the subject of suspected spam rewrite_subject 1 # Text to prepend to subject if rewrite_subject is used subject_tag ***** SPAM ***** # Encapsulate spam in an attachment report_safe 1 # Use terse version of the spam report use_terse_report 0 # Enable the Bayes system use_bayes 1 # Enable Bayes auto-learning auto_learn 1 # Enable or disable network checks skip_rbl_checks 1 use_razor2 0 use_dcc 0 use_pyzor 0 # Mail using languages ​​used in these country codes will Not be mar marked # as being possibly spam in a foreign language. # - chinese english ok_languages ​​zh en # Mail using locales used in these country codes will not be marked # as being possibly spam in a foreign language ok_locales en zh score SUBJ_FULL_OF_8BITS 2 score NO_REAL_NAME 4.0 ============. =================== ival.cf ==================

转载请注明原文地址:https://www.9cbs.com/read-14444.html

New Post(0)