<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    wiflish
    Loving Life! Loving Coding!
    posts - 98,comments - 98,trackbacks - 0
    本文轉自:http://www.extmail.org/forum/archive/2/0510/563.html 中安裝postfix部分。

    6、安裝Postfix
    從下面的URL下載Postfix 2.2.8的源代碼:http://www.postfix.org
    從下面的URL下載Postfix 2.2.8的VDA補丁程序:http://web.onda.com.br/nadal/
    chkconfig --level 2345 sendmail off

    增加Postfix運行所需要的用戶和組,并建立“/home/mail”目錄作為存儲郵件的地方:
    groupadd postfix
    groupadd postdrop
    useradd postfix -g postfix -c "Postfix user" -d /nonexistent -s /sbin/nologin
    mkdir /home/mail
    chown postfix:postfix /home/mail

    安裝Postfix:
    gzip -d postfix-2.2.8-vda.patch.gz
    tar zvxf postfix-2.2.8.tar.gz
    cd postfix-2.2.8
    patch -p1 < ../postfix-2.2.8-vda.patch
    make -f Makefile.init makefiles \ OPT='-march=pentium4 -O2 -pipe -fomit-frame-pointer' \
    'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/include/sasl -DUSE_TLS' \
    'AUXLIBS=-L/usr/lib -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2 -lssl -lcrypto'
    make
    make install
    注:“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
    注:因為Postfix不允許直接發(fā)郵件給root用戶,所以你需要為root用戶建立一個別名。
    建立smtpd用戶認證的配置文件:
    vi /usr/lib/sasl2/smtpd.conf
    pwcheck_method: authdaemond
    log_level: 3
    mech_list: plain login
    authdaemond_path:/var/spool/authdaemon/socket
    使用postconf -n簡化main.cf,這樣的好處是main.cf比較短小,不容易造成同一個配置出現兩次的問題:
    cd /etc/postfix
    postconf -n > main2.cf
    mv main.cf main.cf.old
    mv main2.cf main.cf
    修改Postfix的配置文件,#號之后是說明文字:
    vi /etc/postfix/main.cf
    myhostname = mail.example.com ? ? ? ? # mail.example.com是安裝Postfix軟件的主機名
    mydomain = example.com ? ? ? ? ? ? # example.com是安裝Postfix軟件的主機名中的域名部分
    myorigin = $mydomain
    mydestination =
    alias_maps = hash:/etc/aliases
    home_mailbox = Maildir/ ? ? ? ? ? ? # 使用Maildir作為郵件的存儲格式

    # Add following line in file's finality
    virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
    virtual_mailbox_base = /home/mail
    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 = 502
    virtual_uid_maps = static:502
    virtual_gid_maps = static:502
    virtual_transport = virtual

    # Additional for quota support
    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

    broken_sasl_auth_clients = yes
    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
    注:①“virtual_gid_maps”和“virtual_uid_maps”是postfix用戶的gid和uid, “virtual_minimum_uid”應當≤“virtual_uid_maps”,“virtual_mailbox_limit”是每個郵箱的 大小。
    ? ? ②opm.blitzed.org、list.dsbl.org、bl.spamcop.net、sbl-xbl.spamhaus.org是經常使用的 幾個反垃圾郵件列表,如果你使用上面的設置可能無法收到sina、sohu、163等幾個國內主要ISP的郵件。你也可以使用中國反垃圾郵件聯盟的反垃圾 郵件列表,這樣你就能收到國內幾個主要ISP的郵件,同時一些垃圾郵件也可能光臨你的郵件服務器^_^。
    ? ? ③Postfix使用MySQL存儲用戶信息的配置文件已經包含在extman的發(fā)行包中,等安裝extman的時候copy到/etc/postfix目錄下即可。
    設置Postfix開機自動運行,在/etc/rc.local中增加“/usr/sbin/postfix start&”。
    注:①系統(tǒng)已經打開了Postfix的TLS支持,如果你需要這項功能可以參考Postfix發(fā)行包中的TLS_README文檔進行配置。
    ? ? ②你可以使用一個叫pflogsumm.pl的perl腳本對postfix的日志進行分析,詳細的情況見:http://jimsun.linxnet.com/postfix_contrib.html

    安裝Postfix2.3.3中支持SASL的編譯參數有變動,編譯參數更改如下:
    make -f Makefile.init makefiles \ OPT='-march=pentium4 -O2 -pipe -fomit-frame-pointer' \
    'CCARGS=-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/include/sasl -DHAS_MYSQL -I/usr/local/mysql/include -DUSE_TLS' \
    'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2 -lssl -lcrypto'
    其中紅色部分為新增的編譯參數,mysql和sasl路徑為本機安裝的路徑。

    官方關于post2.3+版本編譯支持SASL的參數變動說明:
    [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

    posted on 2006-09-25 13:55 想飛的魚 閱讀(592) 評論(0)  編輯  收藏 所屬分類: linux
    主站蜘蛛池模板: 亚洲AV综合色区无码二区偷拍| 91人成网站色www免费下载| 亚洲国产成人九九综合| 亚洲一区二区三区国产精品| 岛国片在线免费观看| 91福利视频免费| 国产精品视频全国免费观看 | 国产天堂亚洲精品| 亚洲网站在线免费观看| 亚洲国产精品va在线播放| 免费国产成人高清在线观看麻豆| 国产人在线成免费视频| 中文字幕在线观看免费视频| 99视频免费在线观看| 特级做a爰片毛片免费看| 久久亚洲中文无码咪咪爱| 亚洲一区二区三区乱码在线欧洲| 日韩亚洲AV无码一区二区不卡| 亚洲精品无码成人片久久| 中文字幕亚洲专区| 亚洲乱码日产精品a级毛片久久| 国产精品高清全国免费观看| 成人片黄网站A毛片免费| 国产成在线观看免费视频| 国产精品成人观看视频免费| 久久免费的精品国产V∧| 国内永久免费crm系统z在线| 中国黄色免费网站| 久久最新免费视频| 国产做国产爱免费视频| 中文字幕手机在线免费看电影 | 国产成人亚洲综合无码| 亚洲福利精品电影在线观看| 亚洲A∨午夜成人片精品网站| 国产福利免费在线观看| 免费一级特黄特色大片在线观看| 国产成人免费ā片在线观看 | 日韩免费码中文在线观看| 美女免费视频一区二区三区| 国产成人精品亚洲| 成人特级毛片69免费观看|