--disable-auth-logging Don't record time and ip of last auth attempt. Valid only for CDB, MySQL, PGSQL, LDAP, ActiveDir. --enable-logging=OPT Log to syslog: n=nothing, e=errors only (default), y=all attempts, p=errors with passwords, v=verbose (all attempts, with passwords). --enable-log-name=TEXT Set syslog name vpopmail. --enable-auth-module=MOD Nominate how to store the vpopmail account information (cdb (default), mysql, pgsql, ldap, oracle, sybase, or activedir). --enable-roaming-users Enable POP-before-SMTP functionality. --enable-sqwebmail-pass Store a copy of the user's password in the the user's maildir for use by pre-v3 sqwebmail. --disable-many-domains Creates a table for each virtual domain instead of storing all users in a single table. Only valid for MySQL and PostgreSQL --enable-passwd Enable /etc/passwd (or shadow) accounts in addition to virtual domains. --disable-clear-passwd Don't store a cleartext version of the password in addition to the encrypted version. --enable-tcpserver-file=PATH File where tcpserver -x relay information is stored /home/vpopmail/etc/tcp.smtp. --enable-incdir=DIR Your MySQL/Oracle 'include' directory. --enable-libdir=DIR Your MySQL/Oracle 'lib' directory.
--enable-ip-alias-domains Enable mapping of default domain via reverse ip lookup table. --enable-qmail-ext Enable qmail email address extension support.
--enable-mysql-replication Enable support for replicated MySQL auth servers. --enable-valias Store email aliases in MySQL.
make clean
make
make install-strip
cd ..
rm -rf vpopmail-5.4.13
d)Create the configuration file that vpopmail will use to setup the connection to the mysql database # MySQL settings, line 1 is config for read-only, # line 2 is config for update. Settings for each # line: server|port|user|password|database
maxpopaccounts 5 maxforwards -1 maxautoresponders -1 maxmailinglists X
# quota for entire domain, in megabytes # example shows a domain with a 100MB quota and a limit of 10,000 messages #quota 100 quota 150 #maxmsgcount 10000
# default quota for newly created users (in bytes) # example shows a user with a 20MB quota and a limit of 1000 messages default_quota 31457280 #default_maxmsgcount 1000
7) install courier-authlib and courier-imap tar jxvf courier-authlib-0.57.tar.bz2 cd courier-authlib-0.57 ./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat make && make check make install-strip && make install-configure vi /etc/rc.local /usr/local/sbin/authdaemond start
Make sure that the following configuration exists: TLS_CERTFILE=/usr/local/share/imapd.pem
Special note for people running a small home or office network:
If you are planning on having multiple users connect to your IMAP server from a single IP address, such as in a small home or office network, you may want to increase the "MAXPERIP" setting with the /usr/local/etc/imapd config file. This setting establishes the maximum number of IMAP connections that can be made from a single IP address. An example of this might be if you have a small office network runing on a single DSL or Cable IP address and your mail server is outside of that network. While each computer in your internal network may have it's own private IP address, to the outside world anyone coming from your network has the single routeable IP address assigned to your DSL or Cable connection. The default setting for "MAXPERIP" is 4 so f you have a similar network setup and more than 4 people trying to access your IMAP server, you may want to increase this setting accordingly to avoid connection errors. Within the /usr/local/etc/imapd file, the line you are looking for looks like this:
MAXPERIP=4
vi /usr/local/etc/authlib/authdaemonrc
Around like 27, you should see the "authmodulelist" setting. Make sure that "authvchkpw" is the only module listed. Like so:
Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --enable-qmaildir=DIR Directory where qmail control and user directories are installed /var/qmail. --enable-qmail-newu=PATH Full path to qmail-newu program. --enable-qmail-inject=PATH Full path to qmail-inject program. --enable-qmail-newmrh=PATH Full path to qmail-newmrh program. --enable-vpopuser=USER User name allocated to vpopmail vpopmail. --enable-vpopgroup=GROUP Group name allocated to vpopmail vchkpw. --enable-tcprules-prog=PATH Full path to tcprules program /usr/{local/}bin/tcprules. --disable-rebuild-tcpserver-file Disable rebuilding of tcpserver relay control file. --enable-relay-clear-minutes=# Expire time for roaming users after pop authentication [180]. --enable-learn-passwords If no password is stored for a user, learn it the first time they authenticate. --disable-md5-passwords Use DES crypt() instead of MD5 encryption for passwords. --disable-file-locking Don't use file locking. --enable-file-sync Enable file sync after each message is delivered. --disable-make-seekable Don't try to make input to vdelivermail seekable. --disable-users-big-dir Disable hashing of user directories. --enable-domainquotas Enable non-system domain quotas. See README.quotas for more info. --enable-domains-dir=TEXT Set domains directory name for ~vpopmail/domains/user/. --enable-mysql-logging Enable authentication logging to MySQL. Uses setting from --enable-auth-logging. --enable-pgsql-logging Enable authentication logging to PostgreSQL. Uses setting from --enable-auth-logging. --enable-mysql-limits Use MySQL to store limits instead of .qmailadmin-limits files.
9) install SquirrelMail
tar -zxvf squirrelmail-1.4.6.tar.gz mv squirrelmail-1.4.6 /var/www/squirrelmail
tar -zxvf all_locales-1.4.6-20060221.tar.gz ./install Please enter path to your squirrelmail installation: /var/www/squirrelmail
1) tar jxvf Mail-SpamAssassin-3.0.4.tar.bz2 2) cd Mail-SpamAssassin-3.0.4 3) export LANG=en_US 4) perl Makefile.PL 5) make 6) make install 7) groupadd spamd 8) useradd -g spamd -s /bin/false spamd 9) vi /etc/sysconfig/spamassassin Add the following line.. SPAMDOPTIONS="-x -u spamd -H /home/spamd -d" 10) vi /etc/mail/spamassassin/local.cf Add the following line... # SpamAssassin config file for version 2.5x # generated by http://www.yrex.com/spam/spamconfig.php (version 1.01)
# How many hits before a message is considered spam. required_hits 5.0
# Whether to change the subject of suspected spam rewrite_subject 1
# Text to prepend to subject if rewrite_subject is used subject_tag *****SPAM*****
# Encapsulate spam in an attachment report_safe 1
# Use terse version of the spam report use_terse_report 0
# Mail using languages used in these country codes will not be marked # as being possibly spam in a foreign language. # - chinese english ok_languages zh en
# Mail using locales used in these country codes will not be marked # as being possibly spam in a foreign language. ok_locales en zh
4) vi /var/qmail/bin/qmail-scanner-queue.pl change my $spamc_subject=''; to my $spamc_subject='+++++Trash+++++'; 然後用一個普通用戶登陸,執行 5) /var/qmail/bin/qmail-scanner-queue.pl -z
修改環境變數 1 在你的qmail啟動腳本加入 vi /service/qmail-smtpd/run