Home > Linux > document > 正文

linux postfix check amavisd service

1.安装amavisd
2.配置amavisd.conf(关联Spamassassin和clamav)
否则不能启动amavisd服务
3.配置postfix 关联调用 amavisd
4.重新加载postfix
下面是配置的详细日志:
[root@mail ~]# dnf info python
Last metadata expiration check performed 0:39:08 ago on Tue May  3 21:16:54 2016.
Installed Packages
Name        : python
Arch        : i686
Epoch       : 0
Version     : 2.7.9
Release     : 6.fc22
Size        : 77 k
Repo        : @System
From repo   : koji-override-0
Summary     : An interpreted, interactive, object-oriented programming language
URL         : http://www.python.org/
License     : Python
Description : Python is an interpreted, interactive, object-oriented programming
: language often compared to Tcl, Perl, Scheme or Java. Python includes
: modules, classes, exceptions, very high level dynamic data types and
: dynamic typing. Python supports interfaces to many system calls and
: libraries, as well as to various windowing systems (X11, Motif, Tk,
: Mac and MFC).
:
: Programmers can write new built-in modules for Python in C or C++.
: Python can be used as an extension language for applications that need
: a programmable interface.
:
: Note that documentation for Python is provided in the python-docs
: package.
:
: This package provides the "python" executable; most of the actual
: implementation is within the "python-libs" package.
Available Packages
Name        : python
Arch        : i686
Epoch       : 0
Version     : 2.7.10
Release     : 8.fc22
Size        : 93 k
Repo        : updates
Summary     : An interpreted, interactive, object-oriented programming language
URL         : http://www.python.org/
License     : Python
Description : Python is an interpreted, interactive, object-oriented programming
: language often compared to Tcl, Perl, Scheme or Java. Python includes
: modules, classes, exceptions, very high level dynamic data types and
: dynamic typing. Python supports interfaces to many system calls and
: libraries, as well as to various windowing systems (X11, Motif, Tk,
: Mac and MFC).
:
: Programmers can write new built-in modules for Python in C or C++.
: Python can be used as an extension language for applications that need
: a programmable interface.
:
: Note that documentation for Python is provided in the python-docs
: package.
:
: This package provides the "python" executable; most of the actual
: implementation is within the "python-libs" package.
[root@mail ~]# service spamassassin status
Redirecting to /bin/systemctl status  spamassassin.service
?spamassassin.service - Spamassassin daemon
Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-05-03 21:18:00 CST; 42min ago
Main PID: 22103 (spamd)
CGroup: /system.slice/spamassassin.service
忖22103 /usr/bin/perl -T -w /usr/bin/spamd -c -m5 -H
忖22118 spamd child
忖22119 spamd child
May 03 21:18:00 mail systemd[1]: Started Spamassassin daemon.
May 03 21:18:00 mail systemd[1]: Starting Spamassassin daemon...
May 03 21:18:12 mail spamd[22103]: spamd: server started on IO::Socket::IP [127.0.0.1]:783 (running version 3.4.1)
May 03 21:18:12 mail spamd[22103]: spamd: server pid: 22103
May 03 21:18:12 mail spamd[22103]: spamd: server successfully spawned child process, pid 22118
May 03 21:18:12 mail spamd[22103]: spamd: server successfully spawned child process, pid 22119
May 03 21:18:12 mail spamd[22103]: prefork: child states: IS
May 03 21:18:12 mail spamd[22103]: prefork: child states: II
[root@mail ~]# /usr/lib
lib/     libexec/
[root@mail ~]# /usr/lib/systemd/system
system/                       systemd-cryptsetup            systemd-machine-id-commit     systemd-resolve-host          systemd-update-done
systemd                       systemd-fsck                  systemd-modules-load          systemd-rfkill                systemd-update-utmp
systemd-ac-power              systemd-hibernate-resume      systemd-networkd              systemd-shutdown              systemd-user-sessions
systemd-activate              systemd-hostnamed             systemd-networkd-wait-online  systemd-shutdownd             systemd-vconsole-setup
systemd-backlight             systemd-importd               systemd-pull                  systemd-sleep                 system-generators/
systemd-binfmt                systemd-initctl               systemd-quotacheck            systemd-socket-proxyd         system-preset/
systemd-bootchart             systemd-journald              systemd-random-seed           systemd-sysctl                system-shutdown/
systemd-bus-proxyd            systemd-localed               systemd-remount-fs            systemd-timedated             system-sleep/
systemd-cgroups-agent         systemd-logind                systemd-reply-password        systemd-timesyncd
systemd-coredump              systemd-machined              systemd-resolved              systemd-udevd
[root@mail ~]# /usr/lib/systemd/system/
anaconda.target.wants/           halt.target.wants/               local-fs.target.wants/           rescue.target.wants/             shutdown.target.wants/
basic.target.wants/              httpd.service.d/                 multi-user.target.wants/         runlevel1.target.wants/          sockets.target.wants/
courier-authlib.service.bak      httpd.socket.d/                  network-online.target.wants/     runlevel2.target.wants/          sysinit.target.wants/
dbus.target.wants/               initrd-switch-root.target.wants/ nfs.target.wants/                runlevel3.target.wants/          syslog.target.wants/
default.target.wants/            initrd.target.wants/             poweroff.target.wants/           runlevel4.target.wants/          timers.target.wants/
graphical.target.wants/          kexec.target.wants/              reboot.target.wants/             runlevel5.target.wants/
[root@mail ~]# co
cockpit-bridge            comm                      compiz-decorator-emerald  composite                 convert-dtsv0             coverage2
col                       command                   compiz-decorator-gtk      config_data               convertquota              coverage-2.7
colcrt                    compare                   compiz-manager            conjure                   coproc
colormgr                  compface                  compiz-mate-emerald       consolehelper             coredumpctl
colrm                     compgen                   compiz-mate-gtk           consoletype               courierauthconfig
column                    compile_et                complete                  continue                  courierlogger
combinedeltarpm           compiz                    compopt                   convert                   coverage
[root@mail ~]# courier
courierauthconfig  courierlogger
[root@mail ~]# dnf install amavisd-new
Last metadata expiration check performed 0:46:53 ago on Tue May  3 21:16:54 2016.
Package amavisd-new-2.10.1-4.fc22.noarch is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@mail ~]# service amavisd-new status
Redirecting to /bin/systemctl status  amavisd-new.service
?amavisd-new.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
[root@mail ~]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: http://www.ijs.si/software/amavisd/#doc
[root@mail ~]# service amavisd start
Redirecting to /bin/systemctl start  amavisd.service
Job for amavisd.service failed. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@mail ~]# dnf remove amavisd-new.noarch
Display all 1578 possibilities? (y or n)
[root@mail ~]# dnf remove amavisd-new
Dependencies resolved.
==========================================================================================================================================================================
Package                                              Arch                             Version                                    Repository                         Size
==========================================================================================================================================================================
Removing:
altermime                                            i686                             0.3.10-11.fc22                             @System                           130 k
amavisd-new                                          noarch                           2.10.1-4.fc22                              @System                           3.1 M
arj                                                  i686                             3.10.22-22.fc22                            @System                           390 k
cabextract                                           i686                             1.5-1.fc22                                 @System                            92 k
freeze                                               i686                             2.5.0-18.fc22                              @System                            46 k
lrzip                                                i686                             0.616-4.fc22                               @System                           472 k
lzop                                                 i686                             1.03-11.fc22                               @System                           102 k
nomarch                                              i686                             1.4-13.fc22                                @System                            28 k
p7zip                                                i686                             15.09-4.fc22                               @System                           2.0 M
p7zip-plugins                                        i686                             15.09-4.fc22                               @System                           2.5 M
pax                                                  i686                             3.4-21.fc22                                @System                           140 k
perl-Authen-SASL                                     noarch                           2.16-4.fc22                                @System                           103 k
perl-BerkeleyDB                                      i686                             0.55-1.fc22                                @System                           404 k
perl-Convert-ASN1                                    noarch                           0.27-2.fc22                                @System                           150 k
perl-Convert-BinHex                                  noarch                           1.123-3.fc22                               @System                           100 k
perl-Convert-TNEF                                    noarch                           0.18-3.fc22                                @System                            38 k
perl-Convert-UUlib                                   i686                             2:1.4-10.fc22                              @System                           375 k
perl-Crypt-OpenSSL-Bignum                            i686                             0.04-22.fc22                               @System                            69 k
perl-Crypt-OpenSSL-RSA                               i686                             0.28-11.fc22                               @System                            77 k
perl-Crypt-OpenSSL-Random                            i686                             0.06-5.fc22                                @System                            37 k
perl-DBD-SQLite                                      i686                             1.46-2.fc22                                @System                           419 k
perl-DB_File                                         i686                             1.835-1.fc22                               @System                           169 k
perl-Digest-HMAC                                     noarch                           1.03-9.fc22                                @System                            13 k
perl-Digest-SHA1                                     i686                             2.13-13.fc22                               @System                           100 k
perl-Email-Date-Format                               noarch                           1.005-1.fc22                               @System                            24 k
perl-Encode-Detect                                   i686                             1.01-16.fc22                               @System                           173 k
perl-File-LibMagic                                   i686                             1.00-4.fc22                                @System                            35 k
perl-File-Listing                                    noarch                           6.04-9.fc22                                @System                            17 k
perl-GSSAPI                                          i686                             0.28-13.fc22                               @System                           140 k
perl-Geo-IP                                          i686                             1.45-1.fc22                                @System                           285 k
perl-HTML-Parser                                     i686                             3.71-8.fc22                                @System                           223 k
perl-HTML-Tagset                                     noarch                           3.20-21.fc22                               @System                            19 k
perl-HTTP-Cookies                                    noarch                           6.01-9.fc22                                @System                            46 k
perl-HTTP-Date                                       noarch                           6.02-10.fc22                               @System                            20 k
perl-HTTP-Message                                    noarch                           6.11-1.fc22                                @System                           173 k
perl-HTTP-Negotiate                                  noarch                           6.01-9.fc22                                @System                            29 k
perl-IO-HTML                                         noarch                           1.001-2.fc22                               @System                            43 k
perl-IO-Multiplex                                    noarch                           1.16-1.fc22                                @System                            43 k
perl-IO-Socket-INET6                                 noarch                           2.72-3.fc22                                @System                            52 k
perl-IO-Socket-IP                                    noarch                           0.36-1.fc22                                @System                            95 k
perl-IO-Socket-SSL                                   noarch                           2.012-1.fc22                               @System                           481 k
perl-IO-stringy                                      noarch                           2.111-1.fc22                               @System                           126 k
perl-JSON                                            noarch                           2.90-3.fc22                                @System                           269 k
perl-LDAP                                            noarch                           1:0.65-1.fc22                              @System                           949 k
perl-LWP-MediaTypes                                  noarch                           6.02-6.fc22                                @System                            61 k
perl-MIME-Lite                                       noarch                           3.030-3.fc22                               @System                           245 k
perl-MIME-Types                                      noarch                           2.09-1.fc22                                @System                           145 k
perl-MIME-tools                                      noarch                           5.506-1.fc22                               @System                           508 k
perl-Mail-DKIM                                       noarch                           0.40-5.fc22                                @System                           306 k
perl-Mail-SPF                                        noarch                           2.9.0-5.fc22                               @System                           316 k
perl-MailTools                                       noarch                           2.14-1.fc22                                @System                           193 k
perl-NTLM                                            noarch                           1.09-9.fc22                                @System                            32 k
perl-Net-CIDR-Lite                                   noarch                           0.21-11.fc22                               @System                            27 k
perl-Net-DNS                                         i686                             0.83-1.fc22                                @System                           631 k
perl-Net-HTTP                                        noarch                           6.07-2.fc22                                @System                            53 k
perl-Net-LibIDN                                      i686                             0.12-19.fc22                               @System                            50 k
perl-Net-SMTP-SSL                                    noarch                           1.01-18.fc22                               @System                           4.5 k
perl-Net-SSLeay                                      i686                             1.68-1.fc22                                @System                           1.0 M
perl-Net-Server                                      noarch                           2.007-4.fc22                               @System                           514 k
perl-NetAddr-IP                                      i686                             4.075-3.fc22                               @System                           322 k
perl-Razor-Agent                                     i686                             2.85-18.fc22                               @System                           279 k
perl-Socket6                                         i686                             0.25-4.fc22                                @System                            49 k
perl-Sys-Syslog                                      i686                             0.33-311.fc22                              @System                            88 k
perl-Text-Soundex                                    i686                             3.04-294.fc22                              @System                            29 k
perl-Text-Unidecode                                  noarch                           1.23-1.fc22                                @System                           437 k
perl-TimeDate                                        noarch                           1:2.30-5.fc22                              @System                            98 k
perl-Unix-Syslog                                     i686                             1.1-19.fc22                                @System                            50 k
perl-WWW-RobotRules                                  noarch                           6.02-10.fc22                               @System                            26 k
perl-XML-Filter-BufferText                           noarch                           1.01-21.fc22                               @System                           6.1 k
perl-XML-NamespaceSupport                            noarch                           1.11-14.fc22                               @System                            28 k
perl-XML-SAX-Base                                    noarch                           1.08-12.fc22                               @System                           176 k
perl-XML-SAX-Writer                                  noarch                           0.53-7.fc22                                @System                            52 k
perl-libwww-perl                                     noarch                           6.13-1.fc22                                @System                           480 k
procmail                                             i686                             3.22-36.fc22                               @System                           347 k
spamassassin                                         i686                             3.4.1-2.fc22                               @System                           3.7 M
tmpwatch                                             i686                             2.11-6.fc22                                @System                            57 k
unzoo                                                i686                             4.4-16.fc22                                @System                            39 k
Transaction Summary
==========================================================================================================================================================================
Remove  77 Packages
Installed size: 24 M
Is this ok [y/N]: n
Operation aborted.
[root@mail ~]# dnf install amavisd-new
Last metadata expiration check performed 0:49:45 ago on Tue May  3 21:16:54 2016.
Package amavisd-new-2.10.1-4.fc22.noarch is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@mail ~]# free
total        used        free      shared  buff/cache   available
Mem:         357020      217208       60900          16       78912      111260
Swap:       2097148      406868     1690280
[root@mail ~]# vi /etc/amavisd.conf
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# vi /etc/amavisd/amavisd.conf
@                                      Documents/                             .pki/                                  .ssh2/
.bash_history                          Downloads/                             postfix.info                           .tcshrc
.bash_logout                           .ICEauthority                          postfix-policyd-spf-perl-2.010/        Templates/
.bash_profile                          .lesshst                               postfix-policyd-spf-perl-2.010.tar.gz  Videos/
.bashrc                                .local/                                Public/                                .viminfo
.cache/                                Maildir/                               .razor/                                .xsession-errors
.config/                               Music/                                 .rnd
.cshrc                                 .mysql_history                         sent
Desktop/                               Pictures/                              .ssh/
[root@mail ~]# vi /etc/amavisd/amavisd.conf
@                                      Documents/                             .pki/                                  .ssh2/
.bash_history                          Downloads/                             postfix.info                           .tcshrc
.bash_logout                           .ICEauthority                          postfix-policyd-spf-perl-2.010/        Templates/
.bash_profile                          .lesshst                               postfix-policyd-spf-perl-2.010.tar.gz  Videos/
.bashrc                                .local/                                Public/                                .viminfo
.cache/                                Maildir/                               .razor/                                .xsession-errors
.config/                               Music/                                 .rnd
.cshrc                                 .mysql_history                         sent
Desktop/                               Pictures/                              .ssh/
[root@mail ~]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
$log_level = 0;              # verbosity 0..5, -d
$log_recip_templ = undef;    # disable by-recipient level-0 log entries
$do_syslog = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';   # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
@local_domains_maps = ( [".$mydomain"] );  # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "/var/run/amavisd/amavisd.sock";  # amavisd-release or amavis-milter
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
virus_admin_maps => ["virusalert@$mydomain"],
spam_admin_maps  => ["virusalert@$mydomain"],
warnbadhsender   => 1,
# forward to a smtpd service providing DKIM signing service
forward_method => 'smtp:[127.0.0.1]:10027',
# force MTA conversion to 7-bit (e.g. before DKIM signing)
smtpd_discard_ehlo_keywords => ['8BITMIME'],
bypass_banned_checks_maps => [1],  # allow sending any file names and types
terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};
$interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
# Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
# (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
$policy_bank{'AM.PDP-SOCK'} = {
protocol => 'AM.PDP',
auth_required_release => 0,  # do not require secret_id for amavisd-release
};
$sa_tag_level_deflt  = 2.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.2;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.9;  # triggers spam evasive actions (e.g. blocks mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
$penpals_bonus_score = 8;    # (no effect without a @storage_sql_dsn database)
$penpals_threshold_high = $sa_kill_level_deflt;  # don't waste time on hi spam
$bounce_killer_score = 100;  # spam score points to add for joe-jobbed bounces
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000
# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
$virus_admin               = undef;                    # notifications recip.
$mailfrom_notify_admin     = undef;                    # notifications sender
$mailfrom_notify_recip     = undef;                    # notifications sender
$mailfrom_notify_spamadmin = undef;                    # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
"/etc/amavisd/amavisd.conf" 816L, 36778C written
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# useradd amavis
useradd: user 'amavis' already exists
[root@mail ~]# service amavisd start
Redirecting to /bin/systemctl start  amavisd.service
Job for amavisd.service failed. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@mail ~]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# netstat -naltup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      22103/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN      1537/perl
tcp        0      0 192.168.198.18:53       0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1238/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd
tcp        0      0 0.0.0.0:88              0.0.0.0:*               LISTEN      1253/nginx: master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1518/master
tcp        0      0 0.0.0.0:89              0.0.0.0:*               LISTEN      1183/httpd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      1221/opendkim
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      28199/svnserve
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 192.168.198.18:22       218.83.100.141:49490    ESTABLISHED 21927/sshd: root@pt
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd
tcp6       0      0 :::88                   :::*                    LISTEN      1253/nginx: master
tcp6       0      0 :::3306                 :::*                    LISTEN      1454/mysqld
udp        0      0 0.0.0.0:10000           0.0.0.0:*                           1537/perl
udp        0      0 192.168.198.18:53       0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:323           0.0.0.0:*                           660/chronyd
udp6       0      0 ::1:323                 :::*                                660/chronyd
[root@mail ~]# systemctl status amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: activating (start) since Tue 2016-05-03 22:10:03 CST; 2s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Control: 23155 (amavisd)
CGroup: /system.slice/amavisd.service
May 03 22:10:03 mail systemd[1]: Starting Amavisd-new is an interface between MTA and content checkers....
May 03 22:10:05 mail systemd[1]: amavisd.service: control process exited, code=exited status=255
May 03 22:10:05 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:10:05 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:10:05 mail systemd[1]: amavisd.service failed.
May 03 22:10:05 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:10:05 mail systemd[1]: Starting Amavisd-new is an interface between MTA and content checkers....
[root@mail ~]# cd /etc/init.d
[root@mail init.d]# ls
courier-authlib  courier-authlib.bak  functions  livesys  livesys-late  netconsole  network  README  webmin
[root@mail init.d]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2016-05-03 22:10:19 CST; 1min 41s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23190 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)
May 03 22:10:19 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:10:19 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:10:19 mail systemd[1]: amavisd.service failed.
May 03 22:10:19 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:10:19 mail systemd[1]: start request repeated too quickly for amavisd.service
May 03 22:10:19 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:10:19 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:10:19 mail systemd[1]: amavisd.service failed.
[root@mail init.d]# service amavisd stop
Redirecting to /bin/systemctl stop  amavisd.service
[root@mail init.d]# service amavisd start
Redirecting to /bin/systemctl start  amavisd.service
Job for amavisd.service failed. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@mail init.d]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2016-05-03 22:12:34 CST; 26ms ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23257 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)
May 03 22:12:34 mail systemd[1]: amavisd.service: control process exited, code=exited status=255
May 03 22:12:34 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:12:34 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:12:34 mail systemd[1]: amavisd.service failed.
May 03 22:12:34 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:12:34 mail systemd[1]: Starting Amavisd-new is an interface between MTA and content checkers....
[root@mail init.d]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2016-05-03 22:12:36 CST; 36s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23274 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)
May 03 22:12:35 mail systemd[1]: amavisd.service: control process exited, code=exited status=255
May 03 22:12:35 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:12:35 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:12:35 mail systemd[1]: amavisd.service failed.
May 03 22:12:36 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:12:36 mail systemd[1]: start request repeated too quickly for amavisd.service
May 03 22:12:36 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:12:36 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:12:36 mail systemd[1]: amavisd.service failed.
[root@mail init.d]# tail -f /var/log/
anaconda/             cron-20160501         dnf.rpm.log-20160405  httpd/                messages              samba/                spooler-20160501
audit/                cups/                 dnf.rpm.log-20160425  journal/              messages-20160411     secure                sssd/
boot.log              dnf.log               dovecot.log           lastlog               messages-20160417     secure-20160411       tallylog
btmp                  dnf.log-20160430      firewalld             lightdm/              messages-20160425     secure-20160417       tomcat/
btmp-20160501         dnf.log-20160501      freshclam.log         maillog               messages-20160501     secure-20160425       wtmp
chrony/               dnf.log-20160502      hawkey.log            maillog-20160411      nginx/                secure-20160501       Xorg.0.log
cron                  dnf.log-20160503      hawkey.log-20160425   maillog-20160417      php-fpm/              spooler               yum.log
cron-20160411         dnf.rpm.log           hawkey.log-20160428   maillog-20160425      pluto/                spooler-20160411
cron-20160417         dnf.rpm.log-20160212  hawkey.log-20160501   maillog-20160501      ppp/                  spooler-20160417
cron-20160425         dnf.rpm.log-20160303  hawkey.log-20160503   mariadb/              README                spooler-20160425
[root@mail init.d]# tail -f /var/log/a
anaconda/ audit/
[root@mail init.d]# tail -f /var/log/a
anaconda/ audit/
[root@mail init.d]# Testing Amavisd-new
-bash: Testing: command not found
[root@mail init.d]# cd
> q
-bash: cd: q: No such file or directory
[root@mail init.d]# cd
> q
-bash: cd: q: No such file or directory
[root@mail init.d]# cd /
[root@mail /]#
[root@mail /]#
[root@mail /]# Testing Amavisd-new
-bash: Testing: command not found
[root@mail /]# vi /etc/amavisd.conf
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
/notify
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
virus_admin_maps => ["virusalert@$mydomain"],
spam_admin_maps  => ["virusalert@$mydomain"],
warnbadhsender   => 1,
# forward to a smtpd service providing DKIM signing service
forward_method => 'smtp:[127.0.0.1]:10027',
# force MTA conversion to 7-bit (e.g. before DKIM signing)
smtpd_discard_ehlo_keywords => ['8BITMIME'],
bypass_banned_checks_maps => [1],  # allow sending any file names and types
terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};
$interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
# Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
# (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
$policy_bank{'AM.PDP-SOCK'} = {
protocol => 'AM.PDP',
/notify
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000
# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
$virus_admin               = undef;                    # notifications recip.
$mailfrom_notify_admin     = undef;                    # notifications sender
$mailfrom_notify_recip     = undef;                    # notifications sender
$mailfrom_notify_spamadmin = undef;                    # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_BOUNCE;
$final_spam_destiny       = D_DISCARD;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_BOUNCE;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
search hit BOTTOM, continuing at TOP
$syslog_facility = 'mail';   # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
@local_domains_maps = ( [".$mydomain"] );  # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "/var/run/amavisd/amavisd.sock";  # amavisd-release or amavis-milter
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
virus_admin_maps => ["virusalert@$mydomain"],
spam_admin_maps  => ["virusalert@$mydomain"],
/10025
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_BOUNCE;
$final_spam_destiny       = D_DISCARD;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_BOUNCE;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam
# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
@keep_decoded_original_maps = (new_RE(
qr'^MAIL$',                # let virus scanner see full original message
qr'^MAIL-UNDECIPHERABLE$', # same as ^MAIL$ if mail is undecipherable
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
# qr'^Zip archive data',     # don't trust Archive::Zip
));
$banned_filename_re = new_RE(
### BLOCKED ANYWHERE
# qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
qr'^.(exe-ms|dll)$',                   # banned file(1) types, rudimentary
# qr'^.(exe|lha|cab|dll)$',              # banned file(1) types
### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
/@av_scanners
# ['doc',  &do_ole,   'ripole'],  # no ripole package so far
['cab',  &do_cabextract, 'cabextract'],
# ['tnef', &do_tnef_ext, 'tnef'],  # use internal do_tnef() instead
['tnef', &do_tnef],
# ['lha',  &do_lha,   'lha'],  # not safe, use 7z instead
# ['sit',  &do_unstuff, 'unstuff'],  # not safe
[['zip','kmz'], &do_7zip,  ['7za', '7z'] ],
[['zip','kmz'], &do_unzip],
['7z',   &do_7zip,  ['7zr', '7za', '7z'] ],
[[qw(gz bz2 Z tar)],
&do_7zip,  ['7za', '7z'] ],
[[qw(xz lzma jar cpio arj rar swf lha iso cab deb rpm)],
&do_7zip,  '7z' ],
['exe',  &do_executable, ['unrar','rar'], 'lha', ['unarj','arj'] ],
);
@av_scanners = (
# ### http://www.sophos.com/
# ['Sophos-SSSP',  # SAV Dynamic Interface
#   &ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
#           # or: ["{}", 'sssp:[127.0.0.1]:4010'],
#   qr/^DONE OKb/m, qr/^VIRUSb/m, qr/^VIRUSs*(S*)/m ],
# ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
# ['Sophie',
#   &ask_daemon, ["{}/n", 'sophie:/var/run/sophie'],
#   qr/(?x)^ 0+ ( : | [00rn]* $)/,  qr/(?x)^ 1 ( : | [00rn]* $)/,
#   qr/(?x)^ [-+]? d+ : (.*?) [00rn]* $/m ],
# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
# ['Sophos SAVI', &ask_daemon, ['{}','savi-perl:'] ],
# ['Avira SAVAPI',
#   &ask_daemon, ["*", 'savapi:/var/tmp/.savapi3', 'product-id'],
#   qr/^(200|210)/m,  qr/^(310|420|319)/m,
#   qr/^(?:310|420)[,s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
# settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1
  ### http://www.clamav.net/
['ClamAV-clamd',
&ask_daemon, ["CONTSCAN {}n", "/var/run/clamd.amavisd/clamd.sock"],
qr/bOK$/m, qr/bFOUND$/m,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# NOTE: run clamd under the same user as amavisd - or run it under its own
#   uid such as clamav, add user clamav to the amavis group, and then add
#   AllowSupplementaryGroups to clamd.conf;
# NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
#   this entry; when running chrooted one may prefer a socket under $MYHOME.
# ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
# # note that Mail::ClamAV requires perl to be build with threading!
# ['Mail::ClamAV', &ask_daemon, ['{}','clamav-perl:'],
#   [0], [1], qr/^INFECTED: (.+)/m],
# ### http://www.openantivirus.org/
# ['OpenAntiVirus ScannerDaemon (OAV)',
#   &ask_daemon, ["SCAN {}n", '127.0.0.1:8127'],
#   qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],
# ### http://www.vanja.com/tools/trophie/
# ['Trophie',
#   &ask_daemon, ["{}/n", 'trophie:/var/run/trophie'],
search hit BOTTOM, continuing at TOP
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam
# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
@keep_decoded_original_maps = (new_RE(
qr'^MAIL$',                # let virus scanner see full original message
qr'^MAIL-UNDECIPHERABLE$', # same as ^MAIL$ if mail is undecipherable
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
# qr'^Zip archive data',     # don't trust Archive::Zip
));
$banned_filename_re = new_RE(
### BLOCKED ANYWHERE
# qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
qr'^.(exe-ms|dll)$',                   # banned file(1) types, rudimentary
# qr'^.(exe|lha|cab|dll)$',              # banned file(1) types
### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
# [ qr'^.(gz|bz2)$'             => 0 ],  # allow any in gzip or bzip2
[ qr'^.(rpm|cpio|tar)$'       => 0 ],  # allow any in Unix-type archives
  qr'..(pif|scr)$'i,                     # banned extensions - rudimentary
# qr'^.zip$',                            # block zip type
### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:
# [ qr'^.(zip|rar|arc|arj|zoo)$'=> 0 ],  # allow any within these archives
  qr'^application/x-msdownload$'i,        # block these MIME types
qr'^application/x-msdos-program$'i,
qr'^application/hta$'i,
# qr'^message/partial$'i,         # rfc2046 MIME type
# qr'^message/external-body$'i,   # rfc2046 MIME type
# qr'^(application/x-msmetafile|image/x-wmf)$'i,  # Windows Metafile MIME type
# qr'^.wmf$',                            # Windows Metafile file(1) type
  # block certain double extensions in filenames
qr'^(?!cid:).*.[^./]*[A-Za-z][^./]*.s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.s]*$'i,
# qr'{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}}?'i, # Class ID CLSID, strict
# qr'{[0-9a-z]{4,}(-[0-9a-z]{4,}){0,7}}?'i, # Class ID extension CLSID, loose
  qr'..(exe|vbs|pif|scr|cpl)$'i,             # banned extension - basic
# qr'..(exe|vbs|pif|scr|cpl|bat|cmd|com)$'i, # banned extension - basic+cmd
# qr'..(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|
#        inf|ini|ins|isp|js|jse|lib|lnk|mda|mdb|mde|mdt|mdw|mdz|msc|msi|
#        msp|mst|ocx|ops|pcd|pif|prg|reg|scr|sct|shb|shs|sys|vb|vbe|vbs|vxd|
#        wmf|wsc|wsf|wsh)$'ix,                # banned extensions - long
# qr'..(asd|asf|asx|url|vcs|wmd|wmz)$'i,     # consider also
# qr'..(ani|cur|ico)$'i,                 # banned cursors and icons filename
# qr'^.ani$',                            # banned animated cursor file(1) type
# qr'..(mim|b64|bhx|hqx|xxe|uu|uue)$'i,  # banned extension - WinZip vulnerab.
);
# See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
# and http://www.cknow.com/vtutor/vtextensions.htm
# ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING
@score_sender_maps = ({ # a by-recipient hash lookup table,
# results from all matching recipient tables are summed
# ## per-recipient personal tables  (NOTE: positive: black, negative: white)
# 'user1@example.com'  => [{'bla-mobile.press@example.com' => 10.0}],
# 'user3@example.com'  => [{'.ebay.com'                 => -3.0}],
# 'user4@example.com'  => [{'cleargreen@cleargreen.com' => -7.0,
#                           '.cleargreen.com'           => -5.0}],
  ## site-wide opinions about senders (the '.' matches any recipient)
'.' => [  # the _first_ matching sender determines the score boost
   new_RE(  # regexp-type lookup table, just happens to be all soft-blacklist
[qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i         => 5.0],
[qr'^(greatcasino|investments|lose_weight_today|market.alert)@'i=> 5.0],
[qr'^(money2you|MyGreenCard|new.tld.registry|opt-out|opt-in)@'i=> 5.0],
[qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i   => 5.0],
[qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i  => 5.0],
[qr'^(your_friend|greatoffers)@'i                                => 5.0],
/@av
# ['doc',  &do_ole,   'ripole'],  # no ripole package so far
['cab',  &do_cabextract, 'cabextract'],
# ['tnef', &do_tnef_ext, 'tnef'],  # use internal do_tnef() instead
['tnef', &do_tnef],
# ['lha',  &do_lha,   'lha'],  # not safe, use 7z instead
# ['sit',  &do_unstuff, 'unstuff'],  # not safe
[['zip','kmz'], &do_7zip,  ['7za', '7z'] ],
[['zip','kmz'], &do_unzip],
['7z',   &do_7zip,  ['7zr', '7za', '7z'] ],
[[qw(gz bz2 Z tar)],
&do_7zip,  ['7za', '7z'] ],
[[qw(xz lzma jar cpio arj rar swf lha iso cab deb rpm)],
&do_7zip,  '7z' ],
['exe',  &do_executable, ['unrar','rar'], 'lha', ['unarj','arj'] ],
);
@av_scanners = (
# ### http://www.sophos.com/
# ['Sophos-SSSP',  # SAV Dynamic Interface
#   &ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
#           # or: ["{}", 'sssp:[127.0.0.1]:4010'],
#   qr/^DONE OKb/m, qr/^VIRUSb/m, qr/^VIRUSs*(S*)/m ],
# ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
# ['Sophie',
#   &ask_daemon, ["{}/n", 'sophie:/var/run/sophie'],
#   qr/(?x)^ 0+ ( : | [00rn]* $)/,  qr/(?x)^ 1 ( : | [00rn]* $)/,
#   qr/(?x)^ [-+]? d+ : (.*?) [00rn]* $/m ],
# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
# ['Sophos SAVI', &ask_daemon, ['{}','savi-perl:'] ],
# ['Avira SAVAPI',
#   &ask_daemon, ["*", 'savapi:/var/tmp/.savapi3', 'product-id'],
#   qr/^(200|210)/m,  qr/^(310|420|319)/m,
#   qr/^(?:310|420)[,s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
# settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1
  ### http://www.clamav.net/
['ClamAV-clamd',
&ask_daemon, ["CONTSCAN {}n", "/tmp/clamd.sock"],
qr/bOK$/m, qr/bFOUND$/m,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# NOTE: run clamd under the same user as amavisd - or run it under its own
#   uid such as clamav, add user clamav to the amavis group, and then add
#   AllowSupplementaryGroups to clamd.conf;
# NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
#   this entry; when running chrooted one may prefer a socket under $MYHOME.
# ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
# # note that Mail::ClamAV requires perl to be build with threading!
# ['Mail::ClamAV', &ask_daemon, ['{}','clamav-perl:'],
#   [0], [1], qr/^INFECTED: (.+)/m],
# ### http://www.openantivirus.org/
# ['OpenAntiVirus ScannerDaemon (OAV)',
#   &ask_daemon, ["SCAN {}n", '127.0.0.1:8127'],
#   qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],
# ### http://www.vanja.com/tools/trophie/
# ['Trophie',
#   &ask_daemon, ["{}/n", 'trophie:/var/run/trophie'],
#   qr/(?x)^ 0+ ( : | [00rn]* $)/m,  qr/(?x)^ 1 ( : | [00rn]* $)/m,
#   qr/(?x)^ [-+]? d+ : (.*?) [00rn]* $/m ],
# ### http://www.grisoft.com/
# ['AVG Anti-Virus',
#   &ask_daemon, ["SCAN {}n", '127.0.0.1:55555'],
#   qr/^200/m, qr/^403/m, qr/^403[- ].*: ([^rn]+)/m ],
# ### http://www.f-prot.com/
# ['F-Prot fpscand',  # F-PROT Antivirus for BSD/Linux/Solaris, version 6
#   &ask_daemon,
#   ["SCAN FILE {}/*n", '127.0.0.1:10200'],
#   qr/^(0|8|64) /m,
#   qr/^([1235679]|1[01345]) |<[^>:]*(?i)(infected|suspicious|unwanted)/m,
#   qr/(?i)<[^>:]*(?:infected|suspicious|unwanted)[^>:]*: ([^>]*)>/m ],
# ### http://www.f-prot.com/
# ['F-Prot f-protd',  # old version
#   &ask_daemon,
#   ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0rnrn",
#     ['127.0.0.1:10200', '127.0.0.1:10201', '127.0.0.1:10202',
#      '127.0.0.1:10203', '127.0.0.1:10204'] ],
#   qr/(?i)<summary[^>]*>clean</summary>/m,
#   qr/(?i)<summary[^>]*>infected</summary>/m,
#   qr/(?i)<name>(.+)</name>/m ],
# ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
# ['DrWebD', &ask_daemon,   # DrWebD 4.31 or later
#   [pack('N',1).  # DRWEBD_SCAN_CMD
#    pack('N',0x00280001).   # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
#    pack('N',     # path length
#      length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")).
#    '{}/*'.       # path
#    pack('N',0).  # content size
#    pack('N',0),
#    '/var/drweb/run/drwebd.sock',
#  # '/var/amavis/var/run/drwebd.sock',   # suitable for chroot
#  # '/usr/local/drweb/run/drwebd.sock',  # FreeBSD drweb ports default
#  # '127.0.0.1:3000',                    # or over an inet socket
#   ],
#   qr/Ax00[x10x11][x00x10]x00/sm,        # IS_CLEAN,EVAL_KEY; SKIPPED
#   qr/Ax00[x00x01][x00x10][x20x40x80]/sm,# KNOWN_V,UNKNOWN_V,V._MODIF
#   qr/A.{12}(?:infected with )?([^x00]+)x00/sm,
# ],
# # NOTE: If using amavis-milter, change length to:
# # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx").
  ### http://www.kaspersky.com/  (kav4mailservers)
['KasperskyLab AVP - aveclient',
['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
'/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
'-p /var/run/aveserver -s {}/*',
[0,3,6,8], qr/b(INFECTED|SUSPICION|SUSPICIOUS)b/m,
qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m,
],
# NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious,
# currupted or protected archives are to be handled
  ### http://www.kaspersky.com/
['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
'-* -P -B -Y -O- {}', [0,3,6,8], [2,4],    # any use for -A -K   ?
qr/infected: (.+)/m,
sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
],
  ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
### products and replaced by aveserver and aveclient
['KasperskyLab AVPDaemonClient',
[ '/opt/AVP/kavdaemon',       'kavdaemon',
'/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
'/opt/AVP/AvpTeamDream',    'AvpTeamDream',
'/opt/AVP/avpdc', 'avpdc' ],
"/etc/amavisd/amavisd.conf" 816L, 36754C written
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# amavisd debug
Config file "/etc/amavisd.conf" does not exist, at /usr/sbin/amavisd line 2150.
[root@mail /]# cp /etc/amavisd/amavisd.conf /etc/amavisd.conf
[root@mail /]# amavisd debug
May  3 22:23:10.075 mail /usr/sbin/amavisd[23412]: logging initialized, log level 0, syslog: amavis.mail
The value of variable $myhostname is "mail", but should have been
a fully qualified domain name; perhaps uname(3) did not provide such.
You must explicitly assign a FQDN of this host to variable $myhostname
in amavisd.conf, or fix what uname(3) provides as a host's network name!
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
/$myhostname
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
/$myhostname
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
$myhostname = 'mail.xishui139.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
"/etc/amavisd/amavisd.conf" 816L, 36754C written
[root@mail /]#
[root@mail /]#
[root@mail /]# cp /etc/amavisd/amavisd.conf /etc/amavisd.conf
cp: overwrite ?etc/amavisd.conf? y
[root@mail /]# amavisd debug
May  3 22:25:01.285 mail.xishui139.com /usr/sbin/amavisd[23451]: logging initialized, log level 0, syslog: amavis.mail
May  3 22:25:01.286 mail.xishui139.com /usr/sbin/amavisd[23451]: starting. /usr/sbin/amavisd at mail.xishui139.com amavisd-new-2.10.1 (20141025), Unicode aware, LANG="en_US.UTF-8"
May  3 22:25:01.286 mail.xishui139.com /usr/sbin/amavisd[23451]: perl=5.020003, user=, EUID: 979 (979);  group=, EGID: 974 974 (974 974)
May  3 22:25:02.251 mail.xishui139.com /usr/sbin/amavisd[23451]: INFO: no optional modules: unicore::lib::Perl::SpacePer.pl unicore::lib::Nt::De.pl Unix::Getrusage
May  3 22:25:02.252 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: attempting to load scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
May  3 22:25:02.252 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
May  3 22:25:04.175 mail.xishui139.com /usr/sbin/amavisd[23451]: INFO: SA version: 3.4.1, 3.004001, no optional modules: Image::Info Image::Info::GIF Image::Info::JPEG Image::Info::PNG Image::Info::BMP Image::Info::TIFF
May  3 22:25:04.175 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: init_pre_chroot on SpamAssassin done
May  3 22:25:04.176 mail.xishui139.com /usr/sbin/amavisd[23451]: socket module IO::Socket::IP, protocol families available: INET
May  3 22:25:04.177 mail.xishui139.com /usr/sbin/amavisd[23451]: bind to /var/run/amavisd/amavisd.sock|unix, 127.0.0.1:10024/tcp
May  3 22:25:04.179 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: 2016/05/03-22:25:04 Amavis (type Net::Server::PreForkSimple) starting! pid(23451)
May  3 22:25:04.206 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Binding to UNIX socket file "/var/run/amavisd/amavisd.sock"
May  3 22:25:04.208 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
May  3 22:25:04.209 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Group Not Defined.  Defaulting to EGID '974 974'
May  3 22:25:04.210 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: User Not Defined.  Defaulting to EUID '979'
May  3 22:25:04.210 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Setting up serialization via flock
May  3 22:25:04.212 mail.xishui139.com /usr/sbin/amavisd[23451]: after_chroot_init: EUID: 979 (979);  EGID: 974 974 (974 974)
May  3 22:25:04.212 mail.xishui139.com /usr/sbin/amavisd[23451]: config files read: /etc/amavisd.conf
May  3 22:25:04.270 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Amavis::Conf        2.404
May  3 22:25:04.271 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Archive::Zip        1.46
May  3 22:25:04.271 mail.xishui139.com /usr/sbin/amavisd[23451]: Module BerkeleyDB          0.55
May  3 22:25:04.271 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Compress::Raw::Zlib 2.068
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Compress::Zlib      2.068
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Crypt::OpenSSL::RSA 0.28
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module DB_File             1.835
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Digest::MD5         2.54
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Digest::SHA         5.95
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Encode              2.73
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module File::LibMagic      1.00
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module File::Temp          0.2304
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module IO::Socket::INET6   2.72
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module IO::Socket::IP      0.36
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module MIME::Entity        5.506
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module MIME::Parser        5.506
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module MIME::Tools         5.506
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::DKIM::Signer  0.4
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::DKIM::Verifier 0.4
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::Header        2.14
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::Internet      2.14
May  3 22:25:04.276 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::SPF           v2.009
May  3 22:25:04.276 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::SpamAssassin  3.004001
May  3 22:25:04.277 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Net::DNS            0.83
May  3 22:25:04.277 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Net::LibIDN         0.12
May  3 22:25:04.277 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Net::Server         2.007
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module NetAddr::IP         4.079
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Razor2::Client::Version 2.84
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Scalar::Util        1.41
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Socket              2.019
May  3 22:25:04.279 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Socket6             0.25
May  3 22:25:04.279 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Time::HiRes         1.9726
May  3 22:25:04.279 mail.xishui139.com /usr/sbin/amavisd[23451]: Module URI                 1.65
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Unix::Syslog        1.1
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: Amavis::ZMQ code     NOT loaded
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: Amavis::DB code      loaded
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: SQL base code        NOT loaded
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: SQL::Log code        NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: SQL::Quarantine      NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Lookup::SQL code     NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Lookup::LDAP code    NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: AM.PDP-in proto code loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: SMTP-in proto code   loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Courier proto code   NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: SMTP-out proto code  loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Pipe-out proto code  NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: BSMTP-out proto code NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: Local-out proto code loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: OS_Fingerprint code  NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-VIRUS code      loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM code       loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM-EXT code   NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM-C code     NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM-SA code    loaded
May  3 22:25:04.283 mail.xishui139.com /usr/sbin/amavisd[23451]: Unpackers code       loaded
May  3 22:25:04.283 mail.xishui139.com /usr/sbin/amavisd[23451]: DKIM code            loaded
May  3 22:25:04.283 mail.xishui139.com /usr/sbin/amavisd[23451]: Tools code           NOT loaded
May  3 22:25:04.390 mail.xishui139.com /usr/sbin/amavisd[23451]: Found $file            at /usr/bin/file
May  3 22:25:04.423 mail.xishui139.com /usr/sbin/amavisd[23451]: Found $altermime       at /usr/bin/altermime
May  3 22:25:04.423 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .mail
May  3 22:25:04.425 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .F    at /usr/bin/unfreeze
May  3 22:25:04.453 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .Z    at /usr/bin/gzip -d
May  3 22:25:04.454 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .gz   at /usr/bin/gzip -d
May  3 22:25:04.454 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .gz   (backup, not used)
May  3 22:25:04.459 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .bz2  at /usr/bin/bzip2 -d
May  3 22:25:04.461 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .xz   at /usr/bin/xzdec
May  3 22:25:04.462 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lzma at /usr/bin/xz -dc --format=lzma
May  3 22:25:04.462 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lrz  at /usr/bin/lrzip -q -k -d -o -
May  3 22:25:04.463 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lzo  at /usr/bin/lzop -d
May  3 22:25:04.463 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lz4  at /usr/bin/lz4c -d
May  3 22:25:04.464 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .rpm  at /usr/bin/rpm2cpio
May  3 22:25:04.537 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cpio at /usr/bin/pax
May  3 22:25:04.537 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .tar  at /usr/bin/pax
May  3 22:25:04.580 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .deb  at /usr/bin/ar
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: No ext program for   .rar, tried: unrar, rar
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .arj  at /usr/bin/unarj
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .arc  at /usr/bin/nomarch
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .zoo  at /usr/bin/unzoo
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cab  at /usr/bin/cabextract
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .tnef
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .zip  at /usr/bin/7za
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .kmz  at /usr/bin/7za
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .zip  (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .kmz  (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .7z   at /usr/bin/7za
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .gz   at /usr/bin/7za (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .bz2  at /usr/bin/7za (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .Z    at /usr/bin/7za (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .tar  at /usr/bin/7za (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .xz   at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lzma at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .jar  at /usr/bin/7z
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cpio at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .arj  at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .rar  at /usr/bin/7z
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .swf  at /usr/bin/7z
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lha  at /usr/bin/7z
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .iso  at /usr/bin/7z
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cab  at /usr/bin/7z (backup, not used)
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .deb  at /usr/bin/7z (backup, not used)
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .rpm  at /usr/bin/7z (backup, not used)
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .exe  at /usr/bin/unarj
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Using primary internal av scanner code for ClamAV-clamd
May  3 22:25:04.675 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: KasperskyLab AVP - aveclient
May  3 22:25:04.675 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: KasperskyLab AntiViral Toolkit Pro (AVP)
May  3 22:25:04.676 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: KasperskyLab AVPDaemonClient
May  3 22:25:04.704 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CentralCommand Vexira (new) vascan
May  3 22:25:04.705 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Avira AntiVir
May  3 22:25:04.705 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Avira AntiVir
May  3 22:25:04.705 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Command AntiVirus for Linux
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Symantec CarrierScan via Symantec CommandLineScanner
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Symantec AntiVirus Scan Engine
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: F-Secure Linux Security
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CAI InoculateIT
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CAI eTrust Antivirus
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: MkS_Vir for Linux (beta)
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: MkS_Vir daemon
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: ESET Software ESETS Command Line Interface
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: ESET NOD32 for Linux File servers
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Norman Virus Control v5 / Linux
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Panda CommandLineSecure 9 for Linux
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: NAI McAfee AntiVirus (uvscan)
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: VirusBuster
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CyberSoft VFind
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: avast! Antivirus
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Ikarus AntiVirus for Linux
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: BitDefender
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: BitDefender
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: ArcaVir for Linux
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: F-PROT Antivirus for UNIX
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: FRISK F-Prot Antivirus
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: Trend Micro FileScanner
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: drweb - DrWeb Antivirus
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: Kaspersky Antivirus v5.5
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: Sophos Anti Virus (savscan)
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: Using internal spam scanner code for SpamAssassin
May  3 22:25:04.761 mail.xishui139.com /usr/sbin/amavisd[23451]: Deleting db files  in /var/spool/amavisd/db
May  3 22:25:04.839 mail.xishui139.com /usr/sbin/amavisd[23451]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.55, libdb 5.3
May  3 22:25:04.932 mail.xishui139.com /usr/sbin/amavisd[23451]: initializing Mail::SpamAssassin (0)
May  3 22:25:04.933 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamAssassin debug facilities: info
May  3 22:25:11.375 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamAssassin loaded plugins: AskDNS, AutoLearnThreshold, Bayes, BodyEval, Check, DKIM, DNSEval, FreeMail, HTMLEval, HTTPSMismatch, Hashcash, HeaderEval, ImageInfo, MIMEEval, MIMEHeader, Pyzor, Razor2, RelayEval, ReplaceTags, SPF, SpamCop, URIDNSBL, URIDetail, URIEval, VBounce, WLBLEval, WhiteListSubject
May  3 22:25:11.375 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: init_pre_fork on SpamAssassin done
May  3 22:25:11.376 mail.xishui139.com /usr/sbin/amavisd[23451]: extra modules loaded after daemonizing/chrooting: /usr/share/perl5/Net/libnet.cfg, Mail/SpamAssassin/Plugin/FreeMail.pm, Mail/SpamAssassin/Plugin/SpamCop.pm, Net/Cmd.pm, Net/Config.pm, Net/SMTP.pm
May  3 22:25:11.377 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Beginning prefork (2 processes)
May  3 22:25:11.378 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Starting "2" children
May  3 22:25:11.416 mail.xishui139.com /usr/sbin/amavisd[23452]: Net::Server: Child Preforked (23452)
May  3 22:25:11.437 mail.xishui139.com /usr/sbin/amavisd[23452]: entered child_init_hook
May  3 22:25:11.438 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Parent ready for children.
May  3 22:25:11.442 mail.xishui139.com /usr/sbin/amavisd[23453]: Net::Server: Child Preforked (23453)
May  3 22:25:11.443 mail.xishui139.com /usr/sbin/amavisd[23453]: entered child_init_hook
May  3 22:25:11.461 mail.xishui139.com /usr/sbin/amavisd[23452]: SpamControl: init_child on SpamAssassin done
May  3 22:25:11.496 mail.xishui139.com /usr/sbin/amavisd[23453]: SpamControl: init_child on SpamAssassin done
q
quit
^C^Cc
May  3 22:29:00.460 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle (child finishing)
May  3 22:29:00.421 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle (child finishing)
May  3 22:29:00.754 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:00.802 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:00.977 mail.xishui139.com /usr/sbin/amavisd[23452]: SA rundown_child (0)
May  3 22:29:00.977 mail.xishui139.com /usr/sbin/amavisd[23453]: SA rundown_child (0)
May  3 22:29:01.178 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: 2016/05/03-22:29:00 Server closing!
May  3 22:29:01.460 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Kill TERM pid 23452
May  3 22:29:01.685 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Kill TERM pid 23453
May  3 22:29:02.048 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle (child finishing)
May  3 22:29:01.847 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle (child finishing)
May  3 22:29:02.100 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:02.081 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:02.568 mail.xishui139.com /usr/sbin/amavisd[23452]: SA rundown_child (0)
May  3 22:29:02.620 mail.xishui139.com /usr/sbin/amavisd[23453]: SA rundown_child (0)
May  3 22:29:05.504 mail.xishui139.com /usr/sbin/amavisd[23453]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:05.773 mail.xishui139.com /usr/sbin/amavisd[23453]: child_finish_hook: invoking DESTROY methods
May  3 22:29:05.812 mail.xishui139.com /usr/sbin/amavisd[23452]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:05.951 mail.xishui139.com /usr/sbin/amavisd[23452]: child_finish_hook: invoking DESTROY methods
May  3 22:29:09.923 mail.xishui139.com /usr/sbin/amavisd[23452]: Amavis::DB::SNMP DESTROY called
May  3 22:29:10.755 mail.xishui139.com /usr/sbin/amavisd[23453]: Amavis::DB::SNMP DESTROY called
May  3 22:29:13.242 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle (child finishing)
May  3 22:29:13.298 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:13.319 mail.xishui139.com /usr/sbin/amavisd[23453]: SA rundown_child (0)
May  3 22:29:13.336 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle (child finishing)
May  3 22:29:13.337 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:13.337 mail.xishui139.com /usr/sbin/amavisd[23452]: SA rundown_child (0)
May  3 22:29:13.338 mail.xishui139.com /usr/sbin/amavisd[23452]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:13.338 mail.xishui139.com /usr/sbin/amavisd[23452]: child_finish_hook: invoking DESTROY methods
May  3 22:29:13.448 mail.xishui139.com /usr/sbin/amavisd[23453]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:13.448 mail.xishui139.com /usr/sbin/amavisd[23453]: child_finish_hook: invoking DESTROY methods
[root@mail /]# c
-bash: c: command not found
[root@mail /]#
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
$log_level = 0;              # verbosity 0..5, -d
$log_recip_templ = undef;    # disable by-recipient level-0 log entries
$do_syslog = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';   # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
@local_domains_maps = ( [".$mydomain"] );  # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "/var/run/amavisd/amavisd.sock";  # amavisd-release or amavis-milter
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
/mailfrom
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000
# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
$virus_admin               = "root@$mydomain";                    # notifications recip.
$mailfrom_notify_admin     = "root@$mydomain";                    # notifications sender
$mailfrom_notify_recip     = "root@$mydomain";                    # notifications sender
$mailfrom_notify_spamadmin = "root@$mydomain";                    # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
$myhostname = 'mail.xishui139.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam
"/etc/amavisd/amavisd.conf" 816L, 36802C written
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# service amavisd restart
Redirecting to /bin/systemctl restart  amavisd.service
[root@mail /]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-05-03 22:40:45 CST; 13s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23686 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=0/SUCCESS)
Main PID: 23687 (/usr/sbin/amavi)
CGroup: /system.slice/amavisd.service
忖23687 /usr/sbin/amavisd (master)
忖23688 /usr/sbin/amavisd (virgin child)
忖23689 /usr/sbin/amavisd (virgin child)
May 03 22:40:46 mail amavis[23687]: Found decoder for    .rar  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .swf  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .lha  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .iso  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .exe  at /usr/bin/unarj
May 03 22:40:46 mail amavis[23687]: Using primary internal av scanner code for ClamAV-clamd
May 03 22:40:46 mail amavis[23687]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
May 03 22:40:46 mail amavis[23687]: Deleting db files __db.002,__db.001,__db.003,nanny.db,snmp.db in /var/spool/amavisd/db
May 03 22:40:46 mail amavis[23687]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.55, libdb 5.3
May 03 22:40:45 mail systemd[1]: Started Amavisd-new is an interface between MTA and content checkers..
[root@mail /]# cp /etc/amavisd/amavisd.conf /etc/amavisd.conf
cp: overwrite ?etc/amavisd.conf? y
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
E486: Pattern not found: sa_debug
#   '-f -log scandir {}', [0], [3],
#   qr/Virus found = (.*);/m ],
# # HINT: for an infected file it always returns 3,
# # although the man-page tells a different story
  ### http://www.cyber.com/
['CyberSoft VFind', 'vfind',
'--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/m,
# sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
],
  ### http://www.avast.com/
['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
'-a -i -n -t=A {}', [0], [1], qr/binfected by:s+([^ tn[]]+)/m ],
  ### http://www.ikarus-software.com/
['Ikarus AntiVirus for Linux', 'ikarus',
'{}', [0], [40], qr/Signature (.+) found/m ],
  ### http://www.bitdefender.com/
['BitDefender', 'bdscan',  # new version
'--action=ignore --no-list {}', qr/^Infected filess*:s*0+(?!d)/m,
qr/^(?:Infected files|Identified viruses|Suspect files)s*:s*0*[1-9]/m,
qr/(?:suspected|infected)s*:s*(.*)(?:33|$)/m ],
  ### http://www.bitdefender.com/
['BitDefender', 'bdc',  # old version
'--arc --mail {}', qr/^Infected files *:0+(?!d)/m,
qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m,
qr/(?:suspected|infected): (.*)(?:33|$)/m ],
# consider also: --all --nowarn --alev=15 --flev=15.  The --all argument may
# not apply to your version of bdc, check documentation and see 'bdc --help'
  ### ArcaVir for Linux and Unix http://www.arcabit.pl/
['ArcaVir for Linux', ['arcacmd','arcacmd.static'],
/@av_scan
#   use File::Scan; my($fn)=@_;
#   my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0);
#   my($vname) = $f->scan($fn);
#   $f->error ? (2,"Error: ".$f->error)
#   : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) },
#   ["{}/*"], [0], [1], qr/^(.*) FOUND$/m ],
# ### fully-fledged checker for JPEG marker segments of invalid length
# ['check-jpeg',
#   sub { use JpegTester (); Amavis::AV::ask_av(&JpegTester::test_jpeg, @_) },
#   ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ],
# # NOTE: place file JpegTester.pm somewhere where Perl can find it,
# #       for example in /usr/local/lib/perl5/site_perl
);
@av_scanners_backup = (
  ### http://www.clamav.net/   - backs up clamd or Mail::ClamAV
['ClamAV-clamscan', 'clamscan',
"--stdout --no-summary -r --tempdir=$TEMPBASE {}",
[0], qr/:.*sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# ### http://www.clamav.net/ - using remote clamd scanner as a backup
# ['ClamAV-clamdscan', 'clamdscan',
#   "--stdout --no-summary --config-file=/etc/clamd-client.conf {}",
#   [0], qr/:.*sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# ['ClamAV-clamd-stream',
#   &ask_daemon, ["*", 'clamd:/var/run/clamav/clamd.sock'],
#   qr/bOK$/m, qr/bFOUND$/m,
#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  ### http://www.f-prot.com/   - backs up F-Prot Daemon, V6
['F-PROT Antivirus for UNIX', ['fpscan'],
'--report --mount --adware {}',  # consider: --applications -s 4 -u 3 -z 10
[0,8,64],  [1,2,3, 4+1,4+2,4+3, 8+1,8+2,8+3, 12+1,12+2,12+3],
qr/^[Founds+[^]]*]s+<([^ t(>]*)/m ],
  ### http://www.f-prot.com/   - backs up F-Prot Daemon (old)
['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
'-dumb -archive -packed {}', [0,8], [3,6],   # or: [0], [3,6,8],
qr/(?:Infection:|security risk named) (.+)|s+containss+(.+)$/m ],
  ### http://www.trendmicro.com/   - backs up Trophie
['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
'-za -a {}', [0], qr/Found virus/m, qr/Found virus (.+) in/m ],
  ### http://www.sald.com/, http://drweb.imshop.de/   - backs up DrWebD
['drweb - DrWeb Antivirus',  # security LHA hole in Dr.Web 4.33 and earlier
['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
'-path={} -al -go -ot -cn -upn -ok-',
[0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'m ],
   ### http://www.kaspersky.com/
['Kaspersky Antivirus v5.5',
['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner',
'/opt/kav/5.5/kav4unix/bin/kavscanner',
'/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'],
'-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/m,
#    sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
#    sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
],
  ### http://www.sophos.com/
['Sophos Anti Virus (savscan)',   # formerly known as 'sweep'
['/opt/sophos-av/bin/savscan', 'savscan'],  # 'sweep'
'-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '.
'--no-reset-atime {}',
[0,2], qr/Virus .*? found/m,
qr/^>>> Virus(?: fragment)? '?(.*?)'? found/m,
],
# other options to consider: -idedir=/usr/local/sav
# A name 'sweep' clashes with a name of an audio editor (Debian and FreeBSD).
# Make sure the correct 'sweep' is found in the path if using the old name.
# Always succeeds and considers mail clean.
# Potentially useful when all other scanners fail and it is desirable
# to let mail continue to flow with no virus checking (when uncommented).
# ['always-clean', sub {0}],
);
1;  # insure a defined return value
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# service amavisd restart
Redirecting to /bin/systemctl restart  amavisd.service
[root@mail /]# cp /etc/postfix/master.cf  /etc/postfix/master.cf.bak2016.5.3
[root@mail /]# vi  /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
#submission inet n       -       n       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       n       -       -       qmqpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
policy-spf unix -       n       n       -       -       spawn
user=nobody argv=/usr/bin/perl /usr/libexec/postfix/policyd-spf-perl
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail    unix  -       n       n       -       -       pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp     unix  -       n       n       -       -       pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
:1
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
smtp-amavis unix -  -   -   -   2  smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n  -   -   -   -  smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
"/etc/postfix/master.cf" 156L, 7256C written
[root@mail /]# vi  /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
smtp-amavis unix -  -   -   -   2  smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n  -   -   -   -  smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# postconf -e 'content_filter=smtp-amavis:[127.0.0.1]:10024'
[root@mail /]# service postfix reload
Redirecting to /bin/systemctl reload  postfix.service
[root@mail /]# Testing Amavisd-new
-bash: Testing: command not found
[root@mail /]# dnf install testing
Last metadata expiration check performed 1:32:34 ago on Tue May  3 21:16:54 2016.
No package testing available.
Error: no package matched: testing
[root@mail /]# netstat -naltup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      22103/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN      1537/perl
tcp        0      0 192.168.198.18:53       0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1238/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd
tcp        0      0 0.0.0.0:88              0.0.0.0:*               LISTEN      1253/nginx: master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1518/master
tcp        0      0 0.0.0.0:89              0.0.0.0:*               LISTEN      1183/httpd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      1221/opendkim
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 127.0.0.1:10024         0.0.0.0:*               LISTEN      23775/amavisd (mast
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      1518/master
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      28199/svnserve
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0    240 192.168.198.18:22       218.83.100.141:49490    ESTABLISHED 21927/sshd: root@pt
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd
tcp6       0      0 :::88                   :::*                    LISTEN      1253/nginx: master
tcp6       0      0 :::3306                 :::*                    LISTEN      1454/mysqld
udp        0      0 0.0.0.0:10000           0.0.0.0:*                           1537/perl
udp        0      0 192.168.198.18:53       0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:323           0.0.0.0:*                           660/chronyd
udp6       0      0 ::1:323                 :::*                                660/chronyd
[root@mail /]# /tmp/
.font-unix/                                                                    systemd-private-963e7fff8d7e4deea4091cab226fffac-named.service-5iZmA7/
.ICE-unix/                                                                     systemd-private-963e7fff8d7e4deea4091cab226fffac-nginx.service-lIuegU/
systemd-private-963e7fff8d7e4deea4091cab226fffac-amavisd.service-1b3xNA/       .Test-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-clamd@amavisd.service-haAvkI/ .webmin/
systemd-private-963e7fff8d7e4deea4091cab226fffac-dovecot.service-Dr5qTS/       .X11-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-httpd.service-p9J87C/         .XIM-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-mariadb.service-5BgsMm/
[root@mail /]# /tmp/
.font-unix/                                                                    systemd-private-963e7fff8d7e4deea4091cab226fffac-named.service-5iZmA7/
.ICE-unix/                                                                     systemd-private-963e7fff8d7e4deea4091cab226fffac-nginx.service-lIuegU/
systemd-private-963e7fff8d7e4deea4091cab226fffac-amavisd.service-1b3xNA/       .Test-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-clamd@amavisd.service-haAvkI/ .webmin/
systemd-private-963e7fff8d7e4deea4091cab226fffac-dovecot.service-Dr5qTS/       .X11-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-httpd.service-p9J87C/         .XIM-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-mariadb.service-5BgsMm/
[root@mail /]# /var/run/clamd.
clamd.amavisd/ clamd.scan/
[root@mail /]# /var/run/clamd.amavisd/
-bash: /var/run/clamd.amavisd/: Is a directory
[root@mail /]# ls -lh/var/run/clamd.amavisd/
ls: invalid option -- '/'
Try 'ls --help' for more information.
[root@mail /]# ls -lh /var/run/clamd.amavisd/
total 4.0K
-rw-rw-r-- 1 amavis amavis 6 May  3 22:10 clamd.pid
srw-rw-rw- 1 amavis amavis 0 May  3 22:10 clamd.sock
[root@mail /]#
-------------------------------------------------------------------------------------------------
Last login: Tue May  3 21:15:58 2016 from 218.83.100.141
[root@mail ~]# dnf info python
Last metadata expiration check performed 0:39:08 ago on Tue May  3 21:16:54 2016.
Installed Packages
Name        : python
Arch        : i686
Epoch       : 0
Version     : 2.7.9
Release     : 6.fc22
Size        : 77 k
Repo        : @System
From repo   : koji-override-0
Summary     : An interpreted, interactive, object-oriented programming language
URL         : http://www.python.org/
License     : Python
Description : Python is an interpreted, interactive, object-oriented programming
: language often compared to Tcl, Perl, Scheme or Java. Python includes
: modules, classes, exceptions, very high level dynamic data types and
: dynamic typing. Python supports interfaces to many system calls and
: libraries, as well as to various windowing systems (X11, Motif, Tk,
: Mac and MFC).
:
: Programmers can write new built-in modules for Python in C or C++.
: Python can be used as an extension language for applications that need
: a programmable interface.
:
: Note that documentation for Python is provided in the python-docs
: package.
:
: This package provides the "python" executable; most of the actual
: implementation is within the "python-libs" package.
Available Packages
Name        : python
Arch        : i686
Epoch       : 0
Version     : 2.7.10
Release     : 8.fc22
Size        : 93 k
Repo        : updates
Summary     : An interpreted, interactive, object-oriented programming language
URL         : http://www.python.org/
License     : Python
Description : Python is an interpreted, interactive, object-oriented programming
: language often compared to Tcl, Perl, Scheme or Java. Python includes
: modules, classes, exceptions, very high level dynamic data types and
: dynamic typing. Python supports interfaces to many system calls and
: libraries, as well as to various windowing systems (X11, Motif, Tk,
: Mac and MFC).
:
: Programmers can write new built-in modules for Python in C or C++.
: Python can be used as an extension language for applications that need
: a programmable interface.
:
: Note that documentation for Python is provided in the python-docs
: package.
:
: This package provides the "python" executable; most of the actual
: implementation is within the "python-libs" package.
[root@mail ~]# service spamassassin status
Redirecting to /bin/systemctl status  spamassassin.service
?spamassassin.service - Spamassassin daemon
Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-05-03 21:18:00 CST; 42min ago
Main PID: 22103 (spamd)
CGroup: /system.slice/spamassassin.service
忖22103 /usr/bin/perl -T -w /usr/bin/spamd -c -m5 -H
忖22118 spamd child
忖22119 spamd child
May 03 21:18:00 mail systemd[1]: Started Spamassassin daemon.
May 03 21:18:00 mail systemd[1]: Starting Spamassassin daemon...
May 03 21:18:12 mail spamd[22103]: spamd: server started on IO::Socket::IP [127.0.0.1]:783 (running version 3.4.1)
May 03 21:18:12 mail spamd[22103]: spamd: server pid: 22103
May 03 21:18:12 mail spamd[22103]: spamd: server successfully spawned child process, pid 22118
May 03 21:18:12 mail spamd[22103]: spamd: server successfully spawned child process, pid 22119
May 03 21:18:12 mail spamd[22103]: prefork: child states: IS
May 03 21:18:12 mail spamd[22103]: prefork: child states: II
[root@mail ~]# /usr/lib
lib/     libexec/
[root@mail ~]# /usr/lib/systemd/system
system/                       systemd-cryptsetup            systemd-machine-id-commit     systemd-resolve-host          systemd-update-done
systemd                       systemd-fsck                  systemd-modules-load          systemd-rfkill                systemd-update-utmp
systemd-ac-power              systemd-hibernate-resume      systemd-networkd              systemd-shutdown              systemd-user-sessions
systemd-activate              systemd-hostnamed             systemd-networkd-wait-online  systemd-shutdownd             systemd-vconsole-setup
systemd-backlight             systemd-importd               systemd-pull                  systemd-sleep                 system-generators/
systemd-binfmt                systemd-initctl               systemd-quotacheck            systemd-socket-proxyd         system-preset/
systemd-bootchart             systemd-journald              systemd-random-seed           systemd-sysctl                system-shutdown/
systemd-bus-proxyd            systemd-localed               systemd-remount-fs            systemd-timedated             system-sleep/
systemd-cgroups-agent         systemd-logind                systemd-reply-password        systemd-timesyncd
systemd-coredump              systemd-machined              systemd-resolved              systemd-udevd
[root@mail ~]# /usr/lib/systemd/system/
anaconda.target.wants/           halt.target.wants/               local-fs.target.wants/           rescue.target.wants/             shutdown.target.wants/
basic.target.wants/              httpd.service.d/                 multi-user.target.wants/         runlevel1.target.wants/          sockets.target.wants/
courier-authlib.service.bak      httpd.socket.d/                  network-online.target.wants/     runlevel2.target.wants/          sysinit.target.wants/
dbus.target.wants/               initrd-switch-root.target.wants/ nfs.target.wants/                runlevel3.target.wants/          syslog.target.wants/
default.target.wants/            initrd.target.wants/             poweroff.target.wants/           runlevel4.target.wants/          timers.target.wants/
graphical.target.wants/          kexec.target.wants/              reboot.target.wants/             runlevel5.target.wants/
[root@mail ~]# co
cockpit-bridge            comm                      compiz-decorator-emerald  composite                 convert-dtsv0             coverage2
col                       command                   compiz-decorator-gtk      config_data               convertquota              coverage-2.7
colcrt                    compare                   compiz-manager            conjure                   coproc
colormgr                  compface                  compiz-mate-emerald       consolehelper             coredumpctl
colrm                     compgen                   compiz-mate-gtk           consoletype               courierauthconfig
column                    compile_et                complete                  continue                  courierlogger
combinedeltarpm           compiz                    compopt                   convert                   coverage
[root@mail ~]# courier
courierauthconfig  courierlogger
[root@mail ~]# dnf install amavisd-new
Last metadata expiration check performed 0:46:53 ago on Tue May  3 21:16:54 2016.
Package amavisd-new-2.10.1-4.fc22.noarch is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@mail ~]# service amavisd-new status
Redirecting to /bin/systemctl status  amavisd-new.service
?amavisd-new.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
[root@mail ~]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: http://www.ijs.si/software/amavisd/#doc
[root@mail ~]# service amavisd start
Redirecting to /bin/systemctl start  amavisd.service
Job for amavisd.service failed. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@mail ~]# dnf remove amavisd-new.noarch
Display all 1578 possibilities? (y or n)
[root@mail ~]# dnf remove amavisd-new
Dependencies resolved.
==========================================================================================================================================================================
Package                                              Arch                             Version                                    Repository                         Size
==========================================================================================================================================================================
Removing:
altermime                                            i686                             0.3.10-11.fc22                             @System                           130 k
amavisd-new                                          noarch                           2.10.1-4.fc22                              @System                           3.1 M
arj                                                  i686                             3.10.22-22.fc22                            @System                           390 k
cabextract                                           i686                             1.5-1.fc22                                 @System                            92 k
freeze                                               i686                             2.5.0-18.fc22                              @System                            46 k
lrzip                                                i686                             0.616-4.fc22                               @System                           472 k
lzop                                                 i686                             1.03-11.fc22                               @System                           102 k
nomarch                                              i686                             1.4-13.fc22                                @System                            28 k
p7zip                                                i686                             15.09-4.fc22                               @System                           2.0 M
p7zip-plugins                                        i686                             15.09-4.fc22                               @System                           2.5 M
pax                                                  i686                             3.4-21.fc22                                @System                           140 k
perl-Authen-SASL                                     noarch                           2.16-4.fc22                                @System                           103 k
perl-BerkeleyDB                                      i686                             0.55-1.fc22                                @System                           404 k
perl-Convert-ASN1                                    noarch                           0.27-2.fc22                                @System                           150 k
perl-Convert-BinHex                                  noarch                           1.123-3.fc22                               @System                           100 k
perl-Convert-TNEF                                    noarch                           0.18-3.fc22                                @System                            38 k
perl-Convert-UUlib                                   i686                             2:1.4-10.fc22                              @System                           375 k
perl-Crypt-OpenSSL-Bignum                            i686                             0.04-22.fc22                               @System                            69 k
perl-Crypt-OpenSSL-RSA                               i686                             0.28-11.fc22                               @System                            77 k
perl-Crypt-OpenSSL-Random                            i686                             0.06-5.fc22                                @System                            37 k
perl-DBD-SQLite                                      i686                             1.46-2.fc22                                @System                           419 k
perl-DB_File                                         i686                             1.835-1.fc22                               @System                           169 k
perl-Digest-HMAC                                     noarch                           1.03-9.fc22                                @System                            13 k
perl-Digest-SHA1                                     i686                             2.13-13.fc22                               @System                           100 k
perl-Email-Date-Format                               noarch                           1.005-1.fc22                               @System                            24 k
perl-Encode-Detect                                   i686                             1.01-16.fc22                               @System                           173 k
perl-File-LibMagic                                   i686                             1.00-4.fc22                                @System                            35 k
perl-File-Listing                                    noarch                           6.04-9.fc22                                @System                            17 k
perl-GSSAPI                                          i686                             0.28-13.fc22                               @System                           140 k
perl-Geo-IP                                          i686                             1.45-1.fc22                                @System                           285 k
perl-HTML-Parser                                     i686                             3.71-8.fc22                                @System                           223 k
perl-HTML-Tagset                                     noarch                           3.20-21.fc22                               @System                            19 k
perl-HTTP-Cookies                                    noarch                           6.01-9.fc22                                @System                            46 k
perl-HTTP-Date                                       noarch                           6.02-10.fc22                               @System                            20 k
perl-HTTP-Message                                    noarch                           6.11-1.fc22                                @System                           173 k
perl-HTTP-Negotiate                                  noarch                           6.01-9.fc22                                @System                            29 k
perl-IO-HTML                                         noarch                           1.001-2.fc22                               @System                            43 k
perl-IO-Multiplex                                    noarch                           1.16-1.fc22                                @System                            43 k
perl-IO-Socket-INET6                                 noarch                           2.72-3.fc22                                @System                            52 k
perl-IO-Socket-IP                                    noarch                           0.36-1.fc22                                @System                            95 k
perl-IO-Socket-SSL                                   noarch                           2.012-1.fc22                               @System                           481 k
perl-IO-stringy                                      noarch                           2.111-1.fc22                               @System                           126 k
perl-JSON                                            noarch                           2.90-3.fc22                                @System                           269 k
perl-LDAP                                            noarch                           1:0.65-1.fc22                              @System                           949 k
perl-LWP-MediaTypes                                  noarch                           6.02-6.fc22                                @System                            61 k
perl-MIME-Lite                                       noarch                           3.030-3.fc22                               @System                           245 k
perl-MIME-Types                                      noarch                           2.09-1.fc22                                @System                           145 k
perl-MIME-tools                                      noarch                           5.506-1.fc22                               @System                           508 k
perl-Mail-DKIM                                       noarch                           0.40-5.fc22                                @System                           306 k
perl-Mail-SPF                                        noarch                           2.9.0-5.fc22                               @System                           316 k
perl-MailTools                                       noarch                           2.14-1.fc22                                @System                           193 k
perl-NTLM                                            noarch                           1.09-9.fc22                                @System                            32 k
perl-Net-CIDR-Lite                                   noarch                           0.21-11.fc22                               @System                            27 k
perl-Net-DNS                                         i686                             0.83-1.fc22                                @System                           631 k
perl-Net-HTTP                                        noarch                           6.07-2.fc22                                @System                            53 k
perl-Net-LibIDN                                      i686                             0.12-19.fc22                               @System                            50 k
perl-Net-SMTP-SSL                                    noarch                           1.01-18.fc22                               @System                           4.5 k
perl-Net-SSLeay                                      i686                             1.68-1.fc22                                @System                           1.0 M
perl-Net-Server                                      noarch                           2.007-4.fc22                               @System                           514 k
perl-NetAddr-IP                                      i686                             4.075-3.fc22                               @System                           322 k
perl-Razor-Agent                                     i686                             2.85-18.fc22                               @System                           279 k
perl-Socket6                                         i686                             0.25-4.fc22                                @System                            49 k
perl-Sys-Syslog                                      i686                             0.33-311.fc22                              @System                            88 k
perl-Text-Soundex                                    i686                             3.04-294.fc22                              @System                            29 k
perl-Text-Unidecode                                  noarch                           1.23-1.fc22                                @System                           437 k
perl-TimeDate                                        noarch                           1:2.30-5.fc22                              @System                            98 k
perl-Unix-Syslog                                     i686                             1.1-19.fc22                                @System                            50 k
perl-WWW-RobotRules                                  noarch                           6.02-10.fc22                               @System                            26 k
perl-XML-Filter-BufferText                           noarch                           1.01-21.fc22                               @System                           6.1 k
perl-XML-NamespaceSupport                            noarch                           1.11-14.fc22                               @System                            28 k
perl-XML-SAX-Base                                    noarch                           1.08-12.fc22                               @System                           176 k
perl-XML-SAX-Writer                                  noarch                           0.53-7.fc22                                @System                            52 k
perl-libwww-perl                                     noarch                           6.13-1.fc22                                @System                           480 k
procmail                                             i686                             3.22-36.fc22                               @System                           347 k
spamassassin                                         i686                             3.4.1-2.fc22                               @System                           3.7 M
tmpwatch                                             i686                             2.11-6.fc22                                @System                            57 k
unzoo                                                i686                             4.4-16.fc22                                @System                            39 k
Transaction Summary
==========================================================================================================================================================================
Remove  77 Packages
Installed size: 24 M
Is this ok [y/N]: n
Operation aborted.
[root@mail ~]# dnf install amavisd-new
Last metadata expiration check performed 0:49:45 ago on Tue May  3 21:16:54 2016.
Package amavisd-new-2.10.1-4.fc22.noarch is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@mail ~]# free
total        used        free      shared  buff/cache   available
Mem:         357020      217208       60900          16       78912      111260
Swap:       2097148      406868     1690280
[root@mail ~]# vi /etc/amavisd.conf
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# vi /etc/amavisd/amavisd.conf
@                                      Documents/                             .pki/                                  .ssh2/
.bash_history                          Downloads/                             postfix.info                           .tcshrc
.bash_logout                           .ICEauthority                          postfix-policyd-spf-perl-2.010/        Templates/
.bash_profile                          .lesshst                               postfix-policyd-spf-perl-2.010.tar.gz  Videos/
.bashrc                                .local/                                Public/                                .viminfo
.cache/                                Maildir/                               .razor/                                .xsession-errors
.config/                               Music/                                 .rnd
.cshrc                                 .mysql_history                         sent
Desktop/                               Pictures/                              .ssh/
[root@mail ~]# vi /etc/amavisd/amavisd.conf
@                                      Documents/                             .pki/                                  .ssh2/
.bash_history                          Downloads/                             postfix.info                           .tcshrc
.bash_logout                           .ICEauthority                          postfix-policyd-spf-perl-2.010/        Templates/
.bash_profile                          .lesshst                               postfix-policyd-spf-perl-2.010.tar.gz  Videos/
.bashrc                                .local/                                Public/                                .viminfo
.cache/                                Maildir/                               .razor/                                .xsession-errors
.config/                               Music/                                 .rnd
.cshrc                                 .mysql_history                         sent
Desktop/                               Pictures/                              .ssh/
[root@mail ~]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
$log_level = 0;              # verbosity 0..5, -d
$log_recip_templ = undef;    # disable by-recipient level-0 log entries
$do_syslog = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';   # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
@local_domains_maps = ( [".$mydomain"] );  # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "/var/run/amavisd/amavisd.sock";  # amavisd-release or amavis-milter
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
virus_admin_maps => ["virusalert@$mydomain"],
spam_admin_maps  => ["virusalert@$mydomain"],
warnbadhsender   => 1,
# forward to a smtpd service providing DKIM signing service
forward_method => 'smtp:[127.0.0.1]:10027',
# force MTA conversion to 7-bit (e.g. before DKIM signing)
smtpd_discard_ehlo_keywords => ['8BITMIME'],
bypass_banned_checks_maps => [1],  # allow sending any file names and types
terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};
$interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
# Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
# (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
$policy_bank{'AM.PDP-SOCK'} = {
protocol => 'AM.PDP',
auth_required_release => 0,  # do not require secret_id for amavisd-release
};
$sa_tag_level_deflt  = 2.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.2;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.9;  # triggers spam evasive actions (e.g. blocks mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
$penpals_bonus_score = 8;    # (no effect without a @storage_sql_dsn database)
$penpals_threshold_high = $sa_kill_level_deflt;  # don't waste time on hi spam
$bounce_killer_score = 100;  # spam score points to add for joe-jobbed bounces
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000
# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
$virus_admin               = undef;                    # notifications recip.
$mailfrom_notify_admin     = undef;                    # notifications sender
$mailfrom_notify_recip     = undef;                    # notifications sender
$mailfrom_notify_spamadmin = undef;                    # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
"/etc/amavisd/amavisd.conf" 816L, 36778C written
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# useradd amavis
useradd: user 'amavis' already exists
[root@mail ~]# service amavisd start
Redirecting to /bin/systemctl start  amavisd.service
Job for amavisd.service failed. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@mail ~]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# netstat -naltup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      22103/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN      1537/perl
tcp        0      0 192.168.198.18:53       0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1238/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd
tcp        0      0 0.0.0.0:88              0.0.0.0:*               LISTEN      1253/nginx: master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1518/master
tcp        0      0 0.0.0.0:89              0.0.0.0:*               LISTEN      1183/httpd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      1221/opendkim
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      28199/svnserve
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 192.168.198.18:22       218.83.100.141:49490    ESTABLISHED 21927/sshd: root@pt
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd
tcp6       0      0 :::88                   :::*                    LISTEN      1253/nginx: master
tcp6       0      0 :::3306                 :::*                    LISTEN      1454/mysqld
udp        0      0 0.0.0.0:10000           0.0.0.0:*                           1537/perl
udp        0      0 192.168.198.18:53       0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:323           0.0.0.0:*                           660/chronyd
udp6       0      0 ::1:323                 :::*                                660/chronyd
[root@mail ~]# systemctl status amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: activating (start) since Tue 2016-05-03 22:10:03 CST; 2s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Control: 23155 (amavisd)
CGroup: /system.slice/amavisd.service
May 03 22:10:03 mail systemd[1]: Starting Amavisd-new is an interface between MTA and content checkers....
May 03 22:10:05 mail systemd[1]: amavisd.service: control process exited, code=exited status=255
May 03 22:10:05 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:10:05 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:10:05 mail systemd[1]: amavisd.service failed.
May 03 22:10:05 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:10:05 mail systemd[1]: Starting Amavisd-new is an interface between MTA and content checkers....
[root@mail ~]# cd /etc/init.d
[root@mail init.d]# ls
courier-authlib  courier-authlib.bak  functions  livesys  livesys-late  netconsole  network  README  webmin
[root@mail init.d]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2016-05-03 22:10:19 CST; 1min 41s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23190 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)
May 03 22:10:19 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:10:19 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:10:19 mail systemd[1]: amavisd.service failed.
May 03 22:10:19 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:10:19 mail systemd[1]: start request repeated too quickly for amavisd.service
May 03 22:10:19 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:10:19 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:10:19 mail systemd[1]: amavisd.service failed.
[root@mail init.d]# service amavisd stop
Redirecting to /bin/systemctl stop  amavisd.service
[root@mail init.d]# service amavisd start
Redirecting to /bin/systemctl start  amavisd.service
Job for amavisd.service failed. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@mail init.d]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2016-05-03 22:12:34 CST; 26ms ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23257 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)
May 03 22:12:34 mail systemd[1]: amavisd.service: control process exited, code=exited status=255
May 03 22:12:34 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:12:34 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:12:34 mail systemd[1]: amavisd.service failed.
May 03 22:12:34 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:12:34 mail systemd[1]: Starting Amavisd-new is an interface between MTA and content checkers....
[root@mail init.d]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2016-05-03 22:12:36 CST; 36s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23274 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)
May 03 22:12:35 mail systemd[1]: amavisd.service: control process exited, code=exited status=255
May 03 22:12:35 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:12:35 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:12:35 mail systemd[1]: amavisd.service failed.
May 03 22:12:36 mail systemd[1]: amavisd.service holdoff time over, scheduling restart.
May 03 22:12:36 mail systemd[1]: start request repeated too quickly for amavisd.service
May 03 22:12:36 mail systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
May 03 22:12:36 mail systemd[1]: Unit amavisd.service entered failed state.
May 03 22:12:36 mail systemd[1]: amavisd.service failed.
[root@mail init.d]# tail -f /var/log/
anaconda/             cron-20160501         dnf.rpm.log-20160405  httpd/                messages              samba/                spooler-20160501
audit/                cups/                 dnf.rpm.log-20160425  journal/              messages-20160411     secure                sssd/
boot.log              dnf.log               dovecot.log           lastlog               messages-20160417     secure-20160411       tallylog
btmp                  dnf.log-20160430      firewalld             lightdm/              messages-20160425     secure-20160417       tomcat/
btmp-20160501         dnf.log-20160501      freshclam.log         maillog               messages-20160501     secure-20160425       wtmp
chrony/               dnf.log-20160502      hawkey.log            maillog-20160411      nginx/                secure-20160501       Xorg.0.log
cron                  dnf.log-20160503      hawkey.log-20160425   maillog-20160417      php-fpm/              spooler               yum.log
cron-20160411         dnf.rpm.log           hawkey.log-20160428   maillog-20160425      pluto/                spooler-20160411
cron-20160417         dnf.rpm.log-20160212  hawkey.log-20160501   maillog-20160501      ppp/                  spooler-20160417
cron-20160425         dnf.rpm.log-20160303  hawkey.log-20160503   mariadb/              README                spooler-20160425
[root@mail init.d]# tail -f /var/log/a
anaconda/ audit/
[root@mail init.d]# tail -f /var/log/a
anaconda/ audit/
[root@mail init.d]# Testing Amavisd-new
-bash: Testing: command not found
[root@mail init.d]# cd
> q
-bash: cd: q: No such file or directory
[root@mail init.d]# cd
> q
-bash: cd: q: No such file or directory
[root@mail init.d]# cd /
[root@mail /]#
[root@mail /]#
[root@mail /]# Testing Amavisd-new
-bash: Testing: command not found
[root@mail /]# vi /etc/amavisd.conf
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
/notify
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
virus_admin_maps => ["virusalert@$mydomain"],
spam_admin_maps  => ["virusalert@$mydomain"],
warnbadhsender   => 1,
# forward to a smtpd service providing DKIM signing service
forward_method => 'smtp:[127.0.0.1]:10027',
# force MTA conversion to 7-bit (e.g. before DKIM signing)
smtpd_discard_ehlo_keywords => ['8BITMIME'],
bypass_banned_checks_maps => [1],  # allow sending any file names and types
terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};
$interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
# Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
# (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
$policy_bank{'AM.PDP-SOCK'} = {
protocol => 'AM.PDP',
/notify
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000
# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
$virus_admin               = undef;                    # notifications recip.
$mailfrom_notify_admin     = undef;                    # notifications sender
$mailfrom_notify_recip     = undef;                    # notifications sender
$mailfrom_notify_spamadmin = undef;                    # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_BOUNCE;
$final_spam_destiny       = D_DISCARD;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_BOUNCE;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
search hit BOTTOM, continuing at TOP
$syslog_facility = 'mail';   # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
@local_domains_maps = ( [".$mydomain"] );  # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "/var/run/amavisd/amavisd.sock";  # amavisd-release or amavis-milter
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
virus_admin_maps => ["virusalert@$mydomain"],
spam_admin_maps  => ["virusalert@$mydomain"],
/10025
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_BOUNCE;
$final_spam_destiny       = D_DISCARD;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_BOUNCE;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam
# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
@keep_decoded_original_maps = (new_RE(
qr'^MAIL$',                # let virus scanner see full original message
qr'^MAIL-UNDECIPHERABLE$', # same as ^MAIL$ if mail is undecipherable
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
# qr'^Zip archive data',     # don't trust Archive::Zip
));
$banned_filename_re = new_RE(
### BLOCKED ANYWHERE
# qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
qr'^.(exe-ms|dll)$',                   # banned file(1) types, rudimentary
# qr'^.(exe|lha|cab|dll)$',              # banned file(1) types
### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
/@av_scanners
# ['doc',  &do_ole,   'ripole'],  # no ripole package so far
['cab',  &do_cabextract, 'cabextract'],
# ['tnef', &do_tnef_ext, 'tnef'],  # use internal do_tnef() instead
['tnef', &do_tnef],
# ['lha',  &do_lha,   'lha'],  # not safe, use 7z instead
# ['sit',  &do_unstuff, 'unstuff'],  # not safe
[['zip','kmz'], &do_7zip,  ['7za', '7z'] ],
[['zip','kmz'], &do_unzip],
['7z',   &do_7zip,  ['7zr', '7za', '7z'] ],
[[qw(gz bz2 Z tar)],
&do_7zip,  ['7za', '7z'] ],
[[qw(xz lzma jar cpio arj rar swf lha iso cab deb rpm)],
&do_7zip,  '7z' ],
['exe',  &do_executable, ['unrar','rar'], 'lha', ['unarj','arj'] ],
);
@av_scanners = (
# ### http://www.sophos.com/
# ['Sophos-SSSP',  # SAV Dynamic Interface
#   &ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
#           # or: ["{}", 'sssp:[127.0.0.1]:4010'],
#   qr/^DONE OKb/m, qr/^VIRUSb/m, qr/^VIRUSs*(S*)/m ],
# ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
# ['Sophie',
#   &ask_daemon, ["{}/n", 'sophie:/var/run/sophie'],
#   qr/(?x)^ 0+ ( : | [00rn]* $)/,  qr/(?x)^ 1 ( : | [00rn]* $)/,
#   qr/(?x)^ [-+]? d+ : (.*?) [00rn]* $/m ],
# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
# ['Sophos SAVI', &ask_daemon, ['{}','savi-perl:'] ],
# ['Avira SAVAPI',
#   &ask_daemon, ["*", 'savapi:/var/tmp/.savapi3', 'product-id'],
#   qr/^(200|210)/m,  qr/^(310|420|319)/m,
#   qr/^(?:310|420)[,s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
# settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1
  ### http://www.clamav.net/
['ClamAV-clamd',
&ask_daemon, ["CONTSCAN {}n", "/var/run/clamd.amavisd/clamd.sock"],
qr/bOK$/m, qr/bFOUND$/m,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# NOTE: run clamd under the same user as amavisd - or run it under its own
#   uid such as clamav, add user clamav to the amavis group, and then add
#   AllowSupplementaryGroups to clamd.conf;
# NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
#   this entry; when running chrooted one may prefer a socket under $MYHOME.
# ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
# # note that Mail::ClamAV requires perl to be build with threading!
# ['Mail::ClamAV', &ask_daemon, ['{}','clamav-perl:'],
#   [0], [1], qr/^INFECTED: (.+)/m],
# ### http://www.openantivirus.org/
# ['OpenAntiVirus ScannerDaemon (OAV)',
#   &ask_daemon, ["SCAN {}n", '127.0.0.1:8127'],
#   qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],
# ### http://www.vanja.com/tools/trophie/
# ['Trophie',
#   &ask_daemon, ["{}/n", 'trophie:/var/run/trophie'],
search hit BOTTOM, continuing at TOP
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
# $myhostname = 'host.example.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam
# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
@keep_decoded_original_maps = (new_RE(
qr'^MAIL$',                # let virus scanner see full original message
qr'^MAIL-UNDECIPHERABLE$', # same as ^MAIL$ if mail is undecipherable
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
# qr'^Zip archive data',     # don't trust Archive::Zip
));
$banned_filename_re = new_RE(
### BLOCKED ANYWHERE
# qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
qr'^.(exe-ms|dll)$',                   # banned file(1) types, rudimentary
# qr'^.(exe|lha|cab|dll)$',              # banned file(1) types
### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
# [ qr'^.(gz|bz2)$'             => 0 ],  # allow any in gzip or bzip2
[ qr'^.(rpm|cpio|tar)$'       => 0 ],  # allow any in Unix-type archives
  qr'..(pif|scr)$'i,                     # banned extensions - rudimentary
# qr'^.zip$',                            # block zip type
### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:
# [ qr'^.(zip|rar|arc|arj|zoo)$'=> 0 ],  # allow any within these archives
  qr'^application/x-msdownload$'i,        # block these MIME types
qr'^application/x-msdos-program$'i,
qr'^application/hta$'i,
# qr'^message/partial$'i,         # rfc2046 MIME type
# qr'^message/external-body$'i,   # rfc2046 MIME type
# qr'^(application/x-msmetafile|image/x-wmf)$'i,  # Windows Metafile MIME type
# qr'^.wmf$',                            # Windows Metafile file(1) type
  # block certain double extensions in filenames
qr'^(?!cid:).*.[^./]*[A-Za-z][^./]*.s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.s]*$'i,
# qr'{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}}?'i, # Class ID CLSID, strict
# qr'{[0-9a-z]{4,}(-[0-9a-z]{4,}){0,7}}?'i, # Class ID extension CLSID, loose
  qr'..(exe|vbs|pif|scr|cpl)$'i,             # banned extension - basic
# qr'..(exe|vbs|pif|scr|cpl|bat|cmd|com)$'i, # banned extension - basic+cmd
# qr'..(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|
#        inf|ini|ins|isp|js|jse|lib|lnk|mda|mdb|mde|mdt|mdw|mdz|msc|msi|
#        msp|mst|ocx|ops|pcd|pif|prg|reg|scr|sct|shb|shs|sys|vb|vbe|vbs|vxd|
#        wmf|wsc|wsf|wsh)$'ix,                # banned extensions - long
# qr'..(asd|asf|asx|url|vcs|wmd|wmz)$'i,     # consider also
# qr'..(ani|cur|ico)$'i,                 # banned cursors and icons filename
# qr'^.ani$',                            # banned animated cursor file(1) type
# qr'..(mim|b64|bhx|hqx|xxe|uu|uue)$'i,  # banned extension - WinZip vulnerab.
);
# See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
# and http://www.cknow.com/vtutor/vtextensions.htm
# ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING
@score_sender_maps = ({ # a by-recipient hash lookup table,
# results from all matching recipient tables are summed
# ## per-recipient personal tables  (NOTE: positive: black, negative: white)
# 'user1@example.com'  => [{'bla-mobile.press@example.com' => 10.0}],
# 'user3@example.com'  => [{'.ebay.com'                 => -3.0}],
# 'user4@example.com'  => [{'cleargreen@cleargreen.com' => -7.0,
#                           '.cleargreen.com'           => -5.0}],
  ## site-wide opinions about senders (the '.' matches any recipient)
'.' => [  # the _first_ matching sender determines the score boost
   new_RE(  # regexp-type lookup table, just happens to be all soft-blacklist
[qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i         => 5.0],
[qr'^(greatcasino|investments|lose_weight_today|market.alert)@'i=> 5.0],
[qr'^(money2you|MyGreenCard|new.tld.registry|opt-out|opt-in)@'i=> 5.0],
[qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i   => 5.0],
[qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i  => 5.0],
[qr'^(your_friend|greatoffers)@'i                                => 5.0],
/@av
# ['doc',  &do_ole,   'ripole'],  # no ripole package so far
['cab',  &do_cabextract, 'cabextract'],
# ['tnef', &do_tnef_ext, 'tnef'],  # use internal do_tnef() instead
['tnef', &do_tnef],
# ['lha',  &do_lha,   'lha'],  # not safe, use 7z instead
# ['sit',  &do_unstuff, 'unstuff'],  # not safe
[['zip','kmz'], &do_7zip,  ['7za', '7z'] ],
[['zip','kmz'], &do_unzip],
['7z',   &do_7zip,  ['7zr', '7za', '7z'] ],
[[qw(gz bz2 Z tar)],
&do_7zip,  ['7za', '7z'] ],
[[qw(xz lzma jar cpio arj rar swf lha iso cab deb rpm)],
&do_7zip,  '7z' ],
['exe',  &do_executable, ['unrar','rar'], 'lha', ['unarj','arj'] ],
);
@av_scanners = (
# ### http://www.sophos.com/
# ['Sophos-SSSP',  # SAV Dynamic Interface
#   &ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
#           # or: ["{}", 'sssp:[127.0.0.1]:4010'],
#   qr/^DONE OKb/m, qr/^VIRUSb/m, qr/^VIRUSs*(S*)/m ],
# ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
# ['Sophie',
#   &ask_daemon, ["{}/n", 'sophie:/var/run/sophie'],
#   qr/(?x)^ 0+ ( : | [00rn]* $)/,  qr/(?x)^ 1 ( : | [00rn]* $)/,
#   qr/(?x)^ [-+]? d+ : (.*?) [00rn]* $/m ],
# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
# ['Sophos SAVI', &ask_daemon, ['{}','savi-perl:'] ],
# ['Avira SAVAPI',
#   &ask_daemon, ["*", 'savapi:/var/tmp/.savapi3', 'product-id'],
#   qr/^(200|210)/m,  qr/^(310|420|319)/m,
#   qr/^(?:310|420)[,s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
# settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1
  ### http://www.clamav.net/
['ClamAV-clamd',
&ask_daemon, ["CONTSCAN {}n", "/tmp/clamd.sock"],
qr/bOK$/m, qr/bFOUND$/m,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# NOTE: run clamd under the same user as amavisd - or run it under its own
#   uid such as clamav, add user clamav to the amavis group, and then add
#   AllowSupplementaryGroups to clamd.conf;
# NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
#   this entry; when running chrooted one may prefer a socket under $MYHOME.
# ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
# # note that Mail::ClamAV requires perl to be build with threading!
# ['Mail::ClamAV', &ask_daemon, ['{}','clamav-perl:'],
#   [0], [1], qr/^INFECTED: (.+)/m],
# ### http://www.openantivirus.org/
# ['OpenAntiVirus ScannerDaemon (OAV)',
#   &ask_daemon, ["SCAN {}n", '127.0.0.1:8127'],
#   qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],
# ### http://www.vanja.com/tools/trophie/
# ['Trophie',
#   &ask_daemon, ["{}/n", 'trophie:/var/run/trophie'],
#   qr/(?x)^ 0+ ( : | [00rn]* $)/m,  qr/(?x)^ 1 ( : | [00rn]* $)/m,
#   qr/(?x)^ [-+]? d+ : (.*?) [00rn]* $/m ],
# ### http://www.grisoft.com/
# ['AVG Anti-Virus',
#   &ask_daemon, ["SCAN {}n", '127.0.0.1:55555'],
#   qr/^200/m, qr/^403/m, qr/^403[- ].*: ([^rn]+)/m ],
# ### http://www.f-prot.com/
# ['F-Prot fpscand',  # F-PROT Antivirus for BSD/Linux/Solaris, version 6
#   &ask_daemon,
#   ["SCAN FILE {}/*n", '127.0.0.1:10200'],
#   qr/^(0|8|64) /m,
#   qr/^([1235679]|1[01345]) |<[^>:]*(?i)(infected|suspicious|unwanted)/m,
#   qr/(?i)<[^>:]*(?:infected|suspicious|unwanted)[^>:]*: ([^>]*)>/m ],
# ### http://www.f-prot.com/
# ['F-Prot f-protd',  # old version
#   &ask_daemon,
#   ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0rnrn",
#     ['127.0.0.1:10200', '127.0.0.1:10201', '127.0.0.1:10202',
#      '127.0.0.1:10203', '127.0.0.1:10204'] ],
#   qr/(?i)<summary[^>]*>clean</summary>/m,
#   qr/(?i)<summary[^>]*>infected</summary>/m,
#   qr/(?i)<name>(.+)</name>/m ],
# ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
# ['DrWebD', &ask_daemon,   # DrWebD 4.31 or later
#   [pack('N',1).  # DRWEBD_SCAN_CMD
#    pack('N',0x00280001).   # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
#    pack('N',     # path length
#      length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")).
#    '{}/*'.       # path
#    pack('N',0).  # content size
#    pack('N',0),
#    '/var/drweb/run/drwebd.sock',
#  # '/var/amavis/var/run/drwebd.sock',   # suitable for chroot
#  # '/usr/local/drweb/run/drwebd.sock',  # FreeBSD drweb ports default
#  # '127.0.0.1:3000',                    # or over an inet socket
#   ],
#   qr/Ax00[x10x11][x00x10]x00/sm,        # IS_CLEAN,EVAL_KEY; SKIPPED
#   qr/Ax00[x00x01][x00x10][x20x40x80]/sm,# KNOWN_V,UNKNOWN_V,V._MODIF
#   qr/A.{12}(?:infected with )?([^x00]+)x00/sm,
# ],
# # NOTE: If using amavis-milter, change length to:
# # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx").
  ### http://www.kaspersky.com/  (kav4mailservers)
['KasperskyLab AVP - aveclient',
['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
'/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
'-p /var/run/aveserver -s {}/*',
[0,3,6,8], qr/b(INFECTED|SUSPICION|SUSPICIOUS)b/m,
qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m,
],
# NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious,
# currupted or protected archives are to be handled
  ### http://www.kaspersky.com/
['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
'-* -P -B -Y -O- {}', [0,3,6,8], [2,4],    # any use for -A -K   ?
qr/infected: (.+)/m,
sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
],
  ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
### products and replaced by aveserver and aveclient
['KasperskyLab AVPDaemonClient',
[ '/opt/AVP/kavdaemon',       'kavdaemon',
'/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
'/opt/AVP/AvpTeamDream',    'AvpTeamDream',
'/opt/AVP/avpdc', 'avpdc' ],
"/etc/amavisd/amavisd.conf" 816L, 36754C written
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# amavisd debug
Config file "/etc/amavisd.conf" does not exist, at /usr/sbin/amavisd line 2150.
[root@mail /]# cp /etc/amavisd/amavisd.conf /etc/amavisd.conf
[root@mail /]# amavisd debug
May  3 22:23:10.075 mail /usr/sbin/amavisd[23412]: logging initialized, log level 0, syslog: amavis.mail
The value of variable $myhostname is "mail", but should have been
a fully qualified domain name; perhaps uname(3) did not provide such.
You must explicitly assign a FQDN of this host to variable $myhostname
in amavisd.conf, or fix what uname(3) provides as a host's network name!
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
/$myhostname
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
/$myhostname
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
$myhostname = 'mail.xishui139.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
"/etc/amavisd/amavisd.conf" 816L, 36754C written
[root@mail /]#
[root@mail /]#
[root@mail /]# cp /etc/amavisd/amavisd.conf /etc/amavisd.conf
cp: overwrite ?etc/amavisd.conf? y
[root@mail /]# amavisd debug
May  3 22:25:01.285 mail.xishui139.com /usr/sbin/amavisd[23451]: logging initialized, log level 0, syslog: amavis.mail
May  3 22:25:01.286 mail.xishui139.com /usr/sbin/amavisd[23451]: starting. /usr/sbin/amavisd at mail.xishui139.com amavisd-new-2.10.1 (20141025), Unicode aware, LANG="en_US.UTF-8"
May  3 22:25:01.286 mail.xishui139.com /usr/sbin/amavisd[23451]: perl=5.020003, user=, EUID: 979 (979);  group=, EGID: 974 974 (974 974)
May  3 22:25:02.251 mail.xishui139.com /usr/sbin/amavisd[23451]: INFO: no optional modules: unicore::lib::Perl::SpacePer.pl unicore::lib::Nt::De.pl Unix::Getrusage
May  3 22:25:02.252 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: attempting to load scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
May  3 22:25:02.252 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
May  3 22:25:04.175 mail.xishui139.com /usr/sbin/amavisd[23451]: INFO: SA version: 3.4.1, 3.004001, no optional modules: Image::Info Image::Info::GIF Image::Info::JPEG Image::Info::PNG Image::Info::BMP Image::Info::TIFF
May  3 22:25:04.175 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: init_pre_chroot on SpamAssassin done
May  3 22:25:04.176 mail.xishui139.com /usr/sbin/amavisd[23451]: socket module IO::Socket::IP, protocol families available: INET
May  3 22:25:04.177 mail.xishui139.com /usr/sbin/amavisd[23451]: bind to /var/run/amavisd/amavisd.sock|unix, 127.0.0.1:10024/tcp
May  3 22:25:04.179 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: 2016/05/03-22:25:04 Amavis (type Net::Server::PreForkSimple) starting! pid(23451)
May  3 22:25:04.206 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Binding to UNIX socket file "/var/run/amavisd/amavisd.sock"
May  3 22:25:04.208 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
May  3 22:25:04.209 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Group Not Defined.  Defaulting to EGID '974 974'
May  3 22:25:04.210 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: User Not Defined.  Defaulting to EUID '979'
May  3 22:25:04.210 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Setting up serialization via flock
May  3 22:25:04.212 mail.xishui139.com /usr/sbin/amavisd[23451]: after_chroot_init: EUID: 979 (979);  EGID: 974 974 (974 974)
May  3 22:25:04.212 mail.xishui139.com /usr/sbin/amavisd[23451]: config files read: /etc/amavisd.conf
May  3 22:25:04.270 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Amavis::Conf        2.404
May  3 22:25:04.271 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Archive::Zip        1.46
May  3 22:25:04.271 mail.xishui139.com /usr/sbin/amavisd[23451]: Module BerkeleyDB          0.55
May  3 22:25:04.271 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Compress::Raw::Zlib 2.068
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Compress::Zlib      2.068
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Crypt::OpenSSL::RSA 0.28
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module DB_File             1.835
May  3 22:25:04.272 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Digest::MD5         2.54
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Digest::SHA         5.95
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Encode              2.73
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module File::LibMagic      1.00
May  3 22:25:04.273 mail.xishui139.com /usr/sbin/amavisd[23451]: Module File::Temp          0.2304
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module IO::Socket::INET6   2.72
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module IO::Socket::IP      0.36
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module MIME::Entity        5.506
May  3 22:25:04.274 mail.xishui139.com /usr/sbin/amavisd[23451]: Module MIME::Parser        5.506
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module MIME::Tools         5.506
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::DKIM::Signer  0.4
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::DKIM::Verifier 0.4
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::Header        2.14
May  3 22:25:04.275 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::Internet      2.14
May  3 22:25:04.276 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::SPF           v2.009
May  3 22:25:04.276 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Mail::SpamAssassin  3.004001
May  3 22:25:04.277 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Net::DNS            0.83
May  3 22:25:04.277 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Net::LibIDN         0.12
May  3 22:25:04.277 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Net::Server         2.007
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module NetAddr::IP         4.079
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Razor2::Client::Version 2.84
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Scalar::Util        1.41
May  3 22:25:04.278 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Socket              2.019
May  3 22:25:04.279 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Socket6             0.25
May  3 22:25:04.279 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Time::HiRes         1.9726
May  3 22:25:04.279 mail.xishui139.com /usr/sbin/amavisd[23451]: Module URI                 1.65
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: Module Unix::Syslog        1.1
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: Amavis::ZMQ code     NOT loaded
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: Amavis::DB code      loaded
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: SQL base code        NOT loaded
May  3 22:25:04.280 mail.xishui139.com /usr/sbin/amavisd[23451]: SQL::Log code        NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: SQL::Quarantine      NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Lookup::SQL code     NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Lookup::LDAP code    NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: AM.PDP-in proto code loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: SMTP-in proto code   loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Courier proto code   NOT loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: SMTP-out proto code  loaded
May  3 22:25:04.281 mail.xishui139.com /usr/sbin/amavisd[23451]: Pipe-out proto code  NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: BSMTP-out proto code NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: Local-out proto code loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: OS_Fingerprint code  NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-VIRUS code      loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM code       loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM-EXT code   NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM-C code     NOT loaded
May  3 22:25:04.282 mail.xishui139.com /usr/sbin/amavisd[23451]: ANTI-SPAM-SA code    loaded
May  3 22:25:04.283 mail.xishui139.com /usr/sbin/amavisd[23451]: Unpackers code       loaded
May  3 22:25:04.283 mail.xishui139.com /usr/sbin/amavisd[23451]: DKIM code            loaded
May  3 22:25:04.283 mail.xishui139.com /usr/sbin/amavisd[23451]: Tools code           NOT loaded
May  3 22:25:04.390 mail.xishui139.com /usr/sbin/amavisd[23451]: Found $file            at /usr/bin/file
May  3 22:25:04.423 mail.xishui139.com /usr/sbin/amavisd[23451]: Found $altermime       at /usr/bin/altermime
May  3 22:25:04.423 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .mail
May  3 22:25:04.425 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .F    at /usr/bin/unfreeze
May  3 22:25:04.453 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .Z    at /usr/bin/gzip -d
May  3 22:25:04.454 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .gz   at /usr/bin/gzip -d
May  3 22:25:04.454 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .gz   (backup, not used)
May  3 22:25:04.459 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .bz2  at /usr/bin/bzip2 -d
May  3 22:25:04.461 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .xz   at /usr/bin/xzdec
May  3 22:25:04.462 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lzma at /usr/bin/xz -dc --format=lzma
May  3 22:25:04.462 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lrz  at /usr/bin/lrzip -q -k -d -o -
May  3 22:25:04.463 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lzo  at /usr/bin/lzop -d
May  3 22:25:04.463 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lz4  at /usr/bin/lz4c -d
May  3 22:25:04.464 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .rpm  at /usr/bin/rpm2cpio
May  3 22:25:04.537 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cpio at /usr/bin/pax
May  3 22:25:04.537 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .tar  at /usr/bin/pax
May  3 22:25:04.580 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .deb  at /usr/bin/ar
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: No ext program for   .rar, tried: unrar, rar
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .arj  at /usr/bin/unarj
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .arc  at /usr/bin/nomarch
May  3 22:25:04.601 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .zoo  at /usr/bin/unzoo
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cab  at /usr/bin/cabextract
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .tnef
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .zip  at /usr/bin/7za
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .kmz  at /usr/bin/7za
May  3 22:25:04.602 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .zip  (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Internal decoder for .kmz  (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .7z   at /usr/bin/7za
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .gz   at /usr/bin/7za (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .bz2  at /usr/bin/7za (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .Z    at /usr/bin/7za (backup, not used)
May  3 22:25:04.603 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .tar  at /usr/bin/7za (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .xz   at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lzma at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .jar  at /usr/bin/7z
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cpio at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .arj  at /usr/bin/7z (backup, not used)
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .rar  at /usr/bin/7z
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .swf  at /usr/bin/7z
May  3 22:25:04.604 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .lha  at /usr/bin/7z
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .iso  at /usr/bin/7z
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .cab  at /usr/bin/7z (backup, not used)
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .deb  at /usr/bin/7z (backup, not used)
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .rpm  at /usr/bin/7z (backup, not used)
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Found decoder for    .exe  at /usr/bin/unarj
May  3 22:25:04.605 mail.xishui139.com /usr/sbin/amavisd[23451]: Using primary internal av scanner code for ClamAV-clamd
May  3 22:25:04.675 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: KasperskyLab AVP - aveclient
May  3 22:25:04.675 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: KasperskyLab AntiViral Toolkit Pro (AVP)
May  3 22:25:04.676 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: KasperskyLab AVPDaemonClient
May  3 22:25:04.704 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CentralCommand Vexira (new) vascan
May  3 22:25:04.705 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Avira AntiVir
May  3 22:25:04.705 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Avira AntiVir
May  3 22:25:04.705 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Command AntiVirus for Linux
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Symantec CarrierScan via Symantec CommandLineScanner
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Symantec AntiVirus Scan Engine
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: F-Secure Linux Security
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CAI InoculateIT
May  3 22:25:04.706 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CAI eTrust Antivirus
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: MkS_Vir for Linux (beta)
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: MkS_Vir daemon
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: ESET Software ESETS Command Line Interface
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: ESET NOD32 for Linux File servers
May  3 22:25:04.707 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Norman Virus Control v5 / Linux
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Panda CommandLineSecure 9 for Linux
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: NAI McAfee AntiVirus (uvscan)
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: VirusBuster
May  3 22:25:04.708 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: CyberSoft VFind
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: avast! Antivirus
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: Ikarus AntiVirus for Linux
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: BitDefender
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: BitDefender
May  3 22:25:04.709 mail.xishui139.com /usr/sbin/amavisd[23451]: No primary av scanner: ArcaVir for Linux
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: F-PROT Antivirus for UNIX
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: FRISK F-Prot Antivirus
May  3 22:25:04.710 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: Trend Micro FileScanner
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: drweb - DrWeb Antivirus
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: Kaspersky Antivirus v5.5
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: No secondary av scanner: Sophos Anti Virus (savscan)
May  3 22:25:04.711 mail.xishui139.com /usr/sbin/amavisd[23451]: Using internal spam scanner code for SpamAssassin
May  3 22:25:04.761 mail.xishui139.com /usr/sbin/amavisd[23451]: Deleting db files  in /var/spool/amavisd/db
May  3 22:25:04.839 mail.xishui139.com /usr/sbin/amavisd[23451]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.55, libdb 5.3
May  3 22:25:04.932 mail.xishui139.com /usr/sbin/amavisd[23451]: initializing Mail::SpamAssassin (0)
May  3 22:25:04.933 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamAssassin debug facilities: info
May  3 22:25:11.375 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamAssassin loaded plugins: AskDNS, AutoLearnThreshold, Bayes, BodyEval, Check, DKIM, DNSEval, FreeMail, HTMLEval, HTTPSMismatch, Hashcash, HeaderEval, ImageInfo, MIMEEval, MIMEHeader, Pyzor, Razor2, RelayEval, ReplaceTags, SPF, SpamCop, URIDNSBL, URIDetail, URIEval, VBounce, WLBLEval, WhiteListSubject
May  3 22:25:11.375 mail.xishui139.com /usr/sbin/amavisd[23451]: SpamControl: init_pre_fork on SpamAssassin done
May  3 22:25:11.376 mail.xishui139.com /usr/sbin/amavisd[23451]: extra modules loaded after daemonizing/chrooting: /usr/share/perl5/Net/libnet.cfg, Mail/SpamAssassin/Plugin/FreeMail.pm, Mail/SpamAssassin/Plugin/SpamCop.pm, Net/Cmd.pm, Net/Config.pm, Net/SMTP.pm
May  3 22:25:11.377 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Beginning prefork (2 processes)
May  3 22:25:11.378 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Starting "2" children
May  3 22:25:11.416 mail.xishui139.com /usr/sbin/amavisd[23452]: Net::Server: Child Preforked (23452)
May  3 22:25:11.437 mail.xishui139.com /usr/sbin/amavisd[23452]: entered child_init_hook
May  3 22:25:11.438 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Parent ready for children.
May  3 22:25:11.442 mail.xishui139.com /usr/sbin/amavisd[23453]: Net::Server: Child Preforked (23453)
May  3 22:25:11.443 mail.xishui139.com /usr/sbin/amavisd[23453]: entered child_init_hook
May  3 22:25:11.461 mail.xishui139.com /usr/sbin/amavisd[23452]: SpamControl: init_child on SpamAssassin done
May  3 22:25:11.496 mail.xishui139.com /usr/sbin/amavisd[23453]: SpamControl: init_child on SpamAssassin done
q
quit
^C^Cc
May  3 22:29:00.460 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle (child finishing)
May  3 22:29:00.421 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle (child finishing)
May  3 22:29:00.754 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:00.802 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:00.977 mail.xishui139.com /usr/sbin/amavisd[23452]: SA rundown_child (0)
May  3 22:29:00.977 mail.xishui139.com /usr/sbin/amavisd[23453]: SA rundown_child (0)
May  3 22:29:01.178 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: 2016/05/03-22:29:00 Server closing!
May  3 22:29:01.460 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Kill TERM pid 23452
May  3 22:29:01.685 mail.xishui139.com /usr/sbin/amavisd[23451]: Net::Server: Kill TERM pid 23453
May  3 22:29:02.048 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle (child finishing)
May  3 22:29:01.847 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle (child finishing)
May  3 22:29:02.100 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:02.081 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:02.568 mail.xishui139.com /usr/sbin/amavisd[23452]: SA rundown_child (0)
May  3 22:29:02.620 mail.xishui139.com /usr/sbin/amavisd[23453]: SA rundown_child (0)
May  3 22:29:05.504 mail.xishui139.com /usr/sbin/amavisd[23453]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:05.773 mail.xishui139.com /usr/sbin/amavisd[23453]: child_finish_hook: invoking DESTROY methods
May  3 22:29:05.812 mail.xishui139.com /usr/sbin/amavisd[23452]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:05.951 mail.xishui139.com /usr/sbin/amavisd[23452]: child_finish_hook: invoking DESTROY methods
May  3 22:29:09.923 mail.xishui139.com /usr/sbin/amavisd[23452]: Amavis::DB::SNMP DESTROY called
May  3 22:29:10.755 mail.xishui139.com /usr/sbin/amavisd[23453]: Amavis::DB::SNMP DESTROY called
May  3 22:29:13.242 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle (child finishing)
May  3 22:29:13.298 mail.xishui139.com /usr/sbin/amavisd[23453]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:13.319 mail.xishui139.com /usr/sbin/amavisd[23453]: SA rundown_child (0)
May  3 22:29:13.336 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle (child finishing)
May  3 22:29:13.337 mail.xishui139.com /usr/sbin/amavisd[23452]: child_goes_idle: disconnected none (child finishing)
May  3 22:29:13.337 mail.xishui139.com /usr/sbin/amavisd[23452]: SA rundown_child (0)
May  3 22:29:13.338 mail.xishui139.com /usr/sbin/amavisd[23452]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:13.338 mail.xishui139.com /usr/sbin/amavisd[23452]: child_finish_hook: invoking DESTROY methods
May  3 22:29:13.448 mail.xishui139.com /usr/sbin/amavisd[23453]: SpamControl: rundown_child on SpamAssassin done
May  3 22:29:13.448 mail.xishui139.com /usr/sbin/amavisd[23453]: child_finish_hook: invoking DESTROY methods
[root@mail /]# c
-bash: c: command not found
[root@mail /]#
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
$log_level = 0;              # verbosity 0..5, -d
$log_recip_templ = undef;    # disable by-recipient level-0 log entries
$do_syslog = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';   # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
# $enable_zmq = 1;           # enable use of ZeroMQ (SNMP and nanny)
$nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by dkim_key
@local_domains_maps = ( [".$mydomain"] );  # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "/var/run/amavisd/amavisd.sock";  # amavisd-release or amavis-milter
# option(s) -p overrides $inet_socket_port and $unix_socketname
$inet_socket_port = 10024;   # listen on this local TCP port(s)
# $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
originating => 1,  # is true in MYNETS by default, but let's make it explicit
os_fingerprint_method => undef,  # don't query p0f for internal clients
};
# it is up to MTA to re-route mail from authenticated roaming users or
# from internal hosts to a dedicated TCP port (such as 10026) for filtering
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
originating => 1,  # declare that mail was submitted by our smtp client
allow_disclaimers => 1,  # enables disclaimer insertion if available
# notify administrator of locally originating malware
/mailfrom
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
# @lookup_sql_dsn =
#   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
#     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
#     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
# @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
# $redis_logging_key = 'amavis-log';
# $redis_logging_queue_size_limit = 300000;  # about 250 MB / 100000
# $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
#   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
$virus_admin               = "root@$mydomain";                    # notifications recip.
$mailfrom_notify_admin     = "root@$mydomain";                    # notifications sender
$mailfrom_notify_recip     = "root@$mydomain";                    # notifications sender
$mailfrom_notify_spamadmin = "root@$mydomain";                    # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
@addr_extension_virus_maps      = ('virus');
@addr_extension_banned_maps     = ('banned');
@addr_extension_spam_maps       = ('spam');
@addr_extension_bad_header_maps = ('badh');
# $recipient_delimiter = '+';  # undef disables address extensions altogether
# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
# $dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 3000;
$MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 500*1024*1024;  # bytes  (default undef, not enforced)
$sa_spam_subject_tag = '***Spam*** ';
$defang_virus  = 1;  # MIME-wrap passed infected mail
$defang_banned = 1;  # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{CC_BADH.",3"} = 1;  # NUL or CR character in header
$defang_by_ccat{CC_BADH.",5"} = 1;  # header line longer than 998 characters
$defang_by_ccat{CC_BADH.",6"} = 1;  # header field syntax error
# OTHER MORE COMMON SETTINGS (defaults may suffice):
$myhostname = 'mail.xishui139.com';  # must be a fully-qualified domain name!
$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
$final_virus_destiny      = D_DISCARD;
$final_banned_destiny     = D_PASS;
$final_spam_destiny       = D_PASS;  #!!!  D_DISCARD / D_REJECT
$final_bad_header_destiny = D_PASS;
# $bad_header_quarantine_method = undef;
# $os_fingerprint_method = 'p0f:*:2345';  # to query p0f-analyzer.pl
## hierarchy by which a final setting is chosen:
##   policy bank (based on port or IP address) -> *_by_ccat
##   *_by_ccat (based on mail contents) -> *_maps
##   *_maps (based on recipient address) -> final configuration value
# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
# $warnbadhsender,
# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
#
# @bypass_virus_checks_maps, @bypass_spam_checks_maps,
# @bypass_banned_checks_maps, @bypass_header_checks_maps,
#
# @virus_lovers_maps, @spam_lovers_maps,
# @banned_files_lovers_maps, @bad_header_lovers_maps,
#
# @blacklist_sender_maps, @score_sender_maps,
#
# $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
# $bad_header_quarantine_to, $spam_quarantine_to,
#
# $defang_bad_header, $defang_undecipherable, $defang_spam
"/etc/amavisd/amavisd.conf" 816L, 36802C written
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# service amavisd restart
Redirecting to /bin/systemctl restart  amavisd.service
[root@mail /]# service amavisd status
Redirecting to /bin/systemctl status  amavisd.service
?amavisd.service - Amavisd-new is an interface between MTA and content checkers.
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-05-03 22:40:45 CST; 13s ago
Docs: http://www.ijs.si/software/amavisd/#doc
Process: 23686 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=0/SUCCESS)
Main PID: 23687 (/usr/sbin/amavi)
CGroup: /system.slice/amavisd.service
忖23687 /usr/sbin/amavisd (master)
忖23688 /usr/sbin/amavisd (virgin child)
忖23689 /usr/sbin/amavisd (virgin child)
May 03 22:40:46 mail amavis[23687]: Found decoder for    .rar  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .swf  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .lha  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .iso  at /usr/bin/7z
May 03 22:40:46 mail amavis[23687]: Found decoder for    .exe  at /usr/bin/unarj
May 03 22:40:46 mail amavis[23687]: Using primary internal av scanner code for ClamAV-clamd
May 03 22:40:46 mail amavis[23687]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
May 03 22:40:46 mail amavis[23687]: Deleting db files __db.002,__db.001,__db.003,nanny.db,snmp.db in /var/spool/amavisd/db
May 03 22:40:46 mail amavis[23687]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.55, libdb 5.3
May 03 22:40:45 mail systemd[1]: Started Amavisd-new is an interface between MTA and content checkers..
[root@mail /]# cp /etc/amavisd/amavisd.conf /etc/amavisd.conf
cp: overwrite ?etc/amavisd.conf? y
[root@mail /]# vi /etc/amavisd/amavisd.conf
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
#   see amavisd.conf-default for a list of all variables with their defaults;
#   for more details see documentation in INSTALL, README_FILES/*
#   and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
$max_servers = 2;            # num of pre-forked children (2..30 is common), -m
$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis), -g
$mydomain = 'mail.xishui139.com';   # a convenient default for other settings
$MYHOME = '/var/spool/amavisd';   # a convenient default for other settings, -H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = undef;      # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
# $release_format = 'resend';     # 'attach', 'plain', 'resend'
# $report_format  = 'arf';        # 'attach', 'plain', 'resend', 'arf'
# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
$db_home   = "$MYHOME/db";        # dir for bdb nanny/cache/snmp databases, -D
# $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
$lock_file = "/var/run/amavisd/amavisd.lock";  # -L
$pid_file  = "/var/run/amavisd/amavisd.pid";   # -P
E486: Pattern not found: sa_debug
#   '-f -log scandir {}', [0], [3],
#   qr/Virus found = (.*);/m ],
# # HINT: for an infected file it always returns 3,
# # although the man-page tells a different story
  ### http://www.cyber.com/
['CyberSoft VFind', 'vfind',
'--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/m,
# sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
],
  ### http://www.avast.com/
['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
'-a -i -n -t=A {}', [0], [1], qr/binfected by:s+([^ tn[]]+)/m ],
  ### http://www.ikarus-software.com/
['Ikarus AntiVirus for Linux', 'ikarus',
'{}', [0], [40], qr/Signature (.+) found/m ],
  ### http://www.bitdefender.com/
['BitDefender', 'bdscan',  # new version
'--action=ignore --no-list {}', qr/^Infected filess*:s*0+(?!d)/m,
qr/^(?:Infected files|Identified viruses|Suspect files)s*:s*0*[1-9]/m,
qr/(?:suspected|infected)s*:s*(.*)(?:33|$)/m ],
  ### http://www.bitdefender.com/
['BitDefender', 'bdc',  # old version
'--arc --mail {}', qr/^Infected files *:0+(?!d)/m,
qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m,
qr/(?:suspected|infected): (.*)(?:33|$)/m ],
# consider also: --all --nowarn --alev=15 --flev=15.  The --all argument may
# not apply to your version of bdc, check documentation and see 'bdc --help'
  ### ArcaVir for Linux and Unix http://www.arcabit.pl/
['ArcaVir for Linux', ['arcacmd','arcacmd.static'],
/@av_scan
#   use File::Scan; my($fn)=@_;
#   my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0);
#   my($vname) = $f->scan($fn);
#   $f->error ? (2,"Error: ".$f->error)
#   : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) },
#   ["{}/*"], [0], [1], qr/^(.*) FOUND$/m ],
# ### fully-fledged checker for JPEG marker segments of invalid length
# ['check-jpeg',
#   sub { use JpegTester (); Amavis::AV::ask_av(&JpegTester::test_jpeg, @_) },
#   ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ],
# # NOTE: place file JpegTester.pm somewhere where Perl can find it,
# #       for example in /usr/local/lib/perl5/site_perl
);
@av_scanners_backup = (
  ### http://www.clamav.net/   - backs up clamd or Mail::ClamAV
['ClamAV-clamscan', 'clamscan',
"--stdout --no-summary -r --tempdir=$TEMPBASE {}",
[0], qr/:.*sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# ### http://www.clamav.net/ - using remote clamd scanner as a backup
# ['ClamAV-clamdscan', 'clamdscan',
#   "--stdout --no-summary --config-file=/etc/clamd-client.conf {}",
#   [0], qr/:.*sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# ['ClamAV-clamd-stream',
#   &ask_daemon, ["*", 'clamd:/var/run/clamav/clamd.sock'],
#   qr/bOK$/m, qr/bFOUND$/m,
#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  ### http://www.f-prot.com/   - backs up F-Prot Daemon, V6
['F-PROT Antivirus for UNIX', ['fpscan'],
'--report --mount --adware {}',  # consider: --applications -s 4 -u 3 -z 10
[0,8,64],  [1,2,3, 4+1,4+2,4+3, 8+1,8+2,8+3, 12+1,12+2,12+3],
qr/^[Founds+[^]]*]s+<([^ t(>]*)/m ],
  ### http://www.f-prot.com/   - backs up F-Prot Daemon (old)
['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
'-dumb -archive -packed {}', [0,8], [3,6],   # or: [0], [3,6,8],
qr/(?:Infection:|security risk named) (.+)|s+containss+(.+)$/m ],
  ### http://www.trendmicro.com/   - backs up Trophie
['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
'-za -a {}', [0], qr/Found virus/m, qr/Found virus (.+) in/m ],
  ### http://www.sald.com/, http://drweb.imshop.de/   - backs up DrWebD
['drweb - DrWeb Antivirus',  # security LHA hole in Dr.Web 4.33 and earlier
['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
'-path={} -al -go -ot -cn -upn -ok-',
[0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'m ],
   ### http://www.kaspersky.com/
['Kaspersky Antivirus v5.5',
['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner',
'/opt/kav/5.5/kav4unix/bin/kavscanner',
'/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'],
'-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/m,
#    sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
#    sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
],
  ### http://www.sophos.com/
['Sophos Anti Virus (savscan)',   # formerly known as 'sweep'
['/opt/sophos-av/bin/savscan', 'savscan'],  # 'sweep'
'-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '.
'--no-reset-atime {}',
[0,2], qr/Virus .*? found/m,
qr/^>>> Virus(?: fragment)? '?(.*?)'? found/m,
],
# other options to consider: -idedir=/usr/local/sav
# A name 'sweep' clashes with a name of an audio editor (Debian and FreeBSD).
# Make sure the correct 'sweep' is found in the path if using the old name.
# Always succeeds and considers mail clean.
# Potentially useful when all other scanners fail and it is desirable
# to let mail continue to flow with no virus checking (when uncommented).
# ['always-clean', sub {0}],
);
1;  # insure a defined return value
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# service amavisd restart
Redirecting to /bin/systemctl restart  amavisd.service
[root@mail /]# cp /etc/postfix/master.cf  /etc/postfix/master.cf.bak2016.5.3
[root@mail /]# vi  /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
#submission inet n       -       n       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       n       -       -       qmqpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
policy-spf unix -       n       n       -       -       spawn
user=nobody argv=/usr/bin/perl /usr/libexec/postfix/policyd-spf-perl
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail    unix  -       n       n       -       -       pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp     unix  -       n       n       -       -       pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
:1
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
smtp-amavis unix -  -   -   -   2  smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n  -   -   -   -  smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
"/etc/postfix/master.cf" 156L, 7256C written
[root@mail /]# vi  /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
smtp-amavis unix -  -   -   -   2  smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n  -   -   -   -  smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]#
[root@mail /]# postconf -e 'content_filter=smtp-amavis:[127.0.0.1]:10024'
[root@mail /]# service postfix reload
Redirecting to /bin/systemctl reload  postfix.service
[root@mail /]# Testing Amavisd-new
-bash: Testing: command not found
[root@mail /]# dnf install testing
Last metadata expiration check performed 1:32:34 ago on Tue May  3 21:16:54 2016.
No package testing available.
Error: no package matched: testing
[root@mail /]# netstat -naltup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      22103/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN      1537/perl
tcp        0      0 192.168.198.18:53       0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1238/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd
tcp        0      0 0.0.0.0:88              0.0.0.0:*               LISTEN      1253/nginx: master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1518/master
tcp        0      0 0.0.0.0:89              0.0.0.0:*               LISTEN      1183/httpd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1238/named
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      1221/opendkim
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0      0 127.0.0.1:10024         0.0.0.0:*               LISTEN      23775/amavisd (mast
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      1518/master
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      28199/svnserve
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1192/dovecot
tcp        0    240 192.168.198.18:22       218.83.100.141:49490    ESTABLISHED 21927/sshd: root@pt
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd
tcp6       0      0 :::88                   :::*                    LISTEN      1253/nginx: master
tcp6       0      0 :::3306                 :::*                    LISTEN      1454/mysqld
udp        0      0 0.0.0.0:10000           0.0.0.0:*                           1537/perl
udp        0      0 192.168.198.18:53       0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           1238/named
udp        0      0 127.0.0.1:323           0.0.0.0:*                           660/chronyd
udp6       0      0 ::1:323                 :::*                                660/chronyd
[root@mail /]# /tmp/
.font-unix/                                                                    systemd-private-963e7fff8d7e4deea4091cab226fffac-named.service-5iZmA7/
.ICE-unix/                                                                     systemd-private-963e7fff8d7e4deea4091cab226fffac-nginx.service-lIuegU/
systemd-private-963e7fff8d7e4deea4091cab226fffac-amavisd.service-1b3xNA/       .Test-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-clamd@amavisd.service-haAvkI/ .webmin/
systemd-private-963e7fff8d7e4deea4091cab226fffac-dovecot.service-Dr5qTS/       .X11-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-httpd.service-p9J87C/         .XIM-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-mariadb.service-5BgsMm/
[root@mail /]# /tmp/
.font-unix/                                                                    systemd-private-963e7fff8d7e4deea4091cab226fffac-named.service-5iZmA7/
.ICE-unix/                                                                     systemd-private-963e7fff8d7e4deea4091cab226fffac-nginx.service-lIuegU/
systemd-private-963e7fff8d7e4deea4091cab226fffac-amavisd.service-1b3xNA/       .Test-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-clamd@amavisd.service-haAvkI/ .webmin/
systemd-private-963e7fff8d7e4deea4091cab226fffac-dovecot.service-Dr5qTS/       .X11-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-httpd.service-p9J87C/         .XIM-unix/
systemd-private-963e7fff8d7e4deea4091cab226fffac-mariadb.service-5BgsMm/
[root@mail /]# /var/run/clamd.
clamd.amavisd/ clamd.scan/
[root@mail /]# /var/run/clamd.amavisd/
-bash: /var/run/clamd.amavisd/: Is a directory
[root@mail /]# ls -lh/var/run/clamd.amavisd/
ls: invalid option -- '/'
Try 'ls --help' for more information.
[root@mail /]# ls -lh /var/run/clamd.amavisd/
total 4.0K
-rw-rw-r-- 1 amavis amavis 6 May  3 22:10 clamd.pid
srw-rw-rw- 1 amavis amavis 0 May  3 22:10 clamd.sock
[root@mail /]#

default iconamavisd-service.txt

上一篇:postfix check virus error
下一篇:WannaCry蠕虫详细分析
linux postfix 安装Spamassassin和clamav

linux postfix 安装Spamassassin和clamav

postfix 添加国内反垃圾邮件联盟过滤垃圾邮件

postfix 添加国内反垃圾邮件联盟过滤垃圾邮件

国内影响已扩散,利用“NSA武器库”中漏洞的Wannacry蠕虫勒索软件袭击全球(含修复方案)

国内影响已扩散,利用“NSA武器库”中漏洞的Wannacry蠕虫勒索软件袭击全球(含修复方案)

思科Talos团队深度解析“WannaCry”勒索软件

思科Talos团队深度解析“WannaCry”勒索软件

首发 | Wannacry勒索软件母体主程序逆向分析(含临时解决方案自动化工具)

首发 | Wannacry勒索软件母体主程序逆向分析(含临时解决方案自动化工具)

WannaCry蠕虫详细分析

WannaCry蠕虫详细分析

postfix check virus error

postfix check virus error

发表评论

您必须 [ 登录 ] 才能发表留言!

沙发空闲中,快来抢!