无法发送邮件外使用后缀

问题描述:

我有以下服务器:无法发送邮件外使用后缀

[[email protected]]# 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 
[[email protected]]# 

我已经配置

/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,邮件和mailx与用完全相同的结果)我在歌厅下面的消息在/ var /日志/邮件:

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=<[email protected]> 
Apr 19 17:43:47 SR5S2 postfix/qmgr[15544]: A74F5DEC74: from=<[email protected]>, size=344, nrcpt=1 (queue active) 
Apr 19 17:43:47 SR5S2 postfix/qmgr[15544]: A74F5DEC74: to=<[email protected]>, 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的输出:

[[email protected]]# 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 
[[email protected]]# 
+0

是您主机名真的是'EXCHANGESERVER.COM'? –

+0

不,我在这里替换它,它实际上是另一个 – Roman

+0

请务必添加'postconf -n'输出,你的postfix是否负责处理'EXCHANGESERVER.COM'的邮件? – clement

inet_interfaces = localhost 

更改为您的IP

+0

或正确更新'/ etc/hosts',以便'localhost'解析为您的IP。 –

+0

我把它改成了'inet_interfaces = 10.10.10.10',并用'/etc/init.d/postfix restart'重启了postfix servise,但是当我再次尝试时,我得到了同样的错误.. – Roman

+0

是10.10.10.10一个ip,你是在使用postfix的服务器上使用? – mdessaint