大家早安! 想請問各位先進關於Postfix的一個問題 因最近有自己架設一個Mail Server 主機,已架差不多了!發現已可收內部網域信也可寄外部信出去,但外部信箱的信無論如何都收不進來!!只出現Remote host said: 550 <xxx@mailshit.no-ip.biz> Relay access denied [RCPT_TO]想請問各位先進這是我設定上那裡的問題呢? 我防火牆也都關了!! relay也有設定可是就是只能寄外部信無法收外部信! 這是我Main的config設定
myhostname = mailshit.no-ip.biz
mydomain = no-ip.biz
myorigin = $mydomain
inet_interfaces = all
mydestination = $mydomain, localhost.$mydomain, localhost
mynetworks_style = host
mynetworks = 127.0.0.0/8, 172.16.0.0/16
relay_domains = $mydestination
樓主你的domain應該是 mailshit.no-ip.biz吧
所以你的 mydomain = mailshit.no-ip.biz 才對
至於mydestinatiion的設定看你的mail server是當mailbox server或mail gateway
設定會不一樣:
若是當mailbox server,就用原本的defaut值
mydestination =$myhostname, localhost.$mydomain, localhost
你目前的設定是當mail gateway的設定
mydestination = $mydomain, localhost.$mydomain, localhost
#myhostname = host.domain.tld
myhostname = mailshit.no-ip.biz
mydomain = no-ip.biz
#myorigin = $myhostname
myorigin = $mydomain
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
#mydestination = mail.mailshit.no-ip.biz
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#mydestination = mailshit.no-ip.biz
mydestination = $mydomain, localhost.$mydomain, localhost
local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
local_recipient_maps =
#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style = host
#mynetworks = 168.100.189.0/28, 127.0.0.0/8,127.0.0.0/8,172.16.0.0/16
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
mynetworks = 127.0.0.0/8, 172.16.0.0/16
#relay_domains = mailshit.no-ip.biz
#relay_domains = no-ip.biz
relay_domains = $mydestination
這是相關的Maps設定
從你的Email:xxx@mailshit.no-ip.biz 看起來
建議把mydomain改成mailshit.no-ip.biz後再試試看
postfix 就會視為mailshit.no-ip.biz為自己的網域,而不會再往外寄
也就不會產生Relay access denied 錯誤
把myhostname加入mydestination即可
mydestination = $mydomain, $myhostname
這個情況有點類似主網域下的子網域,我個人提供的設定方式如下:
myhostname = mailshit.no-ip.biz
mydomain = no-ip.biz
myorigin = $myhostname
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
這樣的設定如有問題,請指正!!