postfix + mysql virtual mailbox - BBS
By Carol
at 2009-05-04T12:04
at 2009-05-04T12:04
Table of Contents
我在 FreeBSD 7.0R 上面 用 ports 裝了 postfix-2.5.6,1
在安裝 postfix 時有勾選要 MySQL
但是安裝完之後我在設定 main.cf 的時候
main.cf 指定 virtual domain 信箱的設定像這樣:
virtual_mailbox_domains = \
mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains
virtual_mailbox_maps = \
mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps
www# cat mysql-virtual_mailbox_domains
hosts = 127.0.0.1
user = postfix
password = zLDgAyumSD
dbname = postfix
query = SELECT virtual_domains FROM virtual_mailbox_domains
result_format = %s
www# cat mysql-virtual_mailbox_maps
hosts = 127.0.0.1
user = postfix
password = zLDgAyumSD
dbname = postfix
query = SELECT pathname FROM virtual_mailbox_maps WHERE email_address='%s'
result_format = %s
然後我就重新啟動 postfix,想說先測試local 端可不可以發送到外面
www# mail [email protected]
Subject: test mail
test mail from tony
結果我看 maillog 卻顯示:
May 4 08:54:42 www postfix/virtual[4929]: 09AA041A57: \
to=<[email protected]>, relay=virtual, \
delay=4.7, delays=4.4/0.11/0/0.12, dsn=5.1.1, \
status=bounced (unknown user: "[email protected]")
後來我把 virtual_mailbox_domains 和 virtual_mailbox_maps 拿掉再寄一次
卻可以寄出去 請問這是什麼原因呢?
--
在安裝 postfix 時有勾選要 MySQL
但是安裝完之後我在設定 main.cf 的時候
main.cf 指定 virtual domain 信箱的設定像這樣:
virtual_mailbox_domains = \
mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains
virtual_mailbox_maps = \
mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps
www# cat mysql-virtual_mailbox_domains
hosts = 127.0.0.1
user = postfix
password = zLDgAyumSD
dbname = postfix
query = SELECT virtual_domains FROM virtual_mailbox_domains
result_format = %s
www# cat mysql-virtual_mailbox_maps
hosts = 127.0.0.1
user = postfix
password = zLDgAyumSD
dbname = postfix
query = SELECT pathname FROM virtual_mailbox_maps WHERE email_address='%s'
result_format = %s
然後我就重新啟動 postfix,想說先測試local 端可不可以發送到外面
www# mail [email protected]
Subject: test mail
test mail from tony
結果我看 maillog 卻顯示:
May 4 08:54:42 www postfix/virtual[4929]: 09AA041A57: \
to=<[email protected]>, relay=virtual, \
delay=4.7, delays=4.4/0.11/0/0.12, dsn=5.1.1, \
status=bounced (unknown user: "[email protected]")
後來我把 virtual_mailbox_domains 和 virtual_mailbox_maps 拿掉再寄一次
卻可以寄出去 請問這是什麼原因呢?
--
Tags:
BBS
All Comments
Related Posts
FreeBSD 7.2-RELEASE
By Madame
at 2009-05-04T09:21
at 2009-05-04T09:21
AMD 790x (with AMD SB750) Chip set o …
By Queena
at 2009-05-03T15:26
at 2009-05-03T15:26
AMD 790x (with AMD SB750) Chip set on-board RAID?
By Eden
at 2009-05-02T22:22
at 2009-05-02T22:22
/etc/rc.conf 問題
By Zora
at 2009-04-30T18:13
at 2009-04-30T18:13
/etc/rc.conf 問題
By Kama
at 2009-04-30T15:56
at 2009-04-30T15:56