如何修改postfix mail命令發送郵件的默認域?
我需要在shell下用mail命令發郵件,郵件發出的默認域名後綴是localhost.localdomain,郵件能夠正常發送,但是因為目標主機無法解析localhost.localdomain,造成目的用戶收不到,postfix怎麼設置才能把發件人由
[email protected]改為
[email protected],我已經修改過main.cf中的myhostname = mail.abc.com,但是沒有效果,發件人仍然是
[email protected],加masquerade_domains = abc.cn參數發郵件,/var/log/maillog根本就沒有反應
Jun 21 11:27:03 hkweb sendmail: j5L3R3Pa029498: from=root, size=818, class=0, nrcpts=1, msgid=<
[email protected]>;, relay=root@localhost
Jun 21 11:27:03 hkweb postfix/smtpd: connect from hkweb
Jun 21 11:27:03 hkweb postfix/smtpd: ED86C2EF102: client=hkweb
Jun 21 11:27:04 hkweb postfix/cleanup: ED86C2EF102: message-id=<
[email protected]>;
Jun 21 11:27:04 hkweb postfix/nqmgr: ED86C2EF102: from=<
[email protected]>;, size=1330, nrcpt=1 (queue active)
Jun 21 11:27:04 hkweb sendmail: j5L3R3Pa029498:
[email protected], ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30818, relay= , dsn=2.0.0, stat=Sent (Ok: queued as ED86C2EF102)
Jun 21 11:27:04 hkweb postfix/smtpd: disconnect from hkweb
Jun 21 11:27:28 hkweb postfix/smtp: ED86C2EF102: to=<
[email protected]>;, relay=sohumx.sohu.com, delay=25, status=bounced (host sohumx.sohu.com said: 554 <
[email protected]>;: Sender address rejected: Access denied, refer to http://antispam.mail.sohu.com/feedback/feedback.jsp?err_type=2&msg=%72%6F%6F%74%40%6C%6F%63%61%6C%68%6F%73%74%2E%6C%6F%63%61%6C%64%6F%6D%61%69%6E (in reply to MAIL FROM command))
Jun 21 11:27:28 hkweb postfix/cleanup: 94B002EF103: message-id=<20050621032728.94B002EF103@hkweb>;
Jun 21 11:27:28 hkweb postfix/nqmgr: 94B002EF103: from=<>;, size=3400, nrcpt=1 (queue active)
Jun 21 11:27:28 hkweb postfix/smtp: 94B002EF103: to=<
[email protected]>;, relay=none, delay=0, status=bounced (Name service error for name=localhost.localdomain type=A: Host not found)
《解決方案》
如何修改postfix mail命令發送郵件的默認域?
原帖由 "lues"]
要修改/etc/hosts里127.0.0.1相關的信息。。試試看。
《解決方案》
如何修改postfix mail命令發送郵件的默認域?
原帖由 "hzqbbc" 發表:
要修改/etc/hosts里127.0.0.1相關的信息。。試試看。
我的機器有oracle,不能改機器名,否則很麻煩
《解決方案》
如何修改postfix mail命令發送郵件的默認域?
原帖由 "lues"]
如果你用/usr/sbin/sendmail來發郵件的話,可以改sender,通過 -f 參數。詳細man sendmail
《解決方案》
回復 3# lues
有裝ORACLE也可以改機器名,改完,對應ORACLE的2個文件要做修改