歡迎您光臨本站 註冊首頁

關於內部郵件伺服器對外收發郵件的幾個問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

關於內部郵件伺服器對外收發郵件的幾個問題

我有一個問題想諮詢大家:
  軟體:postfix+cyrus-imapd+ldap+sasl
  內部郵件伺服器A,地址192.168.1.3 域名test.com
  PIX防火牆外網地址:221.122.10.38,申請了域名,mail.auto-action.cn,埠25 143 110映射到192.168.1.3
  目前在內網用user@test.com可以向外部郵件服務發送郵件,當然外部郵件服務無法回郵件;在外網用user@mail.auto-action.cn可以登錄郵箱,但是無法發郵件。
   問題1:我怎麼用user@test.com給 @163.com發郵件,但是顯示發信人地址是 user@mail.auto-action.cn
   問題2:如果在外網登錄user@mail.auto-action.cn,然後可以發郵件呢?

tach02:~ # postconf -n
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_process_limit = 50
defer_transports = smtp replay cyrus
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix/html
inet_protocols = all
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mail_owner = postfix
mailbox_command =
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = mail.auto-action.cn
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain, $myhostname.$mydomain
mydomain = test.com
myhostname = tach02.test.com
mynetworks = 10.0.3.0/24, 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = $mydestination
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_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_client_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination,permit_inet_interfaces,permit_sasl_authenticated
smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
strict_8bitmime = no
strict_rfc821_envelopes = no
tls_random_source = dev:/dev/urandom
transport_maps = ldap:/etc/postfix/ldap_vbox.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains = ldap:/etc/postfix/ldap_vbox.cf
virtual_alias_maps = ldap:/etc/postfix/ldap_vbox.cf
virtual_gid_maps = static:2001
virtual_mailbox_base =
virtual_mailbox_domains = test.com
virtual_mailbox_maps = ldap:/etc/postfix/ldap_vbox.cf
virtual_transport = cyrus
virtual_uid_maps = static:2001

在外網用thunderbird 登陸 user@mail.auto-action.cn 向 126.com 發送郵件時的錯誤提示為:

May 16 22:23:26 tach02 postfix/smtpd: ctable_locate: install entry key sunmanssjx@126.com
May 16 22:23:26 tach02 postfix/smtpd: extract_addr: result: sunmanssjx@126.com
May 16 22:23:26 tach02 postfix/smtpd: send attr request = rewrite
May 16 22:23:26 tach02 postfix/smtpd: send attr rule = local
May 16 22:23:26 tach02 postfix/smtpd: send attr address = postmaster
May 16 22:23:26 tach02 postfix/smtpd: private/rewrite socket: wanted attribute: flags
May 16 22:23:26 tach02 postfix/smtpd: input attribute name: flags
May 16 22:23:26 tach02 postfix/smtpd: input attribute value: 0
May 16 22:23:26 tach02 postfix/smtpd: private/rewrite socket: wanted attribute: address
May 16 22:23:26 tach02 postfix/smtpd: input attribute name: address
May 16 22:23:26 tach02 postfix/smtpd: input attribute value: postmaster@tach02.tach.local
May 16 22:23:26 tach02 postfix/smtpd: private/rewrite socket: wanted attribute: (list terminator)
May 16 22:23:26 tach02 postfix/smtpd: input attribute name: (end)
May 16 22:23:26 tach02 postfix/smtpd: rewrite_clnt: local: postmaster -> postmaster@tach02.tach.local
May 16 22:23:26 tach02 postfix/smtpd: >>> START Sender address RESTRICTIONS <<<
May 16 22:23:26 tach02 postfix/smtpd: generic_checks: name=hash:/etc/postfix/access
May 16 22:23:26 tach02 postfix/smtpd: check_mail_access: ftptest@mail.auto-action.cn
May 16 22:23:26 tach02 postfix/smtpd: ctable_locate: move existing entry key ftptest@mail.auto-action.cn
May 16 22:23:26 tach02 postfix/smtpd: check_access: ftptest@mail.auto-action.cn
May 16 22:23:26 tach02 postfix/smtpd: check_domain_access: mail.auto-action.cn
May 16 22:23:26 tach02 postfix/smtpd: check_access: ftptest@
May 16 22:23:26 tach02 postfix/smtpd: generic_checks: name=check_sender_access status=0
May 16 22:23:26 tach02 postfix/smtpd: >>> END Sender address RESTRICTIONS <<<
May 16 22:23:26 tach02 postfix/smtpd: >>> START Recipient address RESTRICTIONS <<<
May 16 22:23:26 tach02 postfix/smtpd: generic_checks: name=permit_mynetworks
May 16 22:23:26 tach02 postfix/smtpd: permit_mynetworks: unknown 124.14.59.75
May 16 22:23:26 tach02 postfix/smtpd: match_hostname: unknown ~? 10.0.3.0/24
May 16 22:23:26 tach02 postfix/smtpd: match_hostaddr: 124.14.59.75 ~? 10.0.3.0/24
May 16 22:23:26 tach02 postfix/smtpd: match_hostname: unknown ~? 127.0.0.0/8
May 16 22:23:26 tach02 postfix/smtpd: match_hostaddr: 124.14.59.75 ~? 127.0.0.0/8
May 16 22:23:26 tach02 postfix/smtpd: match_list_match: unknown: no match
May 16 22:23:26 tach02 postfix/smtpd: match_list_match: 124.14.59.75: no match
May 16 22:23:26 tach02 postfix/smtpd: generic_checks: name=permit_mynetworks status=0
May 16 22:23:26 tach02 postfix/smtpd: generic_checks: name=reject_unauth_destination
May 16 22:23:26 tach02 postfix/smtpd: reject_unauth_destination: sunmanssjx@126.com
May 16 22:23:26 tach02 postfix/smtpd: permit_auth_destination: sunmanssjx@126.com
May 16 22:23:26 tach02 postfix/smtpd: ctable_locate: move existing entry key sunmanssjx@126.com
May 16 22:23:26 tach02 postfix/smtpd: NOQUEUE: reject: RCPT from unknown: 554 <sunmanssjx@126.com>: Relay access denied; from=<ftptest@mail.auto-action.cn> to=<sunmanssjx@126.com> proto=ESMTP helo=<>
May 16 22:23:26 tach02 postfix/smtpd: generic_checks: name=reject_unauth_destination status=2
May 16 22:23:26 tach02 postfix/smtpd: > unknown: 554 <sunmanssjx@126.com>: Relay access denied

請各位大大幫忙看看,謝謝了
《解決方案》

我有一個問題想諮詢大家:
  軟體:postfix+cyrus-imapd+ldap+sasl
  內部郵件伺服器A,地址192.168.1.3  ...
sunmanssjx 發表於 2010-05-16 23:18 http://linux.chinaunix.net/bbs/images/common/back.gif


    請問下閣下你內網對內網發可有收發不

[火星人 ] 關於內部郵件伺服器對外收發郵件的幾個問題已經有758次圍觀

http://coctec.com/docs/service/show-post-17889.html