2013-08-19 40 views
2

我試圖建立與後綴郵件服務器,並使用從https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql#sph_prerequisitesLinux的後綴配置和主機名的FQDN

我跟每一個步驟,並在防火牆上也開了每一封郵件端口,但本教程的dovecot當我嘗試設置我的電子郵件客戶端連接IMAP或POP3它只是無法建立連接。

看來我可以使用我的私人郵箱向我的域發送電子郵件。無論如何,我的日誌/var/log/mail.log是空的。

我想這與設置主機名(FQDN)和後綴配置有關。但我是一個有點困惑的主機名和FQDN .. 在的Linode我已經添加了我的域名在這個例子是我的DNS管理器:mydomain.com

裏面mydomain.com我有這樣的:

MX record 
mail.mydomain.com 

A/AAAA Records 
      120.120.120.120 
www  120.120.120.120 
mail  120.120.120.120 
donald  120.120.120.120 

唐納德是FQDN,因爲我在我的Linux服務器,隨後通過本教程現在

我有幾件事情:

/etc/hosts 
127.0.0.1  localhost 
127.0.1.1  ubuntu 
120.120.120.120 donald.mydomain.com  donald 

/etc/mailname 
donald.mydomain.com 

後綴配置

/etc/postfix/main.cf 
.... 
myhostname = mail.mydomain.com 
alias_maps = hash:/etc/aliases 
alias_database = hash:/etc/aliases 
myorigin = /etc/mailname 
mydestination = localhost 
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 
mailbox_size_limit = 0 
recipient_delimiter = + 
inet_interfaces = all 
.... 

正如你看到的,我認爲它是這個配置,什麼是錯。我不明白什麼是myhostname和mydestination以及郵件名...有人可以用這些配置糾正我嗎?

謝謝!

編輯 我發現,我原來在dovecot的主配置錯誤,也是在已經在使用..好吧,我重新啓動我的服務器SMTP端口和兩個後綴和達夫科特的運行。我可以將imap服務器綁定到我的Outlook客戶端並接收郵件。現在,當我嘗試回覆的電子郵件我得到這個消息:554 5.7.1 : Relay access denied

而且,這裏是我的後綴配置:

alias_database = hash:/etc/aliases 
alias_maps = hash:/etc/aliases 
append_dot_mydomain = no 
biff = no 
config_directory = /etc/postfix 
inet_interfaces = all 
mailbox_size_limit = 0 
mydestination = localhost 
myhostname = mail.mydomain.com 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 
myorigin = /etc/mailname 
readme_directory = no 
recipient_delimiter = + 
relayhost = 
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) 
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination 
smtpd_sasl_auth_enable = yes 
smtpd_sasl_path = private/auth 
smtpd_sasl_type = dovecot 
smtpd_tls_auth_only = yes 
smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem 
smtpd_tls_key_file = /etc/ssl/private/dovecot.pem 
smtpd_use_tls = yes 
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf 
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf 
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf 
virtual_transport = lmtp:unix:private/dovecot-lmtp 

回答

5

請參考postfix configuration parameters更多的幫助。

myorigin = mydomain.com 
# The domain name to append when the UNIX user sends out a mail. (For eg. If UNIX user john sends mail, then [email protected] will be the sender address 
myhostname = mail.mydomain.com 
# The unique FQDN of your mail server. When talking to other SMTP servers, it identifies itself as mail.mydomain.com 
mydestination = mydomain.com mail.mydomain.com 
# You are instructing postfix to receive mails for the domains mydomain.com mail.mydomain.com, whose valid recipients can be specified using local_recipient_maps 

您可以編輯您的問題並粘貼postconf -n輸出,這將有助於找出問題

+0

嗨,更新您的要求它 – yves