分类: LINUX
2008-08-29 13:58:47
[root@mail /home/down]#tar -zxvf postfix-
[root@mail /home/down]#cd postfix-
[root@mail /home/down]#make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/sasl2/include/sasl -I/usr/local/BerkeleyDB/include -DUSE_TLS -I-DUSE_TLS -I/usr/include/openssl' 'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm -L/usr/local/sasl2/lib -lsasl2 -L/usr/local/BerkeleyDB/lib -L/usr/lib -lssl -lcrypto'
[root@mail /home/down]#make
[root@mail /home/down]#make install
出现选项
html_directory: [no] /var/www/postfix_html
manpage_directory: [/usr/local/man] /usr/local/postfix/man
其他都默认
[root@mail /home/down/postfix-
mkdir: 已创建目录 “/var/mailbox”
[root@mail /home/down/postfix-
[root@mail /home/down/postfix-
[root@mail /home/down/postfix-
修改main.cf内容
[root@mail /home/down]#vi /etc/postfix/main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = redhat.mail.com
mydomain = mail.com
myorigin = $mydomain
inet_interfaces = all
mydestination =
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.18.0/24, 127.0.0.0/8
############################CYRUS-SASL########################
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
#############################SASL-END##############################
#############################Virtual Mailbox Settings################
virtual_mailbox_base=/var/mailbox
virtual_mailbox_maps=mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains=mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_domains=
virtual_alias_maps=mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps=static:1001
virtual_gid_maps=static:1001
virtual_transport=maildrop
maildrop_destination_recipient_limit=1
maildrop_destination_concurrency_limit=1
#################################Mailbox END###########################
#################################Quota Settings########################
message_size_limit=1433600
virtual_mailbox_limit=20791520
virtual_create_maildirsize=yes
virtual_mailbox_extended=yes
virtual_mailbox_limit_maps=mysql:/etc/postfix/mysql/virtual_mailbox_limit_override=yes
virtual_maildir_limit_message=User's maildir has overdrawn his diskspace quota,try again later.
virtual_overquota_bounce=yes
################################Quota END############################
################################Amavis Start##########################
content_filter=amavisfeed:[127.0.0.1]:10024
max_use=10
################################Amavis END###########################
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = /var/www/postfix_html
manpage_directory = /usr/local/postfix/man
sample_directory = /etc/postfix
修改master.cf
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
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
smtp unix - - n - - smtp
relay unix - - n - - smtp -o fallback_relay=
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
maildrop unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/bin/maildrop -w 90 -d ${recipient}
old-cyrus unix - n n - - pipe flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
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
amavisfeed unix - - n - 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 - n - - smtpd -o content_filter= -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 smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o smtpd_restriction_classes= -o mynetworks=127.0.0.0/8 -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,no_milters -o local_header_rewrite_clients=
[root@mail /home/down]#mkdir -pv /etc/postfix/mysql
[root@mail /home/down]#tar zxvf extman-0\[1\]\[1\].2.3.tar.gz
[root@mail /home/down]#cd extman-
[root@mail /home/down/extman-
[root@mail /home/down/extman-
[root@mail /home/down/extman-
[root@mail /home/down/extman-
[root@mail /home/down/extman-
[root@mail /home/down]#tar jxvf courier-imap-
[root@mail /home/down]#cd courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
POP3DSTART=YES //140行
[root@mail /home/down/courier-imap-
IMAPDSTART=YES
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
Starting Courier-IMAP server: imap pop3
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-
[root@mail /home/down/courier-imap-