The following is my operation:
- Create an /etc/netsvc.conf file, this is to tell sendmail to use /etc/hosts for name resolution not
DNS (default):
vi /etc/netsvc.conf
Add the following:
hosts=local
- Change the permissions on the /etc/netsvc.conf file to lock down root only access:
chmod 600 /etc/netsvc.conf
- Add into /etc/hosts file:
a1.b1.c1.d1 mailserver.domain_internal
a2.b2.c2.d2 myserver.domain_internal
- Edit the /etc/sendmail.cf and make the following changes:
Vi /etc/sendmail.cf
Change:
#DwYourHostName
To:
Dwmyserver.domain_internal
Change:
# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DS
To:
# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DSmailserver.domain_internal
Save the file.
- run the command "refresh -s sendmail"
- try to mail -v xxx@sina.com.cn but fail by the following tips:
"The local host name (myserver) does not have a domain; fix $j in co
nfig file"
I have tested I can "telnet mailserver 25" to send the mail successfully.
Pls help to verify where is wrong.Thanks a greate!
- Create an /etc/netsvc.conf file, this is to tell sendmail to use /etc/hosts for name resolution not
DNS (default):
vi /etc/netsvc.conf
Add the following:
hosts=local
- Change the permissions on the /etc/netsvc.conf file to lock down root only access:
chmod 600 /etc/netsvc.conf
- Add into /etc/hosts file:
a1.b1.c1.d1 mailserver.domain_internal
a2.b2.c2.d2 myserver.domain_internal
- Edit the /etc/sendmail.cf and make the following changes:
Vi /etc/sendmail.cf
Change:
#DwYourHostName
To:
Dwmyserver.domain_internal
Change:
# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DS
To:
# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DSmailserver.domain_internal
Save the file.
- run the command "refresh -s sendmail"
- try to mail -v xxx@sina.com.cn but fail by the following tips:
"The local host name (myserver) does not have a domain; fix $j in co
nfig file"
I have tested I can "telnet mailserver 25" to send the mail successfully.
Pls help to verify where is wrong.Thanks a greate!