iT邦幫忙

0

用Postfix+Dovecot+MySQL收發信有問題

更新:由於還沒時間完成新手訓練,所以沒辦法回覆大家的回答..

謝謝大家的回覆!看了大家的回答,看來真的很多需要debug的,感覺是我太急所以很多步驟都有點錯亂了,我已決定打掉重練,先照echochio大說的去裝裝看iredmail(畢竟也是沒裝過..)
很感謝大家的回答!!!

各位前輩大家好!
最近在Linux Debian10上架設了mail server
一步一步照著教學做了,結果收、發信還是都不行..
目前Postfix有正常運作
(雖然顯示exited,但爬文後好像這是Debian的bug?似乎不影響?)
Dovecot跟MySQL也有正常運作
查了maillog顯示下面這樣

Feb  7 04:35:44 localhost postfix/cleanup[24415]: fatal: trace: remove 3470F1ECCF log: Permission denied
Feb  7 04:35:44 localhost postfix/cleanup[24416]: fatal: trace: remove 3795E1ECD2 log: Permission denied
Feb  7 04:35:45 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 24415 exit status 1
Feb  7 04:35:45 localhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
Feb  7 04:35:45 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 24416 exit status 1
Feb  7 04:35:45 localhost postfix/smtpd[24402]: fatal: unable to connect to the public cleanup service
Feb  7 04:35:46 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/smtpd pid 24402 exit status 1
Feb  7 04:35:46 localhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/smtpd: bad command startup -- throttling
Feb  7 04:35:46 localhost postfix/cleanup[24417]: fatal: trace: remove 395B41ECCF log: Permission denied
Feb  7 04:35:47 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 24417 exit status 1
Feb  7 04:35:54 localhost postfix/master[22985]: warning: master_wakeup_timer_event: service pickup(public/pickup): Resource temporarily unavailable
Feb  7 04:36:02 localhost postfix/qmgr[24426]: fatal: scan_dir_push: open directory deferred/7: Permission denied
Feb  7 04:36:03 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/qmgr pid 24426 exit status 1
Feb  7 04:36:03 localhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/qmgr: bad command startup -- throttling
Feb  7 04:36:46 localhost postfix/cleanup[24434]: fatal: defer: remove 484BE1ECCF log: Permission denied
Feb  7 04:36:47 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 24434 exit status 1
Feb  7 04:36:47 localhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
Feb  7 04:36:48 localhost postfix/cleanup[24435]: fatal: defer: remove 4CE921ECCF log: Permission denied
Feb  7 04:36:49 localhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 24435 exit status 1
Feb  7 04:36:54 localhost postfix/master[22985]: warning: master_wakeup_timer_event: service pickup(public/pickup): Resource temporarily unavailable

又看了一下postqueue -p,全都沒寄出去..
再麻煩各位前輩們解惑了!
剛接觸這方面,有什麼缺少的資料再麻煩告知!非常感謝~~~

wayneup4 iT邦新手 2 級 ‧ 2021-02-08 10:14:17 檢舉
正反解有做嗎?
0
echochio
iT邦高手 1 級 ‧ 2021-02-07 15:58:22

建議你打掉重練
裝個簡單的 iredmail
iredmail 就是包含了
Postfix、Dovecot、Mysql、SpamAssassin、ClamAV、Roundcube、SOGo、Awstats、Fail2ban、web

安裝 好了可運作後
你可以 一個一個去 了解 其架構
說有付費版本可支援 AD ....
我改過設定就可用 ldap 去支援 AD ....
都是 opensoure 知道設定都可玩 ....
當然由 零開始去 debug 也行,
看你的 log 應該有少裝一些元件, 要去 config 拿掉就會正常了... 拿掉那些你要去 google ...
qmgr: bad command startup .... log 看是有 Permission denied ... 權限問題, 是 Queue Manager 郵件的目錄權限問題 ..
要 debug 很多問題.....

0
japhenchen
iT邦大師 1 級 ‧ 2021-02-08 13:48:28

是否有用sudo權限安裝postfix / dovecot / clamav / assassin ? 如果沒有,打掉重練
如果有sudo卻不正常,下下之策就是把/home、/var/mail、/var/log 都加入postfix / dovecot群組,或直接把這幾個資料夾給777 (真是下下策)

0
打雜工
iT邦新手 1 級 ‧ 2021-02-11 11:11:59

1.架設Email伺服器還要能動,要了解OS、相關套件設定、DNS、Web(如果要提供網頁服務)、Firewall...等,建議你個別熟悉後,才能把它整合起來。
2.架設Email用到MySQL,請教你是要記錄什麼資訊呢?我以前架設Mail主機還真沒用過MySQL。

我要發表回答

立即登入回答