- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how does mailx look up the mail server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 09:09 AM
06-22-2006 09:09 AM
how does mailx look up the mail server
Two questions,
1. how does mailx lookup the mail server? what is the steps?
2. I want to send mail using assigned mail server, how to accomplish that?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 09:33 AM
06-22-2006 09:33 AM
Re: how does mailx look up the mail server
You can check the man pages for mailx, dtmail, mail and sendmail. You will be able to grab some information from there.
Luis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 09:36 AM
06-22-2006 09:36 AM
Re: how does mailx look up the mail server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 09:50 AM
06-22-2006 09:50 AM
Re: how does mailx look up the mail server
'sendmail' relys on having a viable DNS running, so first, do that.
You need to setup the smart relay macro in '/etc/mail/sendmail.cf'. You should have something like:
DSadmin.exchange.com
...for the DS macro which should be commented-out.
Also, add your server's hostname and FQDN to '/etc/mail/sendmail.cw' if its not already there.
You do *not* need to have the 'sendmail' daemon running to send out-going mails. Thus, if you wish, set SENDMAIL_SERVER=0 in ' /etc/rc.config.d/mailservs'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 09:58 AM
06-22-2006 09:58 AM
Re: how does mailx look up the mail server
Just in case check this link also:
http://docs.hp.com/en/5991-4829/index.html
LN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 10:04 AM
06-22-2006 10:04 AM
Re: how does mailx look up the mail server
--'sendmail' relys on having a viable DNS running, so first, do that.
>> yes, I have viable DNS running, but the situation is my host(FQDN) is in one domain(say host1.domain1.com) and the mail server (that I wish to use) is in another domain (mailhost1.domain2.com), both DNS server are correctly configured, from host host1.domain1.com I can nslookup and ping mailhost1.domain2.com, however, each time when I use mailx or sendmail it will use another mail server for delivering (mailhost2.domain2.com) so that's why I want to know the search path. I also tried to change the domain/nameserver in resolv.conf, it does not help either.
--You need to setup the smart relay macro in '/etc/mail/sendmail.cf'. You should have something like:
DSadmin.exchange.com
...for the DS macro which should be commented-out.
>> I did above but still mail won't be sent from this server
DSmailhost1.domain2.com
--Also, add your server's hostname and FQDN to '/etc/mail/sendmail.cw' if its not already there.
>> tried same as above.
--You do *not* need to have the 'sendmail' daemon running to send out-going mails. Thus, if you wish, set SENDMAIL_SERVER=0 in ' /etc/rc.config.d/mailservs'.
>> understand, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 11:22 AM
06-22-2006 11:22 AM
Re: how does mailx look up the mail server
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 12:05 PM
06-22-2006 12:05 PM
Re: how does mailx look up the mail server
...
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2006 01:30 PM
06-22-2006 01:30 PM
Re: how does mailx look up the mail server
Check the below link and /etc/rc.config.d/mailservs file.
http://devrsrc1.external.hp.com/STK/impacts/i216.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2006 02:07 AM
06-23-2006 02:07 AM
Re: how does mailx look up the mail server
export SENDMAIL_SERVER=1
export SENDMAIL_SERVER_NAME=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2006 02:17 AM
06-23-2006 02:17 AM
Re: how does mailx look up the mail server
export SENDMAIL_SERVER_NAME= line? Something like:
export SENDMAIL_SERVER_NAME=mailhost1.domain2.com
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2006 02:41 AM
06-23-2006 02:41 AM
Re: how does mailx look up the mail server
passwd: files ldap
group: files ldap
hosts: files ldap dns
networks: files ldap
protocols: files ldap
rpc: files ldap
publickey: files
netgroup: files ldap
automount: ldap files
aliases: files
services: files ldap
I don't have any value for SENDMAIL_SERVER_NAME in /etc/rc.config.d/mailservs, do I have to?
mailx does not require sendmail daemon to be runing right.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2006 07:43 PM
06-26-2006 07:43 PM
Re: how does mailx look up the mail server
to emulate, how sendmail is looking up the mail destination, and works out how mail will get there, type:
nslookup -q=mx
e.g.
nslookup -q=mx hp.com
this results in a list with weighed mail relays (MX records). the lowest number will be attempted first.
you can also verify if the mail relay you intnd to use has the most important MX-record for itself, from the system you are sending from (this can vary)
nslookup -q=mx mailhost1.domain2.com
if this seems in order, you can test your sendmail.cf configuration file, by starting it in testmode:
sendmail -bt
> /parse user@dest.domain.
this will give you the real mailertype, relay and "destination user" sendmail will be using
i.e.
mailer smtp, host relay.domain.com, user user@dest.domain
you need to quit test mode using
with regards to the nsswitch.conf, do you need ldap and dns for host lookup, for the applications running on the system? if not, you could just have files in this line and add mailhost1 to /etc/hosts (if sendmail can only find mailhost1, it can only use that one)
if the result of the test is not what you want, and you need to use ldap and dns for hosts lookup, you could build a new sendmail.cf:
cd /usr/newconfig/etc/mail/cf/cf
./gen_cf
and answer the questions you find appropriate
HTH
kasper
hp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2006 01:42 PM
06-27-2006 01:42 PM
Re: how does mailx look up the mail server
nslookup -q=mx mailhost1.domain2.com
Using /etc/hosts on: hp03
looking up FILES
Trying DNS
mailhost1.domain2.com preference = 5, mail exchanger = mailhost1.domain2.com
mailhost1.domain2.com internet address = 14x.13x.1x.1x
One of the test result that I don't understand is if I did not specify the DS entry in sendmail.cf, and this host(hp03) is NOT in the allow relay list on mailhost1.domain2.com, mail still can be send out to my corporate email account as well as Internet email account(yahoo), but the mail headers are different.
1. for the mail arrived at my corporate mailbox, the header says it uses mailhost1.domain2.com for the mail routing.
2. for the mail arrived at my internet(yahoo) mailbox, the header says it uses 2x7.1x7.5x.1x,
3. I could not lookup this IP address(2x7.1x7.5x.1x) anywhere on the internal LAN, however it can be resolved outside on the internet(outside the corporate network).
It must be a legacy mail server somewhere (because of the company's acquisition), but I m wondering what is the mail route and how the DNS and mail server configuration will affect it.
We use ldap for user authentication, automount and netgroup, it has hosts entries but we use DNS to lookup the hosts.
Regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2006 08:58 PM
09-19-2006 08:58 PM
Re: how does mailx look up the mail server
I am naive member to this forum.
The topic initiated, here would have been initaied by me today as i have to send message using mailx. SO i would like.. to have summarized , rather documented version of this usage, which will help me. So plz.. reply.. I am sure Mr ran_li will reply.. looking forward for ur replies .... & suggegstions..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 03:03 AM
09-20-2006 03:03 AM
Re: how does mailx look up the mail server
what is your question or problem encountered.
Ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2006 03:05 AM
09-20-2006 03:05 AM
Re: how does mailx look up the mail server
Please initialize another thread for your questions, my problem is not apply to your case specifically.
Ran