<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不允許直接發郵件給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的發行包中,等安裝extman的時候copy到/etc/postfix目錄下即可。
    設置Postfix開機自動運行,在/etc/rc.local中增加“/usr/sbin/postfix start&”。
    注:①系統已經打開了Postfix的TLS支持,如果你需要這項功能可以參考Postfix發行包中的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电影| 久久久久亚洲爆乳少妇无| 亚洲精品日韩中文字幕久久久| 中文字幕乱码系列免费| 久久久久亚洲AV无码专区网站| 一级毛片免费不卡直观看| 伊在人亚洲香蕉精品区麻豆| 亚洲Av永久无码精品黑人| 四虎www免费人成| 亚洲日韩在线中文字幕综合| mm1313亚洲精品无码又大又粗| 极品美女一级毛片免费| 中文字幕日韩亚洲| 成人爽a毛片免费| 91亚洲va在线天线va天堂va国产 | 中文字幕亚洲免费无线观看日本 | 男男黄GAY片免费网站WWW| 亚洲AV成人潮喷综合网| 国产激情久久久久影院老熟女免费| 中文字幕亚洲日韩无线码| 成人影片一区免费观看| 亚洲一级大黄大色毛片| 精品国产免费一区二区| 免费一区二区无码视频在线播放 | 亚洲成A∨人片在线观看无码| 久久精品免费一区二区喷潮| 亚洲大码熟女在线观看| 亚洲熟伦熟女新五十路熟妇| 久久久久久免费一区二区三区 | 亚洲精品国精品久久99热| a级毛片高清免费视频| 亚洲第一永久在线观看| 狼友av永久网站免费观看| 一级女性全黄生活片免费看| 亚洲日本中文字幕| 国产乱子伦精品免费女| 爱丫爱丫影院在线观看免费| 亚洲一卡2卡3卡4卡国产网站 | 亚洲大片免费观看| 国产精品亚洲综合| 久久精品国产亚洲AV无码麻豆|