簡體   English   中英

無法使用后綴向外部發送郵件

[英]Can't send mails outside using postfix

我在服務器下面:

    [root@SR5S2]# uname -a
Linux SR5S2 2.6.16.60-0.74.7-smp #1 SMP Fri Nov 26 09:16:10 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@SR5S2]# 

我已經配置

/etc/postfix/main.cf中

像這樣的文件(我在這里刪除了所有注釋,以使其更容易變紅):

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
mydomain = EXCHANGESERVER.COM
myorigin = EXCHANGESERVER.COM
inet_interfaces = localhost                        
mydestination = 10.220.1.1
unknown_local_recipient_reject_code = 550
relay_domains = 10.220.1.1                      
relayhost = 10.220.1.1
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
html_directory = /usr/share/doc/packages/postfix/html
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = EXCHANGESERVER.COM
program_directory = /usr/lib/postfix
defer_transports = 
relayhost = 10.220.1.1
mailbox_command = 
mailbox_transport = 
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_helo_required = no
smtpd_helo_restrictions = 
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = yes
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
mailbox_size_limit = 0
message_size_limit = 10240000

我重新啟動了postfix服務

/etc/init.d/postfix restart

但是,當我嘗試發送郵件(嘗試使用sendmail,mail和mailx並獲得完全相同的結果)時,我在/ var / log / mail中收到以下消息:

Apr 19 17:43:47 SR5S2 postfix/pickup[15543]: A74F5DEC74: uid=0 from=<root>
Apr 19 17:43:47 SR5S2 postfix/cleanup[25616]: A74F5DEC74: message-id=<20170419134347.A74F5DEC74@EXCHANGESERVER.COM>
Apr 19 17:43:47 SR5S2 postfix/qmgr[15544]: A74F5DEC74: from=<root@EXCHANGESERVER.COM>, size=344, nrcpt=1 (queue active)
Apr 19 17:43:47 SR5S2 postfix/qmgr[15544]: A74F5DEC74: to=<MAIL@EXCHANGESERVER.COM>, relay=none, delay=0.04, delays=0.03/0.01/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)

哪些狀態未配置中繼。 但事實是,可以從main.cf上看到它-已配置。

任何提示為什么我會收到此錯誤? 在哪里可以解決此問題? 在此問題上已經花費2天了,沒有任何成功:(


這是postconf -n的輸出:

[root@SR5S2]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports = 
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = 10.10.10.10
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = 
mailbox_size_limit = 0
mailbox_transport = 
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = 10.220.1.1
mydomain = EXCHANGESERVER.COM
myhostname = EXCHANGESERVER.COM
mynetworks_style = subnet
myorigin = azerconnect.az
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = 10.220.1.1
relayhost = 10.220.1.1
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = yes
smtp_use_tls = no
smtpd_helo_required = no
smtpd_helo_restrictions = 
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
[root@SR5S2]#
inet_interfaces = localhost

將此更改為您的IP。

當您重新加載postfix時,在/ var / log / mail中是否有任何特定於重新加載操作的錯誤?

您應該會看到一些東西,因為帶有相反選項的smtpd_sasl_auth_enable至少是重復的

還為所有屬性文件生成了.db嗎? 我確定您知道,但以防萬一“ postmap文件名”

這個main.cf看起來有點混亂,您確定需要在其中啟用所有這些功能嗎? 我會嘗試整理一下,只啟用可以肯定知道和需要的內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM