> Kuenhourg's 隨手記事簿: Linux基本Mail建置(Postfix)

2011年10月11日 星期二

Linux基本Mail建置(Postfix)

套件:postfix安裝:#yum install postfix
設定檔:/etc/postfix/main.cf
                inet_interfaces = all
                mydomain = a234.snpy.org
                myhostname = a234.snpy.org
                mydestination = a234.snpy.org , b.twbbs.org
                mynetworks_style = subnet 網段Relay
           
                smtpd_sasl_auth_enable = yes  (SMTP驗證)
                smtpd_sasl_security_options = noanonymous
                smtpd_sasl_local_domain = $myhostname
                broken_sasl_auth_clients = yes
                smtpd_recipient_restrictions =
                                            permit_sasl_authenticated,
                                            permit_mynetworks,
                                            check_relay_domains
服務:dovecot & saslauthd & named啟動
            #service postfix restart

檢查:#postconf -d (查看設定檔)
           message_size_limit = 1024000 -> 1M發送大小
           mailbox_size_limit = 1024000 -> 10M容量
           smtp_recipient_limit = 1000 -> 收信人數

補充:/etc/dovecot.conf (當uid&gid為0時,可以允許發送mail)
            first_valid_uid = 0
            first_valid_gid = 0