AVG Antivirus For Linux/FreeBSD Plus Postfix Mail Server
|
Submitted by dervis (Contact Author) (Forums) on Mon, 2012-01-23 17:52. :: Anti-Spam/Virus | Linux | Email | Postfix | FreeBSD
AVG Antivirus For Linux/FreeBSD Plus Postfix Mail ServerThis document describes how to deploy AVG Antivirus for Linux/FreeBSD to a Postfix mail server. It is usable for AVG version 8.5, 10 and 2012.
Requirements1) Linux or FreeBSD x86 or x86_64 with x32 compatible libraries. (See /opt/avg/av/doc/README.)
Installation1) Download correct package from AVG site: Trial: http://www.avg.com/cz-cs/download.prd-trialb NOTE: Trial/full package contains Antispam module. Later migration from free to full is possible. 2) Install package according to your distribution. Examples: Installation from RPM (Linux only): # rpm -i avg2012lms-r{release}-a{vdb version}.{architecture}.rpm Installation from .deb (Linux only): # dpkg -i avg2012lms-r{release}-a{vdb version}.{architecture}.deb Installation from sh (Linux only):
# chmod +x avg2012lms-r{release}-a{vdb version}.{architecture}.sh Installation from .tar.gz:
# tar xzvf avg2012{edition}-r{release}-a{vdb version}.{architecture}.tar.gz
RegistrationYou can register AVG for Linux/FreeBSD during installation from sh or tar.gz, or later using command: # avgctl --register 'your license number' NOTE: Free version is registered automatically during instalation, trial license is available at /opt/avg/av/doc/README.
Integration AVG To Postfix1) Edit /etc/postfix/main.cf file. Add lines for content filter avgtcpd: content_filter = avgtcpd:localhost:54321 receive_override_options = no_address_mappingsNOTE: The socket address 'localhost:54321' is by default. 2) Edit /etc/postfix/master.cf file: Add lines for service avgtcpd (from Postfix to AVG): # ===================================================================
# service type private unpriv chroot wakeup maxproc command
# (yes) (yes) (yes) (never) (100)
# ===================================================================
avgtcpd unix - - y/n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
Change the 'y/n' to either 'y' or 'n'. Check your regular smyp and smtpd service. Add lines for client service (back to Postfix): # ===================================================================
# service type private unpriv chroot wakeup maxproc command
# (yes) (yes) (yes) (never) (100)
# ===================================================================
localhost:10025 inet n - n - 10 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
For Postfix of version 2.3 and later, add option no_milters to item receive_override_options: -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks, no_milters NOTE: The socket address 'localhost:10025' is by default. 3) Configuring avgtcpd service Configuration is out-of-the-box, it works at all after integration. If you need to change some specific parameters use utility avgcfgctl. For example if you need write configuration use: avgcfgctl -w 'parameter=value' For more details see man page of avgcfgctl.
Useful AVG parameters:For settings: Default.setup.features.tcpd=true This item enables/disables whole email functions. Default.tcpd.smtp.enabled=true This item enables/disables smtp functions (Postfix related). Default.tcpd.milter.enabled=false For milter library - must be disabled if smtp options is enabled.
Default.tcpd.smtp.address=127.0.0.1 This parameters defines address and port for AVG server service.
Default.tcpd.smtp.client_address=127.0.0.1 This parameters defines address and port for Postfix client service.
Default.tcpd.smtp.limiter_start=220 This items controls active connections. Default.tcpd.smtp.read_buffer=102400 SMTP read buffer size. Tcpd.scan.Options.ArchiveLevel=256 It defines the level of processing archive files.Values:
Tcpd.scan.Options.DetectCookies=false This enables/disables detection of cookies.
Tcpd.scan.Options.DetectPup2=false This enables/disables detection of Potentially Unwanted Programs. Tcpd.scan.Options.UseHeuristics=true Use heuristic during scan. Tcpd.scan.Options.MaxFileSize=268435456 This item defines maximal size of extracted archive. Tcpd.scan.Options.MaxNumberOfFiles=50000 This item defines maximal count of extracted files. Tcpd.scan.Options.MaxRecursionDepth=40 Maximal level of recursion for archive.
Tcpd.scan.mail.strip.alldoc=false Enables detection of defined attachments. For basic Anti-spam configuration: Default.tcpd.spam.enabled=true Enables/disables Anti-spam function. Default.tcpd.spam.header.enabled=true This item adds "AVG Anti-spam header" to mail. Default.tcpd.spam.phish_subj_prefix=[PHISHING] This item adds prefix to subject - mail with phishing. Default.tcpd.spam.spamscore_level=90 This item sets score for Spam identification (less means more spam). Default.tcpd.spam.subj_prefix=[SPAM] This item adds prefix to subject - mail with spam. Other actions: Default.tcpd.parsing.mime_certification_enabled=false It enables/disables AVG certification in body of email.
Default.tcpd.rules.virus.action=0 This items defines action for each detected message. Values:
Default.tcpd.rules.virus.bounce_addr= There is defined adress for BOUNCE action. Default.tcpd.scan.header.enabled=true This parameter adds "AVG Anti-virus header" to mail. Default.tcpd.scan.subj_prefix=[VIRUS] This item adds prefix to subject - mail with virus. NOTE: For other parameters see avgtcpd and avgspamd man page!
|



Recent comments
23 hours 5 min ago
1 day 8 hours ago
1 day 9 hours ago
1 day 12 hours ago
1 day 17 hours ago
1 day 17 hours ago
1 day 19 hours ago
2 days 5 hours ago
2 days 10 hours ago
2 days 12 hours ago