亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
12下一頁
最近訪問板塊 發(fā)新帖
查看: 5717 | 回復(fù): 12
打印 上一主題 下一主題

[Mail] postfix本地郵件投遞的過程? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2006-07-26 12:26 |只看該作者 |倒序?yàn)g覽
在配置好一個(gè)postfix郵件服務(wù)器后,對(duì)postfix本地郵件投遞過程不是很明白,那位能給哪位能不能給講解一下;
   我現(xiàn)在的郵件server也還有些問題,我配置的是
postfix+mysql+courier-authlib+courier-imap
通過虛擬域和虛擬用戶來收發(fā)郵件,現(xiàn)在對(duì)外發(fā)送郵件沒有問題,但是本地虛擬用戶發(fā)送有問題,發(fā)送給本地虛擬用戶的郵件,在投遞時(shí)好像都在系統(tǒng)用戶里去確認(rèn)去了,如果系統(tǒng)用戶(/etc/passwd)里沒有則就投遞失。
下面是發(fā)送時(shí)的日志信息
Jul 26 11:54:07 testmail authdaemond: received auth request, service=smtp, authtype=login
Jul 26 11:54:07 testmail authdaemond: authmysql: trying this module
Jul 26 11:54:07 testmail authdaemond: SQL query: SELECT username, password, "", '89', '89', homedir, maildir, "", uid, "" FROM mailbox WHERE username = "huang@testhuang.com"
Jul 26 11:54:07 testmail authdaemond: password matches successfully
Jul 26 11:54:07 testmail authdaemond: authmysql: sysusername=<null>, sysuserid=89, sysgroupid=89, homedir=/home/mail, address=huang@testhuang.com, fullname=huang, maildir=testhuang.com/huang/Maildir/, quota=<null>, options=<null>
Jul 26 11:54:07 testmail authdaemond: authmysql: clearpasswd=<null>, passwd=EYjn8AK4PYrcw
Jul 26 11:54:07 testmail authdaemond: Authenticated: sysusername=<null>, sysuserid=89, sysgroupid=89, homedir=/home/mail, address=huang@testhuang.com, fullname=huang, maildir=testhuang.com/huang/Maildir/, quota=<null>, options=<null>
Jul 26 11:54:07 testmail authdaemond: Authenticated: clearpasswd=123456, passwd=EYjn8AK4PYrcw
Jul 26 11:54:07 testmail postfix/smtpd[10095]: NOQUEUE: reject: RCPT from unknown[192.168.0.16]: 550 <huang@testhuang.com>: Recipient address rejected: User unknown in local recipient table; from=<huang@testhuang.com> to=<huang@testhuang.com> proto=ESMTP helo=<TSS-HUANG>
Jul 26 11:54:08 testmail postfix/smtpd[10095]: lost connection after RCPT from unknown[192.168.0.16]

如果系統(tǒng)用戶存在了,則郵件就投遞到了用戶相應(yīng)的主目錄下/home/test,我設(shè)置的虛擬用戶的maildir在/home/mail/下,正常投遞應(yīng)該要投遞到/home/mail/testhuang.com/huang/Maildir/new下去阿;可以確定的是接收時(shí)都是在/home/mail/testhuang.com/huang/Maildir/new這個(gè)目錄下接收的,我試過將投遞到/home/test/Maildir/new下的郵件拷貝到/home/mail/testhuang.com/huang/Maildir/new后可以接收走(outlook和extmail試驗(yàn))
所以說問題就是投遞的時(shí)候?yàn)槭裁磿?huì)由系統(tǒng)用戶來判斷呢? 這個(gè)與mail.cf設(shè)置有關(guān)系嗎?為什么發(fā)給本地虛擬用戶的郵件不去mysql里確認(rèn)呢?
我在里面添加上local_transport=virtual后還是一樣的問題……
請(qǐng)各位有經(jīng)驗(yàn)的同仁指教一下
謝了

[ 本帖最后由 boyhyc 于 2006-7-26 12:44 編輯 ]

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2006-07-26 13:26 |只看該作者
SQL query: SELECT username, password, "", '89', '89', homedir, maildir, "", uid, "" FROM mailbox WHERE username = "huang@testhuang.com"
你看一下你的authmysqlrc文件的詳細(xì)配置。

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2006-07-26 13:36 |只看該作者
MYSQL_SERVER            localhost
MYSQL_USERNAME          extmail
MYSQL_PASSWORD          extmail

MYSQL_PORT              3306
MYSQL_OPT               0
MYSQL_DATABASE          extmail

MYSQL_USER_TABLE        mailbox
MYSQL_CRYPT_PWFIELD     password
MYSQL_UID_FIELD         '89'
MYSQL_GID_FIELD         '89'
MYSQL_LOGIN_FIELD       username
MYSQL_HOME_FIELD        homedir

MYSQL_NAME_FIELD        uid
MYSQL_MAILDIR_FIELD     maildir

能是這個(gè)設(shè)置的問題嗎?日志里不都顯示password matches successfully么?
我的感覺就是在投遞的時(shí)候并沒有去mysql里確認(rèn),因?yàn)槿绻灰嬖谙鄳?yīng)的系統(tǒng)用戶,郵件就可以投遞出去了。也就是本地投遞時(shí)他到/etc/passwd里確認(rèn)有無這個(gè)用戶.奇怪……

[ 本帖最后由 boyhyc 于 2006-7-26 13:41 編輯 ]

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2006-07-26 14:44 |只看該作者
附加上main.cf的設(shè)置
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_vrfy_command = yes
fallback_transport = cyrus
home_mailbox = Maildir/
html_directory = no
mail_owner = postfix
mailbox_size_limit = 14336000
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 14336000
mydestination = $myhostname, $mydomain
mydomain = testhuang.com
myhostname = testhuang

mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = com,cn,jp
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_helo_name = postfix.com
unknown_local_recipient_reject_code = 550

#############SMTP################
smtpd_recipient_limit = 100
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

##################MYSQL#########################
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_create_maildirsize = yes
virtual_mailbox_base = /home/mail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 102400000
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_minimum_uid = 89
virtual_gid_maps = postfix:89
virtual_uid_maps = postfix:89
virtual_overquota_bounce = yes
virtual_transport = virtual
virtual_trash_count = yes
virtual_trash_name = .Trash

如果加上
local_transport = virtual
則郵件可以從客戶端發(fā)送到服務(wù)器上去,不過會(huì)一直停留在隊(duì)列里,日志里還沒有什么錯(cuò)誤信息,……

[ 本帖最后由 boyhyc 于 2006-7-26 15:20 編輯 ]

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2006-07-26 16:28 |只看該作者
把 mydestination = $myhostname, $mydomain
改成
mydestination = $myhostname
mydestination 里的表示本地域

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2006-07-26 16:38 |只看該作者
原帖由 Aryang 于 2006-7-26 16:28 發(fā)表
把 mydestination = $myhostname, $mydomain
改成
mydestination = $myhostname
mydestination 里的表示本地域

好像不是這里的問題,改了還是不行

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2006-07-26 18:31 |只看該作者
正常的情況下,如果收件域名在virtual_mailbox_domains里,并且
virtual_transport = virtual
那么應(yīng)該是用系統(tǒng)的virtual進(jìn)行投遞,投遞的時(shí)候要查詢virtual_mailbox_maps 來確定用戶名對(duì)應(yīng)的投遞目錄
之前的esmtp認(rèn)證和投遞是兩回事

可以通過下面的命令確定一下某地址到底投遞到哪個(gè)目錄去了

postmap -q huang@testhuang.com mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

正常的應(yīng)該顯示 testhuang.com/huang/Maildir 類似的東西

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2006-07-26 21:34 |只看該作者
先謝過樓上的朋友
但是現(xiàn)在我現(xiàn)在的狀態(tài)還是比較奇怪,不知道是哪個(gè)地方的設(shè)置出了問題
郵件投遞的時(shí)候好象并沒有到virtual_mailbox_maps去確定目錄,而是根據(jù)/etc/passwd來確定用戶,所以郵件也自然就投遞到了用戶的家目錄下。
好象就是在投遞的過程中虛擬用戶和域都沒生效了,哪位高人能不能講解一下postfix的具體投遞過程呢?為什么在認(rèn)證的時(shí)候都是通過虛擬域來實(shí)現(xiàn)了,而在投遞的時(shí)候卻不能呢!
郁悶
這樣的問題好象都沒人遇到過……

論壇徽章:
0
9 [報(bào)告]
發(fā)表于 2006-07-27 08:24 |只看該作者
經(jīng)過樓上朋友和extmail老大的指點(diǎn)又明白了些
將mydestination里去掉$mydomain后,郵件可以投遞到服務(wù)器上去了,但是還是一直在隊(duì)列里沒有發(fā)送成功,在日志里面顯示
Jul 27 08:01:07 testmail postfix/smtpd[9984]: connect from unknown[192.168.0.16]
Jul 27 08:01:07 testmail postfix/smtpd[9984]: NOQUEUE: reject: RCPT from unknown[192.168.0.16]: 504 <TSS-HUANG>: Helo command rejected: need fully-qualified hostname; from=<test@testhuang.com> to=<huang@testhuang.com> proto=SMTP helo=<TSS-HUANG>
Jul 27 08:01:07 testmail postfix/smtpd[9984]: lost connection after RCPT from unknown[192.168.0.16]
Jul 27 08:01:07 testmail postfix/smtpd[9984]: disconnect from unknown[192.168.0.16]
Jul 27 08:01:12 testmail postfix/smtpd[9984]: connect from unknown[192.168.0.16]
Jul 27 08:01:12 testmail authdaemond: received auth request, service=smtp, authtype=login
Jul 27 08:01:12 testmail authdaemond: authmysql: trying this module
Jul 27 08:01:12 testmail authdaemond: SQL query: SELECT username, password, "", '89', '89', homedir, maildir, "", name, "" FROM mailbox WHERE username = "test@testhuang.com"
Jul 27 08:01:12 testmail authdaemond: password matches successfully
Jul 27 08:01:12 testmail authdaemond: authmysql: sysusername=<null>, sysuserid=89, sysgroupid=89, homedir=/home/mail, address=test@testhuang.com, fullname=test, maildir=testhuang.com/test/Maildir/, quota=<null>, options=<null>
Jul 27 08:01:12 testmail authdaemond: authmysql: clearpasswd=<null>, passwd=dmYQr5/Vbn34w
Jul 27 08:01:12 testmail authdaemond: Authenticated: sysusername=<null>, sysuserid=89, sysgroupid=89, homedir=/home/mail, address=test@testhuang.com, fullname=test, maildir=testhuang.com/test/Maildir/, quota=<null>, options=<null>
Jul 27 08:01:12 testmail authdaemond: Authenticated: clearpasswd=123456, passwd=dmYQr5/Vbn34w
Jul 27 08:01:12 testmail postfix/smtpd[9984]: 2F4D72C007: client=unknown[192.168.0.16], sasl_method=LOGIN, sasl_username=test@testhuang.com
Jul 27 08:01:12 testmail postfix/cleanup[9993]: 2F4D72C007: message-id=<20060727000112.2F4D72C007@testhuang>
Jul 27 08:01:12 testmail postfix/qmgr[9860]: 2F4D72C007: from=<test@testhuang.com>, size=567, nrcpt=1 (queue active)
Jul 27 08:01:12 testmail postfix/smtpd[9984]: disconnect from unknown[192.168.0.16]

并一會(huì)后就有如下的警告信息:
Jul 27 08:01:31 testmail postfix/virtual[10015]: fatal: unsupported dictionary type: postfix
Jul 27 08:01:32 testmail postfix/master[9559]: warning: process /usr/libexec/postfix/virtual pid 10015 exit status 1
Jul 27 08:01:32 testmail postfix/master[9559]: warning: /usr/libexec/postfix/virtual: bad command startup -- throttling

上面這個(gè)之前我也好像也遇到過,好像就是郵件一直試著去投但是就是沒成功,顯示未提供目錄類型?
是指maildir的類型嗎?還有下面兩條就不太明白了。
那位朋友還能給解答一下……

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2006-07-27 10:06 |只看該作者
fatal: unsupported dictionary type: postfix
估計(jì)你哪的配置寫錯(cuò)了,
在 virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf 這個(gè)里,mysql就是所謂的dictionary type,你是不是在某些地方寫了 xxx_maps = postfix:/xxxxxxxxxxxxxxxxx

postconf | grep postfix:
看看是不是有這樣的配置
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP