Operating System - HP-UX
1827445 Members
5419 Online
109965 Solutions
New Discussion

Re: sendmail configuration

 
SOLVED
Go to solution
Sorin Lupascu
Occasional Advisor

sendmail configuration

i need to configure sendmail to pass all mail to an exchange mail server; now, when i send an e-mail to somebody@externaldomain.com my sendmail try to resolve externaldomain.com; i need that sendmail only pass the e-mail to the exchange server who can resolve external addresses; my sendmail is an internal mail server and i don't want it to send mail to external addresses because exchange can do this; when i send an e-mail to somebody@internaldomain.local it works but also i need to send to external addresses through exchange mail server; can you tell me what i need to configure???
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

Easy

vi sendmail.cf

DS=hostname.exchange
or
DS=ip address of exchange.

Make sure exchange server is explicitly set up to accept relay

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

SEP
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
Sorin Lupascu
Occasional Advisor

Re: sendmail configuration

i've already set up this feature but it doesn't work; i need to send to somebody@yahoo.com for example but my sendmail server try to resolve domain yahoo.com; i don't need that on sendmail beacuse exchange server can do this;
Ivan Ferreira
Honored Contributor

Re: sendmail configuration

Ensure that you specified the host name instead of the IP in the DS declaration, and ensure that the host name specified is in the /etc/hosts file.

Use mail -v user@domain to verify the SMTP transaction.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Sameer_Nirmal
Honored Contributor

Re: sendmail configuration

Hi ,

I am not sure about how the lookup is configured. But ensure lookup is proper and
then try following settings in the sendmail.cf file .

Define the DS macro for your Exchange host.
DS

Define the local domain with Dm and Dj macro
Dm
Dj$w.

Un-comment a like where you see
R$* .......... check_local .......... Local Domain ?

Restart the sendmail

Sorin Lupascu
Occasional Advisor

Re: sendmail configuration

i have to specify that my sendmail and exchange servers are in different domains:
sendmail_machine.domain1.local and exchange_machine.domain2.local; i need to tell to my sendmail to not use the dns_machine.domain1.local but just forward the e-mails to exchange_machine.domain2.local; how can i do that?
Adisuria Wangsadinata_1
Honored Contributor

Re: sendmail configuration

Hi,

You need to add route between sendmail_machine.domain1.local and exchange_machine.domain2.local.

Check the man page of routeadd for details :

# man route

Once the new route is working, you need to add the configuration on /etc/rc.config.d/netconf and restart the inetd.

Check the url below (docID : ) about 'Sys Adm: Adding static routes to the network' :

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080079807

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Sorin Lupascu
Occasional Advisor

Re: sendmail configuration

Thank you to all who replied.
I tried all previous configurations but doesnâ t work so Iâ ll try to be more precise.
I want to send all emails , with sendmail (8.9.3), from an HP server
hpux11.11) named HPJOHN.local.domain ,
externally , through an Exchange Server named EXCH.local.domain :
HPJONH.local.domain -> â #sendmail bob.smith@yahoo.comâ -> EXCH.local.domain - > Internet (yahoo.com)

Exchange is working properly and has its own DNS for external domains. It knows to resolve yahoo.com .
I put EXCH.local.domain in /etc/hosts and nslookup is working fine.

My problem is that I donâ t know how to configure sendmail to not try to resolve â yahoo.comâ locally
in HPJOHN server , as a host name , but just pass â bob.smith@yahoo.comâ as an email address to Exchange server which will know what to do with it.

I think is just a configuration in sendmail.cf ( not use DNS but pass all emails to EXCH.local.domain)
but I canâ t find it.

Thank you in advance to all who will try to help me.

Sorin Lupascu
Occasional Advisor

Re: sendmail configuration

sorry for the incovenience of the previous text!
Thank you to all who replied.
I tried all previous configurations but doesn't work so I'll try to be more precise.
I want to send all emails , with sendmail (8.9.3), from an HP server
(hpux11.11) named HPJOHN.local.domain ,
externally , through an Exchange Server named EXCH.local.domain :
HPJONH.local.domain -> #sendmail bob.smith@yahoo.com -> EXCH.local.domain - > Internet (yahoo.com)

Exchange is working properly and has its own DNS for external domains. It knows to resolve yahoo.com .
I put EXCH.local.domain in /etc/hosts and nslookup is working fine.

My problem is that I don't know how to configure sendmail to not try to resolve yahoo.com locally
in HPJOHN server , as a host name , but just pass bob.smith@yahoo.com as an email address to Exchange server which will know what to do with it.

I think is just a configuration in sendmail.cf ( not use DNS but pass all emails to EXCH.local.domain)
but I can't find it.

Thank you in advance to all who will try to help me.
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

vi sendmail.cf

change

DS

to

DS=EXCH.local.domain


/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

# That will send ALL mail to the server EXCH.local.domain

Diagnostic test after reconfiguration:

sendmail -v -d8.99 -d 38.99 someone@some.net

type some text

.


# Then

mailq

Your mail queue should be empty. If its not, check the exchange server. If you don't configure it explicity to accept mail relay from your HP-UX server your mail will never go anywhere.

This is essentially a slightly elaborated copy of my original reply. I've done it and it fully answers the question providing a solution in my opinion.

To configure exchange, you'll need to use the idiodic GUI that comes with that product. There are procedures available via the search engine at http://support.microsoft.com

SEP
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
Sorin Lupascu
Occasional Advisor

Re: sendmail configuration

SEP ,

When I try to send to someone@some.net sendmail try to resolve host name some.net
and doesn't pass the email to my exchange server (DS=EXCH.local.domain). It search MX records for some.net
May be DS configuration is not enough for may sendmail version 8.9.3?

Steven E. Protter
Exalted Contributor
Solution

Re: sendmail configuration

I think I messed up. Arrogance alert.

Try:

DSEX.EXCH.local.domain

or

DS
[EXCH.local.domain]

I think the equal sign is causing the problem.

Additional:

I believe that the DS has been in sendmail for a long time. I'm 99% sure that its available under 8.9

Trying a newer sendmail release is pretty trivial. There are two newer releases on http://software.hp.com

You restarted sendmail?

Try a real email address, perhaps a yahoo.com account you have.

If DS is correct sendmail should stop trying to resolve hosts.

SEP
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
Sorin Lupascu
Occasional Advisor

Re: sendmail configuration

thank you for your support SEP; things are going well now; kind regards!