??xml version="1.0" encoding="utf-8" standalone="yes"?>
2、中文字体美?/p>
(1) Ҏ一Q?微Y黑体 Lucida Grande
q里我们采用“微软黑体+Ҏ字体”美化方案,效果q是十分不错的。首先从 q里 下蝲相关字体文gQ解压后得到Lucida Grande和msyh两个字体文gQ将q两个文件放?.fonts 目录下。然后执行一下命令:
$ sudo fc-cache -fv
接着~辑字体配置文g /etc/fonts/language-selector.conf (如果 /etc/fonts
目录下没有这个文Ӟ可以?/usr/share/language-selector/fontconfig 目录下找到相应的版本)Q?
扑ֈ下面的几行:
<family>Bitstream Vera Serif</family>
<family>Bitstream Vera Sans</family>
<family>Bitstream Vera Sans Mono</family>
在后面添加一?br />
<family>Microsoft YaHei</family>
~辑 /etc/apt/sources.list文gQ添加源Q?br />
deb http://www.telemail.fi/mlind/ubuntu gutsy fonts
执行一下命令导入keyQƈq行更新Q?br />
gpg --keyserver subkeys.pgp.net --recv-keys 937215FF
gpg --export --armor 937215FF | sudo apt-key add -
sudo apt-get update && sudo apt-get dist-upgrade
Q这添加字体的cleartype渲染功能Q?/p>
最后调整字体选项Q非{宽字体选择Lucida GrandeQ?P{宽字体选择DejaVu Sans MonoQ?受“字体渲染选择“次像素qx”?/p>
Ҏ二:宋体QTahoma
采用“宋体+Tahoma”得到的化效果也是相当不错的。中文用宋体,英文使用Tahoma。对于习惯了Windows下的字体的用h_q是个不错的选择?/p>
Windows下的simsun.ttc tahoma.ttf verdana.ttf verdanab.ttf verdanaz.ttf tahomabd.ttf verdanai.ttf拯?usr/share/fonts/windows下。然后进?usr/share/fonts/windows目录 中:
$ cd /usr/share/fonts/windows
$ sudo mkfontscale
$ sudo mkfontdir
$ sudo fc-cache -fv
(如果fc-cache命o提示hp|Q尝试对每一个刷新失败的目录和文件用sudo touch命o)
$ sudo chmod 755 *
用这?language-selector.conf 配置文g替换/etc/fonts/language-selector.conf?/p>
讄GNOME的字体。除了等宽字体外Q其他的选择TahomaQ等宽字体用DejaVu Serif Mono?/p>注:其中.fonts目录为登录用户名的home目录下的.fonts目录Q如Q?home/wiflish/.fonts。如果没有,创目录?br />
# auth-mysql-mail-group: (group-name | gid)
# The group name or gid under which access to the mailspool will take place.
# [default: group of user associated with virtual domain]
auth-mysql-mail-group: vmail
# auth-mysql-hostname: hostname [[hostname] hostname] ..
# Host on which to connect to MySQL. Tried in order until a working host is
# found. [default: localhost]
auth-mysql-hostname: localhost
# auth-mysql-database: database
# MySQL database to use for authentication.
auth-mysql-database: yourdatabase
# auth-mysql-username: username
# MySQL username used to access the database.
auth-mysql-username: yourusername
# auth-mysql-password: password
# Password of MySQL user.
auth-mysql-password: yourpassword
# auth-mysql-pass-query: substitution string
# Query template to use for USER/PASS authentication. Must return mailpath,
# password, userid, mailspool type; uses substitution variables as described
# in the man page.
#auth-mysql-pass-query: SELECT mailpath, password, userid, spooltype FROM ...
auth-mysql-pass-query: SELECT CONCAT('/var/mail/', maildir), \
CONCAT('{crypt}', password), \
'vmail', 'bsd' \
FROM mailbox \
WHERE username = CONCAT('$(local_part)', '@', '$(domain)')
׃没有使用vmail-sql中的数据库schemaQ则要将auth-mysql-pass-query配置参数修改成符合你本地数据库schema的查询条件。详l情况参见:
http://www.ex-parrot.com/~chris/tpop3d/tpop3d.conf.5.html ?strong>A note on MySQLauthentication部分
The following options are currently available for SCSI disks and tape drives unless otherwise noted:
-a | --all : equivalent to the combination -i -H -A -l error -l selftest options invoked in that order.
-A | --attributes : outputs the current device temperature, trip temperature, the number of elements in the grown defect list (GLIST) and data from the start-stop log page. Outputs some vendor specific information if available.
-C | --captive : used in conjunction with -t short or -t long options to do short or long self tests in the foreground. [Has no effect on tape drives.]
-d TYPE | --device=TYPE where TYPE is "ata", "scsi", "sat", "marvell", "3ware,N", "hpt,L/N[,M]" or "cciss,N". Overrides utility's guess about the class of the device which is based on the form of the nominated device's name.
-h | --help : outputs lengthy usage message and exits without any other action.
-H | --health : outputs single device health metric determined by the device manufacturer. This will be "OK" or a failure message.
-i | --info : outputs device identification information (derived from a SCSI INQUIRY command) and whether the device supports SMART (and temperature warnings) and if those facilities are currently enabled. The type of transport (e.g. FC or SAS) is also reported, if available. Some users have reported disks that report the wrong transport.
-l TYPE | --log=TYPE where TYPE is either "background", "selftest" or "error". Decodes are outputs the requested log. Note that --all does not include --log=background .
-q TYPE | --quietmode=TYPE where TYPE is either "silent" or "errorsonly". When the type is silent then nothing is output to the console but the exit status is set (so it is suitable for scripts). For "errorsonly" only errors are output to the console. The exit status is always set. [See the smartctl man page.]
-r TYPE | --report=TYPE where TYPE is either "ioctl[,<n>]" or "scsiioctl[,<n>]". Turns on low level debugging of issued commands and responses. These commands are issued through a system command called an "ioctl" in Unix. The debug can be for all issued commands (i.e. "ioctl") or only SCSI commands ("scsiioctl"). Optionally the TYPE can have a comma and a number post pended to increase the volume of debug. See this section for more details.
-s VALUE | --smart=VALUE where VALUE is either "on" or "off". Enables or disables SMART monitoring (and temperature warnings).
-S VALUE | --saveauto=VALUE where VALUE is either "on" or "off". Controls whether the error log values are preserved across device power cycles.
-t TEST | --test=TEST where TEST is either "offline", "short" or "long". Despite its name "offline" is a short foreground test that all SCSI devices should support. A "short" self test is typically 2 minutes or less. A "long" self test will be considerably longer than 2 minutes, depending on the size of the media. The estimated time that a "long" self test will take is printed after the "selftest" log (i.e. with '-l selftest' or '-a')
-V | --version : outputs the smartctl version number (including the cvs version of all its source files) and build information then exits without any other action.
-X | --abort : will terminate a background short or long self test. Usually the self test log notes that a self test has been aborted. [Has no effect on tape drives.]
单用法:
1、smartctl -a <device> 查该讑֤是否已经打开SMART技术?br />2?span>smartctl -s on <device> 如果没有打开SMART技术,使用该命令打开SMART技术?br />3?span>smartctl -t short <device> 后台硬盘,消耗时间短Q?br /> smartctl -t long <device> 后台硬盘,消耗时间长Q?br /> smartctl -C -t short <device> 前台硬盘,消耗时间短Q?br /> smartctl -C -t long <device> 前台硬盘,消耗时间长?br />其实是利用盘SMART的自E序?br />4?span>smartctl -X <device> 中断后台硬盘?br />5?span>smartctl -l selftest <device> 昄盘日志?br />6?span>smartctl -l error <device> 昄盘错误汇怅R?/strong>
tar -zxvf postfixadmin-2.1.0.tgz
把解压的目录改名拯到默认的web目录下,比如 /var/www
cd /var/www/postfixadmin
chmod 744 *.php *.css
cd admin/
chmod 744 *.php .ht*
cd ../images/
chmod 744 *.gif *.png
cd ../languages/
chmod 744 *.lang
cd ../templates/
chmod 744 *.tpl
cd ../users/
chmod 744 *.php
导入数据?/p>
mysql -uroot -p < DATABASE_MYSQL.TXT
cp config.inc.php.sample config.inc.php
修改config.inc.php文g中相关配|?br />
讉KQ?br />http://yourdomain/postfixadmin/
wget http://surfnet.dl.sourceforge.net/sourceforge/courier/courier-imap-4.1.1.tar.bz2
tar jvxf courier-imap-4.1.1.tar.bz2
./configure --prefix=/usr/local/courier-imap --with-redhat --enable-unicode --disable-root-check \
--with-trashquota --without-ipv6 CPPFLAGS='-I/usr/local/courier-authlib/include' \
COURIERAUTHCONFIG='/usr/local/courier-authlib/bin/courierauthconfig' \
CPPFLAGS='-I/usr/local/courier-authlib/include'
#如果~译courier-authlib没有安装在默认\径,必须指定q个Q如果之前编译courier-authlib加了--without- stdheaderdirQ就不需要指定了
make
make install
cp /usr/local/courier-imap/etc/imapd.dist /usr/local/courier-imap/etc/imapd
cp /usr/local/courier-imap/etc/imapd-ssl.dist /usr/local/courier-imap/etc/imapd-ssl
cp /usr/local/courier-imap/etc/pop3d.dist /usr/local/courier-imap/etc/pop3d
cp /usr/local/courier-imap/etc/pop3d-ssl.dist /usr/local/courier-imap/etc/pop3d-ssl
配置Courier-IMAPQؓ用户提供pop3服务Q?br />vi /usr/local/courier-imap/etc/pop3d
POP3DSTART=yes
注:如果你想为用h供IMAP服务Q可以在"/usr/local/courier-imap/etc/imapd"文g中设|?IMAPDSTART=yes"?/p>
讄Courier-IMAP开动运行:
cp courier-imap.sysvinit /etc/rc.d/init.d/imapd
chmod 755 /etc/rc.d/init.d/imapd
chkconfig --add imapd
试POP3Q?br />
telnet localhost 110
Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK Hello there. user test@example.com
+OK Password required. pass 123 +OK logged in. list +OK POP3 clients that break here, they violate STD53. . quit +OK Bye-bye. Connection closed by foreign host.
wget http://kent.dl.sourceforge.net/sourceforge/courier/courier-authlib-0.58.tar.bz2
tar jvxf courier-authlib-0.58.tar.bz2
./configure --prefix=/usr/local/courier-authlib --without-stdheaderdir \
--without-authuserdb --without-authpam --without-authldap --without-authpwd \
--without-authshadow --without-authvchkpw --without-authpgsql --without-authcustom \
--with-authmysql --with-mysql-libs=/usr/local/mysql/lib/ \
--with-mysql-includes=/usr/local/mysql/include/ --with-redhat
一个关键点Q?br />如果courier-authlib安装到非标准位置Q例如安装到/usr/local下)Q一定记得在./configure时增?- without-stdheaderdirQ这样以后在~译Courier-IMAP和maildrop的时候,不用特别指定courier- authlib的库文g位置
make
make install
make install-configure
增加"/usr/local/courier-authlib/lib/courier-authlib"C?/etc/ld.so.conf"Qƈ执行ldconfig命o?br />chmod +x /usr/local/courier-authlib/var/spool/authdaemon
vi /usr/local/courier-authlib/etc/authlib/authdaemonrc 可以不修?br />authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=10
vi /usr/local/courier-authlib/etc/authlib/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD yourpassword
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD 1002
MYSQL_GID_FIELD 1002
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/opt/virtual' #讄postfix存储邮g的目?br />MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
MYSQL_WHERE_CLAUSE active='1'
启动courier-authlib
/usr/local/courier-authlib/sbin/authdaemond start
讄Courier authentication library开动运行,?etc/rc.local中增加?usr/local/courier-authlib/sbin/authdaemond start”?/p>试Q?br />
通过以下命o获得test@example.com的用户名及密码的BASE64~码Q?/p>
perl -e 'use MIME::Base64; print encode_base64("test\@example.com")'telnet localhost 25
dGVzdEBleGFtcGxlLmNvbQ==
perl -e 'use MIME::Base64; print encode_base64("123")'
MTIz
DEBUG_LOGIN=2 原来默认?
然后看看/var/log/maillog 在认证失败时有什么提C。根据提C去查问题到底出在哪?/p>
wget ftp://postfix.cn99.com/postfix/official/postfix-2.2.10.tar.gz
tar zvxf postfix-2.2.10.tar.gz
下蝲VDA补丁,使postfix支持盘限额
wget http://web.onda.com.br/nadal/postfix/VDA/postfix-2.2.10-vda.patch.gz
gzip -d postfix-2.2.10-vda.patch.gz
chkconfig --level 2345 sendmail off
安装postfix之前d相关的用P用户l?br />groupadd postfix -g 1000
groupadd postdrop
useradd postfix -u 1000 -g postfix -G postdrop
groupadd vmail -g 1002
useradd vmail -u 1002 -g 1002
mkdir /opt/virtual
chown vmail:vmail /opt/virtual
chmod -R 771 /opt/virtual
cd postfix-2.2.10
打补?br />patch -p1 < ../postfix-2.2.10-vda.patch
make tidy
make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/ -DUSE_SASL_AUTH -I/usr/local/include/sasl' \
'AUXLIBS=-L/usr/local/mysql/lib/ -lmysqlclient -lm -lz -L/usr/local/lib -lsasl2'
make
make install
mv /etc/aliases /etc/aliases.old
ln -s /etc/postfix/aliases /etc/aliases
echo 'root: admin@example.com'>>/etc/postfix/aliases
/usr/bin/newaliases
touch /etc/postfix/mysql/virtual_alias_maps.cf
touch /etc/postfix/mysql/virtual_domains_maps.cf
touch /etc/postfix/mysql/virtual_mailbox_maps.cf
touch /etc/postfix/mysql/virtual_limit_maps.cf
cd /etc/postfix
postconf -n > main2.cf
mv main.cf main.cf.old
mv main2.cf main.cf
vi /etc/postfix/main.cf
myhostname = mail.example.com # mail.example.com是安装Postfix软g的主机名
mydomain = example.com # example.com是安装Postfix软g的主机名中的域名部分
myorigin = $mydomain
mydestination =
alias_maps = hash:/etc/aliases
home_mailbox = Maildir/ # 使用Maildir作ؓ邮g的存储格?/p>
#=====================MySQL=====================
virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf
virtual_mailbox_base = /opt/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql/virtual_domains_maps.cf
virtual_mailbox_limit = 102400000
virtual_mailbox_maps = mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 1002
virtual_uid_maps = static:1002
virtual_gid_maps = static:1002
virtual_transport = virtual
#"virtual_gid_maps"?virtual_uid_maps"是postfix用户的gid和uidQ?"virtual_minimum_uid"应当?virtual_uid_maps"Q?/p>
"virtual_mailbox_limit"是每个邮q大小?/p>
#=====================Quota=====================
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/virtual_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
#virtual_trash_count=yes
#virtual_trash_name=.Trash
#====================SASL======================
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname
#reject_rbl_client opm.blitzed.org,
#reject_rbl_client list.dsbl.org,
#reject_rbl_client bl.spamcop.net,
#reject_rbl_client sbl-xbl.spamhaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#=============================================
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
~辑cf配置文g
vi /etc/postfix/mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
additional_conditions = AND active = '1'
Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q?/p>
vi /etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
additional_conditions = AND active = '1'
Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q?/p>
vi /etc/postfix/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
additional_conditions = AND active = '1'
Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q=Q?/p>
vi /etc/postfix/mysql_virtual_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
additional_conditions = AND active = '1'
启动和停止postfix服务
/usr/sbin/postfix start
/usr/sbin/postfix stop
讄Postfix开动运行,?etc/rc.local中增加?usr/sbin/postfix start&”?br />注:①系l已l打开了Postfix的TLS支持Q如果你需要这功能可以参考Postfix发行包中的TLS_README文档q行配置?br /> ②你可以使用一个叫pflogsumm.pl的perl脚本对postfix的日志进行分析,详细的情况见Q?a target="_blank">http://jimsun.linxnet.com/postfix_contrib.html?br />
wget ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.22.tar.gz
tar zxvf cyrus-sasl-2.1.22.tar.gz
cd cyrus-sasl-2.1.22
./configure --enable-plain --enable-cram --enable-digest --enable-login --enable-sql \
--disable-anon --disable-ntlm --disable-gssapi --disable-krb4 --disable-otp --disable-srp --disable-srp-setpass \
-with-authdaemond=/usr/local/courier-authlib/var/spool/authdaemon/socket \
--with-mysql=/usr/local/mysql --with-mysql-includes=/usr/local/mysql/include \
--with-mysql-libs=/usr/local/mysql/lib
make
make install
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
增加"/usr/local/lib"C?/etc/ld.so.conf"Qƈ执行ldconfig命o?/p>
vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
注意Q这个文件的~辑不要多写一个空|否则会出现smtp验证不过的问?/p>
安装ApacheQApache被安装?/usr/local/apache2"目录下:
tar zxvf httpd-2.0.59.tar.gz
cd httpd-2.0.59
./configure --prefix=/usr/local/apache2 --enable-so --enable-ssl --with-mpm=worker --enable-rewrite --enable-suexec --with-suexec-caller=httpd \
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
make
make install
修改apache的配|文Ӟ/usr/local/apache2/conf/httpd.confQ,配置apache的默认语a、运行用L参数Q?br />User httpd
Group httpd
<IfModule worker.c>
StartServers 10
MaxClients 1024
MinSpareThreads 100
MaxSpareThreads 800
ThreadsPerChild 64
MaxRequestsPerChild 0
</IfModule>
?/etc/rc.local"文g中增?/usr/local/apache2/bin/apachectl start"Q设|Apache开动运行?/p>
官方下蝲地址Q?a >http://www.clamav.net/stable.php#pagestart
groupadd clamav
useradd -g clamav -s/bin/false -d/dev/null clamav
解压安装Q?br />tar zxvf clamav-0.88.4.tar.gz
cd clamav-0.88.4
./configure --prefix=/usr/local/clamav --with-dbdir=/usr/local/share/clamav
make
make check
make install
修改配置文gQ?br />vi /usr/local/clamav/etc/clamd.conf
LogSyslog
LogVerbose
LogFacility LOG_MAIL
LogFile /var/log/clamav/clamd.log
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /usr/local/share/clamav
LocalSocket /var/run/clamav/clamd
StreamMaxLength 10M
User amavis
ScanMail
ScanArchive
ScanRAR
注:要用?”注释文件中Exampleq行
修改病毒更新配置文gQ?br />vi /usr/local/clamav/etc/freshclam.conf
DatabaseDirectory /usr/local/share/clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogSyslog
LogVerbose
DatabaseOwner amavis
Checks 12
DatabaseMirror db.CN.clamav.net
DatabaseMirror database.clamav.net
NotifyClamd
注:要用?”注释文件中Exampleq行
groupadd amavis
useradd -g amavis -s /bin/false -c "Amavis User" -d /dev/null amavis
创徏日志文g夹ƈ讄权限
mkdir /var/log/clamav
chmod -R 744 /var/log/clamav
chown -R amavis:amavis /var/log/clamav
chown -R amavis.amavis /usr/local/share/clamav
mkdir /var/run/clamav
chmod 700 /var/run/clamav
chown amavis.amavis /var/run/clamav
手动更新病毒?br />/usr/local/clamav/bin/freshclam
讄自动更新病毒?br />crontab -e
0 4 * * * root /usr/local/clamav/bin/freshclam --quiet -l /var/log/clamd.log
启动|停止
# /usr/local/clamav/sbin/clamd start|stop
2.安装amavisd
官方下蝲地址Q?a >http://www.ijs.si/software/amavisd/#download
wget http://www.ijs.si/software/amavisd/amavisd-new-2.4.3.tar.gz
升fileQ可以通过file -v看一下版本,要求4.06版本以上
wget ftp://ftp.astron.com/pub/file/file-4.17.tar.gz
安装以下文gQ这些都是安装amavisd需要的
perl -MCPAN -e shell
cpan>install Archive::Tar
cpan>install Archive::Zip
cpan>install Compress::Zlib
cpan>install Convert::UUlib
cpan>install MIME::Base64
cpan>install Mail::Internet
cpan>install Net::Server
cpan>install Net::SMTP
cpan>install Digest::MD5
cpan>install IO::Stringy
cpan>install Time::HiRes
cpan>install Unix::Syslog
cpan>install BerkeleyDB
cpan>install Convert::TNEF
cpan>install MIME::Parser
cpan>install MIME::Tools
注:如果使用上述Ҏ不能安装某些模块Ӟ去: http://search.cpan.org/ 搜烦相应模块安装.
perl模块安装Ҏ:
wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.36.tar.gz
tar zxvf Digest-MD5-2.36
cd Digest-MD5-2.36
perl Makefile.pl
make
make test
make install
升perl到最新版本,臛_5.8.2以上版本
wget http://www.perl.com/CPAN/src/stable.tar.gz
tar zvxf stable.tar.gz
cd perl-5.8.8
./configure.gnu --prefix=/usr -Dpager="/bin/less -isR"
make
make test 试一下,没问题后再install
make install
注意升perl的话Q可能会造成pȝ的其他perl应用不正常,h重升U,一般redhat9.0默认?.8.0应该也没问题
mkdir -p /var/amavis /var/amavis/tmp /var/amavis/var /var/amavis/db /var/amavis/home
chown -R amavis:amavis /var/amavis
chmod -R 750 /var/amavis
cp amavisd /usr/local/sbin/
chown root /usr/local/sbin/amavisd
chmod 755 /usr/local/sbin/amavisd
cp amavisd.conf /etc/
chown root /etc/amavisd.conf
chmod 644 /etc/amavisd.conf
mkdir /var/virusmails
chown amavis:amavis /var/virusmails
chmod 750 /var/virusmails
#=====================================
修改 /etc/amavisd.conf
$mydomain = 'example.com';
$myhostname= 'mail.example.com';
$virus_admin = "postmaster\@$mydomain"; # notifications recip.
$mailfrom_notify_admin = "postmaster\@$mydomain"; # notifications sender
$mailfrom_notify_recip = "postmaster\@$mydomain"; # notifications sender
$mailfrom_notify_spamadmin = "postmaster\@$mydomain"; # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
$max_servers = 10;
$sa_spam_subject_tag = '[垃圾邮g] ';
@local_domains_maps = qw(.);
$sa_tag2_level_deflt = 5.0;
$sa_kill_level_deflt = 5.0;
q增加如下参敎ͼ默认amavisd.conf没有Q:
$sa_spam_modifies_subj = 0; # don't modify subject
$remove_existing_x_scanned_headers= 1; # remove existing headers
$remove_existing_spam_headers = 1;
注:$sa_spam_modifies_subj = 1;则代表修攚w件主题?br />
加入对Clamav 的支持:
# ### http://www.clamav.net/
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
?10行左叻I修改投?拦截的方法:
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_BOUNCE;
$final_spam_destiny = D_PASS;
$final_bad_header_destiny = D_PASS;
注意上述4个设|中Q对spamQ垃NӞ默认会直接反弹(BOUNCEQ,现在修改为l投递(PASSQ但在信头中增加相关X-Spam- Status信息{。这样可以很方便的在extmail中设|将被标Cؓ垃圾邮g的mail投递到“垃N件箱”中Q便于用L查,q样避免误判垃N件而引L损失?/p>
=====================================
3.安装SpamAssassin
perl -MCPAN -e shell
cpan>install Digest::SHA1
cpan>install HTML::Parser
cpan>install Net::DNS
cpan>install Mail::SPF::Query
cpan>install IP::Country
cpan>install Net::Ident
cpan>install IO::Socket::INET6
cpan>install IO::Socket::SSL
cpan>install DBI
cpan>install LWP::UserAgent
cpan>install Mail::SpamAssassin
注:如果使用上述Ҏ不能安装某些模块Ӟ去: http://search.cpan.org/ 搜烦相应模块安装.
# /usr/local/sbin/amavisd debug
启动停止服务
# /usr/local/sbin/amavisd start|stop
# Content-Filter注意Q?/b>receive_override_options q里必须增加Q禁止地址展开/影射Q否则如果遇到别名的时候会引v冗余邮g的生?br />
content_filter = smtp:[127.0.0.1]:10024
receive_override_options = no_address_mappings
127.0.0.1:10025 inet n - n - - smtpd保存?etc/init.d/postfix restart|reload
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-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 receive_override_options=
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.extmail.org ESMTP Postfix - by extmail.org
mail from:<test@example.com>
250 2.1.0 Ok
rcpt to:<test@example.com>
250 2.1.5 Ok
data
354 End data with.
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
.
250 2.0.0 Ok: queued as BC24E85260
quit
221 2.0.0 Bye
Connection closed by foreign host.
tail -f /var/log/maillog 查看邮g日志Q看到有Blocked字样Qƈ且没有错误信息。表明Clamav+Amavisd-new工作正常?/p>试SpamAssassin
输入如下命oQ蓝色字代表命o行输入)Q?每输入一行后{待1U左叻I
telnet localhost 25tail -f /var/log/maillog 查看邮g日志Q看到有amavis[10579]: (10579-06) Passed SPAM字样Qƈ且没有错误信息。表明SpamAssassin+Amavisd-new工作正常?br />
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.extmail.org ESMTP Postfix - by extmail.org
mail from:<test@example.com>
250 2.1.0 Ok
rcpt to:<test@example.com>
250 2.1.5 Ok
data
354 End data with.
Subject: XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
SpamMail test
.
250 2.0.0 Ok: queued as BC24E85260
quit
221 2.0.0 Bye
Connection closed by foreign host.
参数名称 | 含义 |
-l | 昄用户?/span>Crontab文g的内?/span> |
-v | 昄用户?/span>Crontab文g的内容及其提交的旉Q只适用?/span>Compaqpd |
-r | ?/span>Crontab目录中删除用LCrontab文g |
-e | ~辑用户?/span>Crontab文g |
D?/span> | 含义 | 取D?/span> |
W一D?/span> | 代表分钟 | 0?9 |
W二D?/span> | 代表时 | 0?3 |
W三D?/span> | 代表日期 | 1?1 |
W四D?/span> | 代表月䆾 | 1?2 |
W五D?/span> | 代表星期几,0代表星期?/span> | 0? |
例:如果用户的Crontab文g的内ҎQ?9 19 * * * echo its dinner timeQ则pȝ每天?9:29昄‘its dinner time’?
[Incompat 20051220] The Postfix-with-Cyrus-SASL build procedure has
changed. You now need to specify -DUSE_CYRUS_SASL in addition to
-DUSE_SASL_AUTH or else you end up without any Cyrus SASL support.
The error messages are:
unsupported SASL server implementation: cyrus
unsupported SASL client implementation: cyrus