1827292 Members
3714 Online
109717 Solutions
New Discussion

Re: SMTP

 
Brian butler
Frequent Advisor

SMTP

I need to relay mail from my hpux box through a exchange mail server, im not sure of any easy way to do this right now i have two diffrent domain names, and i am not able to change the ones on the hp box due to service gaurd. I feel that it will cause a problem with the cluster, i was wondering if there is an entry for SMTP, some how to specify the mail server.

HPUX 11.11
Exchange 2000


Thanks BB
Reboot and give me twenty....
12 REPLIES 12
Jose Mosquera
Honored Contributor

Re: SMTP

Hi,

You need set DS parameter in /etc/mail/sendmail.conf with your relay server resolution name, ie:
DSmy_relay_host@domain

Keep present your /etc/nsswitch.conf and /etc/resolv.conf

Also remember reactivate sendmail service after any change in /etc/mail/sendmail.conf by:
#/sbin/init.d/./sendmail stop
#/sbin/init.d/./sendmail start

Try to test any change by a single sendmail command:
#echo "This is a Test"|sendmail -v user@domain

Rgds.
Brian butler
Frequent Advisor

Re: SMTP

does not seem to be doing it i changed the entry to DSmailserv@domain.com and the relay is still not working i am able to ping hosts from the machine by FQDN.
Reboot and give me twenty....
Brian butler
Frequent Advisor

Re: SMTP

HELP its not working!!!!!

cronus:/etc>echo "This is a Test"|sendmail -v brianb@lifetime.hoan.com
brianb@lifetime.hoan.com... lifetime.hoan.com: Name server timeout
brianb@lifetime.hoan.com... Transient parse error -- message queued for future delivery
brianb@lifetime.hoan.com... queued
cronus:/etc>ping osiris.lifetime.hoan.com
PING osiris: 64 byte packets
64 bytes from 172.16.1.15: icmp_seq=0. time=1. ms
64 bytes from 172.16.1.15: icmp_seq=1. time=0. ms
Reboot and give me twenty....
Steven E. Protter
Exalted Contributor

Re: SMTP

Try this command line, just sub in a valid email addy.

/usr/sbin/sendmail -v -d8.99 -d38.99 stevenprotter@juf.org

Here is the output from a good transmission.
attached.

If you do this type a message, hit enter.

then hit period(dot) . then hit enter, you will see good diagnostics.

Do this like this...
/usr/sbin/sendmail -v -d8.99 -d38.99 stevenprotter@juf.org > /tmp/sendmail.out

and you'll get a file showing you where the mail is getting rejected.

Also see the mailq command, to see if the mail even gets off your HP box.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Brian butler
Frequent Advisor

Re: SMTP

Is there a way to specify a domain name other than the doamin name that the box is registerd with ? or to specify a DNS server for a particual domain. Its not resolving the domain that im sending the mail to.
Reboot and give me twenty....
John Meissner
Esteemed Contributor

Re: SMTP

I have configured several servers to send to our companies SMTP gateway.

edit /etc/mail/sendmail.cf
uncomment the DS option and after if enter the fully qualified domain name of you SMTP gateway server

next
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
All paths lead to destiny
Brian butler
Frequent Advisor

Re: SMTP

Is this the correct config


DS osiris.robbinsville.com
Reboot and give me twenty....
John Meissner
Esteemed Contributor

Re: SMTP

yes - provided that is the server in your company that handles SMTP for external e-mails
All paths lead to destiny
Jose Mosquera
Honored Contributor

Re: SMTP

Hi Again,

Try detailing your resolv orde in /etc/nsswitch file. i.e:
hosts: dns [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=return]

Try in you /etc/resolv.conf with:
search yourdomain.com
nameserver nnn.nnn.nnn.nn <- Your DNS IP Address

(*) Always keeps a unchanged copy of these files. Remember restart sendmail service after
do any change, even after changes in the files /etc/nsswitch and /etc/resolv.conf
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start


To chk queued mails execute "mailq -v", ths command will show you the content of /var/spool/mqueued directory where all non-successfully mail will be queued, each email have two files, one of the represent the header file and another is data file, you could remove them by rm command.

Accordind with your last info, your qualified domain name must be defined:
DSosiris.robbinsville.com (no blank space between DS and domain name)
And remember; after **any** change restart sendmail service!!!

Rgds.

Jose Mosquera
Honored Contributor

Re: SMTP

Hi,

Another possible way is forcing the definition of the domain inside the file /etc/mail/sendmail.cf by the definition of your "Official Domain Name" (Dj$w). i.e:

Dj$w. (blank spaces should not exist)

And, of course, restart sendmail service!

Rgds.
Steven E. Protter
Exalted Contributor

Re: SMTP

Let me clarify just to make sure, because I have screwed this up.

Djyourdomainname.com

Thats what you want it to look like.

You can get around this by changing your hostname.

/etc/rc.config.d/netconf

hostname can be changed from

hostname to
hostname.yourdomainname.com

This may cause omniback problems with version 3.X and openspool problems with version B.1.60

But it does eliminate the need to screw with the Dj entry.

This is important because every time you play with /etc/mail/sendmail.mc or /etc/aliases et al, you need to generate a new sendmail.cf file and it will be a default one not with your DJ change.

I have a script for that if you are interesting.

Sendmail is so much fun its probably worth owning the sendmail book.

My sendmail experience with Dj is on Linux, with most everything else HP-UX and Linux.

Now if you want to send mail to aol or yahoo, make sure yourdomain name is registered. aol rejects all mail from unregistered domainnames with a nasty message.

I would LOVE to find out how to set up my sendmail daemon to do the exact same thing.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
W.C. Epperson
Trusted Contributor

Re: SMTP

Steve: sendmail 8.9.3 and up will by default reject mail From: an unresolvable domainname. You'd have to turn it off with "FEATURE(accept_unresolvable_domains).

At 8.8.6 you have to use Claus Assman's check_relay ruleset hack.

See www.sendmail.org for lots of good stuff.
"I have great faith in fools; self-confidence, my friends call it." --Poe