• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • [原創] 我的Courier Mail Server的安裝筆記

    發表于:2007-05-25來源:作者:點擊數: 標簽:
    [quote:d07f4ac606] 我的CourierMailServer的安裝筆記 首先感謝網友“老手”對我的熱心幫助 Courier是一個全功能,包含SMTP/IMAP/POP3/HTTP(webmail)的電子郵件 服務器 軟件。Courier還擴充能了很 多SMTP功能,下面是我用courier0.42+mysql安裝筆記 首先下載

    [quote:d07f4ac606]
    我的Courier Mail Server的安裝筆記 
    首先感謝網友“老手”對我的熱心幫助
    Courier 是一個全功能,包含SMTP/IMAP/POP3/HTTP(webmail)的電子郵件服務器軟件。Courier 還擴充能了很

    多SMTP功能,下面是我用courier0.42+mysql安裝筆記
    首先下載http://osdn.dl.sourceforge.net/sourceforge/courier/courier-0.42.2.tar.bz2
    解壓  courier-0.42.2.tar.bz2
    tar -zxvf courier-0.42.2.tar.bz2
    參考安裝說明,因為courier不能用root用戶配置,所以,我就用默認的courier用戶
    [root@mail courier-0.42.2]$ echo "courier:521:521:Courier Mail Server:/dev/null:/sbin/nolnog" 

    >> /etc/passwd
    [root@mail courier-0.42.2]$ echo "courier:521:" >> /etc/group
    這里我用courier用戶進行配制
    [courier@mail courier-0.42.2]$ ./configure --prefix=/mail\   
    > --with-authmysql=yes\
    > --with-mysql-includes=/usr/include/mysql\
    > --with-mysql-libs=/usr/lib/mysql\
    > --with-mailuser=courier\
    > --with-mailgroup=courier
    配置安裝
    [root@mail courier-0.42.2]$make
    [root@mail courier-0.42.2]$make install
    [root@mail courier-0.42.2]$make install-configure

    設置默認域如下
    cat <<! >/mail/etc/defaultdomain
    inhowmail.com.cn
    !
    cat <<! >/mail/etc/locals
    inhowmail.com.cn
    !
    cat <<! >/mail/etc/hosteddomains/hosteddomains
    inhowmail.com.cn
    !
    smtp受權
    cat <<! >/mail/etc/esmtpacceptmailfor.dir/esmtpacceptmailfor
    inhowmail.com.cn
    !
    使設置生效
    [root@mail courier-0.42.2]$/mail/sbin/makesmtpaccess
    [root@mail courier-0.42.2]$/mail/sbin/makehosteddomains
    [root@mail courier-0.42.2]$/mail/sbin/makeacceptmailfor
    修改authdaemonrc
    authmodulelist="authmysql authpam"
    authmodulelistorig="authmysql authpam"
    daemons=5
    version=""
    至于esmtpd pop3d imapd esmtpd-ssl pop3d-ssl imapd-ssl 可根據不同需要自行修改,在這里不做修改。

    設置域用戶為test
    [root@mail courier-0.42.2]$mkdir -p domain/inhowmail.com.cn/test
    創建Maildir目錄
    [root@mail courier-0.42.2]$/mail/bin/./maildirmake /mail/domain/inhowmail.com.cn/test/Maildir

    因為要與mysql結合,所以要配置authmysqlrc文件:
    配置如下:

    MYSQL_SERVER localhost
    MYSQL_USERNAME courier
    MYSQL_PASSWORD admin
    MYSQL_SOCKET /var/mysql/mysql.sock
    MYSQL_DATABASE maildata
            MYSQL_USER_TABLE passwd
    MYSQL_CLEAR_PWFIELD clear
    DEFAULT DOMAIN inhowmail.com.cn
    MYSQL_QUOTA_FIELD quota

    創建數據庫如下:

    mysqladmin -u root -p create maildata 

    mysql -u root -p
    use maildata;
    CREATE TABLE passwd (
            id                    char(12 DEFAULT&b''''' NOT NULL,
            crypt                 char(12 DEFAULT&b''''' NOT NULL,
            clear                 char(12 DEFAULT&b''''' NOT NULL,
            name                  char(12 DEFAULT&b''''' NOT NULL,
            uid                   int(10) unsigned DEFAULT&np'''63''' NOT NULL,
            gid                   int(10) unsigned DEFAULT&np'''63''' NOT NULL,
            home                  char(255) DEFAULT&b''''' NOT NULL,
            quota                 char(255) DEFAULT&b''''' NOT NULL,
            KEY id (id(12)
    );
    插入測試用戶 test
    insert into passwd values 
    <>'''test@inhowmail.coc'''''&np'''''s'''''s''',488'''/mail/domain/inhowmail.com.cn/s'''
    b''''');

    update passwd set crypt=encrt'''s''') where d'''test@inhowmail.coc''';
    mysql> select *from users;
    +-----------------------+---------------+-------+------+-----+-----+----------------------------

    --------+-------+
    | id                    | crypt         | clear | name | uid | gid | home                         

          | quota |
    +-----------------------+---------------+-------+------+-----+-----+----------------------------

    --------+-------+
    | test@inhowmail.com.cn | teH0wLIpW0gyQ | test  | test |  48 |  48 | 

    /mail/domain/inhowmail.com.cn/test |       |
    +-----------------------+---------------+-------+------+-----+-----+----------------------------

    --------+-------+
    1 row in set (0.01 sec)
    替換原sendmail
    mv /usr/sbin/sendmail /usr/sbin/sendmailbak
    cp -a /mail/bin/sendmail /usr/sbin/sendmail

    創建mail日志目錄
    touch /mail/log/maillog
    touch /mail/log/errmail
    修改/etc/syslog.conf 改mail日志路徑
    創建啟動腳本
    [root@mail authlib]# pwd 
    /mail/libexec/authlib
    [root@mail authlib]# cat <<! >>/mail/start
    > /mail/libexec/authlib/authdaemond start
    > !
    [root@mail authlib]# cd ../../sbin

    [root@mail sbin]# cat <<! >>/mail/start
    > /mail/sbin/courier start
    > /mail/sbin/courierfilter start
    > /mail/sbin/pop3d start
    > /mail/sbin/esmtpd start
    > !

    [root@mail sbin]#chmod 100 /mail/start

    為了調試,我開啟了mysql的日志(測試后建議停了mysql日志)
    進行測試如下:
    [root@mail sbin]#/mail/./start
    [root@mail sbin]#tail /mail/log/mysql.log
    19 Connect     couriermail@localhost on  與數據庫連接正常

    [root@mail etc]# telnet 127.0.0.1 110
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is&np''^'''.
    +OK Hello there.
    user test
    +OK Password required.
    pass test
    -ERR Login failed.
    user test@inhowmail.com.cn
    +OK Password required.
    pass test
    +OK logged in.
    quit
    +OK Bye-bye.
    Connection closed by foreign host.
    測試test用戶收發
    [root@mail new]# mail test@inhowmail.com.cn
    Subject: hello test
    hello courier mail services
    dkjfkdjfkdjfdkfj
    dfkdjfkd
    .
    Cc: 
    tail /mail/log/maillog
    Aug 12 16:19:46 mail courierd: newmsg,id=0000B77A.3F452962.0000038A: dns; localhost (localhost 

    [127.0.0.1])
    Aug 12 16:19:46 mail courierd: 

    started,id=0000B77A.3F452962.0000038A,from=<root@inhowmail.com.cn>,module=local,host=test@inhowma

    il.com.cn!!48!48!/mail/domain/inhowmail.com.cn/test!!,addr=<test>
    Aug 12 16:19:46 mail courierd: Waiting.  shutdown time=none, wakeup time=none, queuedelivering=1, 

    inprogress=1
    Aug 12 16:19:47 mail courierlocal: 

    id=0000B77A.3F452962.0000038A,from=<root@inhowmail.com.cn>,addr=<test@inhowmail.com.cn>,size=366,

    success: Message delivered.
    Aug 12 16:19:47 mail courierd: completed,id=0000B77A.3F452962.0000038A
    Aug 12 16:19:47 mail courierd: Waiting.  shutdown time=Thu Aug 12 17:18:29 2003, wakeup time=Thu 

    Aug 12 17:18:29 2003, queuedelivering=0, inprogress=0
    [root@mail new]# cat 

    1061497187.M162621P911V0000000000000805I00015F69_0.mail.inhowmail.com.cn,S=439
    Delivered-To: test@inhowmail.com.cn
    Return-Path: <root@inhowmail.com.cn>
    Received: from localhost (localhost [127.0.0.1])
      (uid 0)
      by mail.inhowmail.com.cn with local; Thu, 12 Aug 2003 16:19:45 -0400
    To: test@inhowmail.com.cn
    Subject: hello test
    From: root <root@inhowmail.com.cn>
    Message-ID: <courier.3F452961.0000038A@mail.inhowmail.com.cn>
    Date: Thu, 12 Aug 2003 16:19:45 -0400

    hello courier mail services
    dkjfkdjfkdjfdkfj
    dfkdjfkd

    配置mailfilter
    修改/mail/etc/courierd
    把./Maildir 注釋,并開起 DEFAULTDELIVERY="| /mail/bin/maildrop"
    配置/mail/etc/maildirfilterconfig文件
    [root@mail etc]# vi maildirfilterconfig
    MAILDIRFILTER=../.mailfilter
    MAILDIR=./Maildir

    這樣過濾就可以用了
    設置webmail
    [root@mail etc]$cp -a /mail/libexec/courier/webmail /var/www/cgi-bin
    [root@mail etc]$cp -a /mail/share/courier/sqwebmail/images /var/www/html/webmail
    設置webadmin
    [root@mail mail etc]$cp -a /mail/libexec/courier/webmail/webadmin  /var/www/cgi-bin
    [root@mail courier-0.42.2]$make install-webadmin-password
    我的SSL沒起用,所以在這里改為
    [root@mail courier-0.42.2]touch /mail/etc/webadmin/unsecureok
    對于webmail中的模板,感覺不好,所以想換一下自已以前的模板,但發現,首頁中沒有main.html,而默認執

    行的是folders.html,我想可能要改碼了,要是懶得改也可以直接改htm/en-us模板。
    courier的功能很強大,我只是對此感興趣才選擇了courier ,但沒有真正的完成所有功能的配置。
    以上安裝只是我的一個筆記,是一片安裝流水筆記,因為在安裝前找了很長時間都沒有找到相關的中文才料,所以寫上安裝筆記,對新手有些有些幫助,其實沒有什么技術含量,主要是參考courier/doc中的說明,安 裝中難免有一些不對之處,還望大家給予指正。

    [/quote:d07f4ac606]

     peijun.jiang 回復于:2003-08-25 09:33:03
    不錯,支持原創。

     jsf008 回復于:2003-08-25 11:50:21
    偶正研究這個。。。中。。。

     mb 回復于:2003-08-25 16:20:38
    補一下
    crypt字段必須是使用crypt()函數加密過的密碼,在mysql中,用encrt'''s''')就可以直接生成加密過的密碼。

     jsf008 回復于:2003-08-25 16:49:29
    我用的就是courier-imap
    我測試時總是這樣:
    [root@mail etc]# telnet 127.0.0.1 110 
    Trying 127.0.0.1... 
    Connected to 127.0.0.1. 
    Escape character is&np''^'''. 
    +OK Hello there. 
    user jshf@liuzt.wst 
    +OK Password required. 
    pass 123456
    -ERR Login failed.

     mb 回復于:2003-08-25 16:51:42
    看看你的authmysqlrc配置
    建議在調試時打開mysql.log
    看看數據庫查詢情況

     jsf008 回復于:2003-08-25 17:05:47
    root@test /etc/courier-imap# vi authmysqlrc

    MYSQL_SERVER            localhost
    MYSQL_USERNAME          courier
    MYSQL_PASSWORD          whatever
    MYSQL_SOCKET            /var/run/mysql/mysql.sock
    MYSQL_PORT              3306
    MYSQL_OPT        &nbnbsp;     0
    MYSQL_DATABASE   &n;      maildb
    MYSQL_USER_TABLE        users
    MYSQL_CRYPT_PWFIELD     crypt
    MYSQL_CLEAR_PWFIELD     clear
    DEFAULT_DOMAIN          liuzt.wst
    MYSQL_UID_FIELD         uid
    MYSQL_GID_FIELD         gid
    MYSQL_LOGIN_FIELD       id
    MYSQL_HOME_FIELD        home
    MYSQL_NAME_FIELD        name
    MYSQL_MAILDIR_FIELD     maildir


    mysql.log我不知怎樣打開,

     garfy 回復于:2003-08-25 17:08:23
    mail版越來越豐富了!

     mb 回復于:2003-08-26 08:27:28
    1.看看你的MYSQL_SOCKET 路徑是不是正確    
     2.修改my.cnf  打開mysql.log  并在里面有mysql.sock的路徑
    3.根據telnet 127.0.0.1 110進行認證時看看mysql.log中的查迅情況

     jsf008 回復于:2003-08-26 08:30:44
    [quote:abe45826e2="mb"]
    建議在調試時打開mysql.log
    看看數據庫查詢情況[/quote:abe45826e2]     
    樓主,怎樣才能打開mysql.log
    偶的可能不行。

     mb 回復于:2003-08-26 08:37:45
    在 [mysqld]下添加
    如下
    log=/mail/log/mysql.log
    再改mysql.log為mysql所有
    chown mysql:mysql /mail/log/mysql.log
    service syslog restart
    再試試

     jsf008 回復于:2003-08-26 08:42:33
    這就是my.cnf了,mysql.log怎么加呢
    # The MySQL server
    [mysqld]
    port            = 3306
    socket          = /var/run/mysql/mysql.sock
    skip-networking

    [mysqldump]

    [mysql]

    [isamchk]

    [myisamchk]

    [mysqlhotcopy]

     jsf008 回復于:2003-08-26 09:02:52
    root@test /var/log# telnet 127.0.0.1 110
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is&np''^'''.
    +OK Hello there.
    user tom@jshf.wst
    +OK Password required.
    pass whatever
    -ERR Login failed.

    還是登陸不了

    /usr/sbin/mysqld, Version: 4.0.13-log, started with:
    Tcp port: 0  Unix socket: /var/run/mysql/mysql.sock
    Time                 Id Command    Argument
    030826  9:00:27       1 Connect     courier@localhost on
                          1 Init DB     maildb
                          1 Query       SELECT id, crypt, clear, uid, gid, home, maildir, "", name FROM users WHERE id = "tom@jshf.wst" AND (impok=1 AND bool1=1 AND bool2=1)
                          1 Quit
                          2 Connect     courier@localhost on
                          2 Init DB     maildb
                          2 Query       SELECT id, crypt, clear, uid, gid, home, maildir, "", name FROM users WHERE id = "tom@jshf.wst" AND (impok=1 AND bool1=1 AND bool2=1)

     mb 回復于:2003-08-26 10:00:02
    030826 9:00:27 1 Connect courier@localhost on  
    數據據連接成功
    得到了您的用戶查詢,但好像還是加密后的密碼不正確
    在你的authmysqlrc中 MYSQL_CRYPT_PWFIELD     cryptp之間是一個tab鍵的距離,以前在doc中看到過說哪里的距離不是空格

     jsf008 回復于:2003-08-26 11:28:05
    1 Query SELECT id, crypt, clear, uid, gid, home, maildir, [color=red:4f9ba322e1]""[/color:4f9ba322e1], name FROM users WHERE id = "tom@jshf.wst" AND (impok=1 AND bool1=1 AND bool2=1) 

    查詢語句為什么會出現紅色的那個雙引號呢,

     mb 回復于:2003-08-26 11:35:41
    和哪個沒關系吧
    哪是因為在authmysqlrc中有被你注釋的項,哪是空的,沒有不正常 的呀
    把quota前的#去了再看

     jsf008 回復于:2003-08-26 11:43:23
    我的authmysqlrc中沒有quota 這項?

     jsf008 回復于:2003-08-26 12:09:03
    真是暈死了~~~還是不行,
    看看authdaemonrc有錯沒有?

    authmodulelist="authmysql authpam"
    authmoudlelistorig="authmysql authpam"
    daemons=5
    version="authdaemond.mysql"
    authdaemonvar=/var/spool/authdaemon/courier-imap

     mb 回復于:2003-08-26 12:59:59
    version="authdaemond.mysql" 
    可以不設的,我的不設,設為空的,不過,哪不像主要原因,現在的密碼認證不對,在安裝源文件中cp -a 過來一個authmysqlrc吧,再改一下,可能是crypt哪里多了空格了

     jsf008 回復于:2003-08-26 14:23:56
    這是我新copy過來地一個:怎么測試還通不過呢
    ##VERSION: $Id: authmysqlrc,v 1.10 2002/04/02 23:41:41 mrsam Exp $
    #
    # Copyright 2000 Double Precision, Inc.  See COPYING for
    # distribution information.
    #
    # Do not alter lines that begin with ##, they are used when upgrading
    # this configuration.
    #
    # authmysqlrc created from authmysqlrc.dist by sysconftool
    #
    # DO NOT INSTALL THIS FILE with world read permissions.  This file
    # might contain the MySQL admin password!
    #
    # Each line in this file must follow the following format:
    #
    # field[spaces|tabs]value
    #
    # That is, the name of the field, followed by spaces or tabs, followed by
    # field value.  Trailing spaces are prohibited.


    ##NAME: LOCATION:0
    #
    # The server name, userid, and password used to log in.

    MYSQL_SERVER            localhost
    MYSQL_USERNAME          courier
    MYSQL_PASSWORD          whatever

    ##NAME: MYSQL_SOCKET:0
    #
    # MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
    # filesystem pipe used for the connection
    #
    #
    MYSQL_SOCKET            /var/run/mysql/mysql.sock

    ##NAME: MYSQL_PORT:0
    #
    # MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
    # connect to.

    MYSQL_PORT              0

    ##NAME: MYSQL_OPT:0
    #
    # Leave MYSQL_OPT as 0, unless you know what o'''re doing.

    MYSQL_OPT               0

    ##NAME: MYSQL_DATABASE:0
    #
    # The name of the MySQL database we will open:

    MYSQL_DATABASE          maildb

    ##NAME: MYSQL_USER_TABLE:0
    #
    # The name of the table containing your user data.  See README.authmysqlrc
    # for the required fields in this table.

    MYSQL_USER_TABLE        users

    ##NAME: MYSQL_CRYPT_PWFIELD:0
    #
    # Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined.  Both
    # are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
    # passwords go into MYSQL_CLEAR_PWFIELD.  Cleartext passwords allow
    # CRAM-MD5 authentication to be implemented.

    MYSQL_CRYPT_PWFIELD     crypt

    ##NAME: MYSQL_CLEAR_PWFIELD:0
    #
    #

    MYSQL_CLEAR_PWFIELD   clear

    ##NAME: MYSQL_DEFAULT_DOMAIN:0
    #
    # If DEFAULT_DOMAIN is defined, and someone tries to log in as&np'''e''',
    # we will look up&np'''user@DEFAULT_DOI''' instead.
    #
    #
    # DEFAULT_DOMAIN                example.com

    ##NAME: MYSQL_UID_FIELD:0
    #
    # Other fields in the mysql table:
    #
    # MYSQL_UID_FIELD - contains the numerical userid of the account
    #
    MYSQL_UID_FIELD         uid

    ##NAME: MYSQL_GID_FIELD:0
    #
    # Numerical groupid of the account

    MYSQL_GID_FIELD         gid

    ##NAME: MYSQL_LOGIN_FIELD:0
    #
    # The login id, default is id.  Basically the query is:
    #
    #  SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE d'''logi'''
    #

    MYSQL_LOGIN_FIELD       id

    ##NAME: MYSQL_HOME_FIELD:0
    #

    MYSQL_HOME_FIELD        home

    ##NAME: MYSQL_NAME_FIELD:0
    #
    # The e'''s name (optional)

    MYSQL_NAME_FIELD        name

    ##NAME: MYSQL_MAILDIR_FIELD:0
    #
    # This is an optional field, and can be used to specify an arbitrary
    # location of the maildir for the account, which normally defaults to
    # $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
    #
    # You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
    # out.
    #
    #
    MYSQL_MAILDIR_FIELD     maildir

    ##NAME: MYSQL_QUOTA_FIELD:0
    #
    # Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
    # specify a maildir quota.  See README.maildirquota for more information
    #
    #
    MYSQL_QUOTA_FIELD       quota

    ##NAME: MYSQL_WHERE_CLAUSE:0
    #
    # This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
    # fixed string that is appended to the WHERE clause of our query
    #
    #
    #MYSQL_WHERE_CLAUSE     serr'''mailhost.exampleo'''

    ##NAME: MYSQL_SELECT_CLAUSE:0
    #
    # (EXPERIMENTAL)
    # This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
    # which is structuraly different from proposed. The fixed string will
    # be used to do a SELECT operation on database, which should return fields
    # in order specified bellow:
    #
    # username, cryptpw, uid, gid, clearpw, home, maildir, quota, fullname
    #
    # Enabling this option causes ignorance of any other field-related
    # options, excluding default domain.
    #
    # There are two variables, which you can use. Substitution will be made
    # for them, so you can put entered username (local part) and domain name
    # in the right place of your query. These variables are:
    #               $(local_part) and $(domain)
    #
    # If a $(domain) is empty (not given by the remote user) the default domain
    # name is used in its place.
    #
    # This example is a little bit modified adaptation of vmail-sql
    # database scheme:
    #
    # MYSQL_SELECT_CLAUSE   SELECT popbox.local_part,                       \
    #                       COA('''D}''', popbox.password_hash),          \
    #                       popbox.clearpw,                                 \
    #                       domain.uid,                                     \
    #                       domain.gid,                                     \
    #                       CONCAT(domain.pt&s;''/'''', popbox.mbox_name),     \
    #                     &b&bp''''''',                                             \
    #                       domain.quota,                                   \
    #                     &p&bp''''''',                                             \
    #                       FROM popbox, domain                             \
    #                       WHERE popbox.local_parns; ''''(oa_part)''''       \
    #                       AND popbox.domain_nmns;=&nbp;'''$domain)''''            \
    #                       AND popbox.domain_name = domain.domain_name
    #
    ##NAME: MYSQL_CHPASS_CLAUSE:0
    #
    # (EXPERIMENTAL)
    # This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
    # which is structuraly different from proposed. The fixed string will
    # be used to do an UPDATE operation on database. In other words, it is
    # used, when changing password.
    #
    # There are four variables, which you can use. Substitution will be made
    # for them, so you can put entered username (local part) and domain name
    # in the right place of your query. There variables are:
    #       $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
    #
    # If a $(domain) is empty (not given by the remote user) the default domain
    # name is used in its place.
    # $(newpass) contains plain password
    # $(newpass_crypt) contains its crypted form
    #
    # MYSQL_CHPASS_CLAUSE   UPDATE  popbox                                  \
    #                       SET   &ns&bp;cleapw='''(newpass)'''',                   \
    #                              &nppassword_hash=''$nwass_crypt)''''        \
    #                       WHERE &nbpns;local_pat='''$local_part)''''              \
    #                       AND   &nbpns;doman_nam='''$(domain)''''
    #

     mb 回復于:2003-08-27 08:20:56
    MYSQL_PORT 0  ????應是3306吧
    其實你的mysql在本機可以不用指定,在前面加上#吧

     jsf008 回復于:2003-08-27 08:44:55
    還是不行哪,毛病還是那樣,還能哪兒出錯呢

     jsf008 回復于:2003-08-29 15:49:11
    mb兄臺,多謝你的全力幫助,那個問題總算搞定了,就是version="authdaemond.mysql" 前面加個#,在輸入用戶名用的是test,而不是test@liuzt.wst,這樣就行了,能通過驗證了,
    又一個問題出現了,能過驗證后,郵件收不來,?

     mb 回復于:2003-08-30 08:53:55
    呵呵,恭喜,成功一半了
    telnet 127.0.0.1  110
    后有什么結果
    mail xxx@domain.com
    后看看maillog怎樣

     jsf008 回復于:2003-08-30 09:49:33
    root@test /home/users/jshf# telnet 127.0.0.1 110
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape chrt&bspi&bp;''''^]''''.
    +OK Hello there.
    user jshf
    +OK Password required.
    pass 123456
    +OK logged in.
    quit
    +OK Bye-bye.

    $ mail jshf@liuzt.wst后,mysql.log是這樣
    /usr/sbin/mysqld, Version: 4.0.13-log, started with:
    Tcp port: 0  Unix socket: /var/run/mysql/mysql.sock
    Time                 Id Command    Argument
    030830  9:48:25       1 Connect     courier@localhost on maildb
                          1 Query       select transport from transport where&nbs;mnnbp=nsp;''''*''''
                          2 Connect     courier@localhost on maildb
                          2 Query       select goto from virtual where ars =&nbp;'''jhf@liuzt.wst''''
                          2 Query       select goto from virtual where arsnbsp;&bp''''jshf''''
                          2 Query       select goto from virtual where ars  '''@liuzt.wst''''
                          3 Connect     courier@localhost on maildb
                          3 Query       select goto from virtual where ars =&nbs;'''liuzt.wst''''
                          4 Connect     courier@localhost on maildb
                          4 Query       select maildir from users where ars =&nbs;'''liuzt.wst''''
                          1 Query       select transport from transport where&nbs;mi =&nbp;'''jhf@liuzt.wst''''
                          1 Query       select transport from transport where&nbs;mi =&nbs;'''liuzt.wst''''
                          5 Connect     courier@localhost on maildb
                          5 Query       select maildir from users where ars =&nbp;'''jhf@liuzt.wst''''
                          6 Connect     courier@localhost on maildb
                          6 Query       select uid from users where ars =&nbp;'''jhf@liuzt.wst''''
                          7 Connect     courier@localhost on maildb
                          7 Query       select gid from users where ars =&nbp;'''jhf@liuzt.wst''''

    maillog是這樣
    Aug 30 09:48:25 test postfix/pickup[725]: 3181D104204: uid=0 from=<root>
    Aug 30 09:48:25 test postfix/cleanup[757]: 3181D104204: message-id=<20030830134825.3181D104204@mail.liuzt.wst>
    Aug 30 09:48:25 test postfix/qmgr[726]: 3181D104204: from=<root@liuzt.wst>, size=285, nrcpt=1 (queue active)
    Aug 30 09:48:25 test postfix/virtual[763]: 3181D104204: to=<jshf@liuzt.wst>, relay=virtual, delay=0, status=sent (maildir)     

    象上面在linux系統上操作都可以的,可是用foxmai,outlook時就不行了,有無密碼都行,用tom@liuzt.wst向jshf@liuzt.wst發信,用foxmail收不到。

     seacaptain 回復于:2003-08-30 15:56:03
    請教個問題。在使用mysql存儲用戶信息的情況下。qmail是通過什么方式查找用戶的信息呢。比如該用戶是不是存在。qmail也要到mysql中查找嗎

     jsf008 回復于:2003-08-30 16:54:20
    用outlook收信時,又出現這樣的錯誤     


    未檢索到編號為 1 的郵件。 帳戶ns;92.168.0.129'''', 服務器ns;92.168.0.129'''', 協議: PO3ns;服務器響應:&nsp;'''ERR Can''''t open the message&nbs;l&bsp;-&nbp;it''s gone!'''', 端口: 110, 安全(SSL): 否, 服務器錯誤: 0x800CCC90, 錯誤號: 0x800420CD

    最后發現原因是這樣:
    偶發現偶收到的信(在/home/users/jshf/Maildir/cur下面)具有這樣屬性
     -rw-------    1 1000     1000         3839 Aug 31 07:42 1062330172.V900Id40a5.test 
    如果把它chmod 777 就可用outlook,foxmail收到,我該怎么使它一到郵箱就已是777或775了呢

     jsf008 回復于:2003-09-01 10:19:06
    MB兄,你遇到過上面這樣問題嗎

     jsf008 回復于:2003-09-01 10:34:51
    [quote:643edf2dd4="seacaptain"]。比如該用戶是不是存在。qmail也要到mysql中查找嗎[/quote:643edf2dd4]     
    應該是吧,這里有好多qmail相關地,你看看

     wxy 回復于:2003-09-0:2003-09-01 10:38:17
    我最近剛剛搞完了courier-imap + mysql + postfix + sasl的配置~~
    我沒有用courier里面SMTPD,還是用的Postfix~~

    過一段時間把它寫間把它寫出來~~

     mb 回復于:2003-09-01 10:51:17
    呵呵,我忘了在我的安裝說明筆記中說了,哪個gid uid要用你的web服務身份所用的權限來建立

     jsf008 回復于:2003-09-01 14:28:19
    “哪個gid uid要用你的web服務身份所用的權限來建立”我不太明白
    這個是在哪步進行地呢

     firer2000 回復于:2003-09-01 16:55:59
    g

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>