Operating System - HP-UX
1833758 Members
2204 Online
110063 Solutions
New Discussion

Forward e-mail to MS-Exchange

 
SOLVED
Go to solution
Wessel Baptist
Advisor

Forward e-mail to MS-Exchange

Is it possible to forward e-mail from an HP9000 to MS-Exchange 5.5 on a NT-server.
If it is, what must I do?
Many thanks for your help.
logics take you from A to B, imagination takes you anywhere
9 REPLIES 9
Douglas Cromby_1
Valued Contributor

Re: Forward e-mail to MS-Exchange

There are a number of ways to achieve this. You can just address a message from elm or mailx to the address on the Exchange server. A useful way to see what is going on is to used sendmail -v on the command line as follows:

sendmail -v abc@hostname.com
test
.

The Exchange server will need to have it's Internet Mail Service configured and the service running to receive the messages.

You set up sendmail to act as a mail relay to send your messages to the Exchange server. You need to change the /etc/mail/sendmail.cf file for this. There is a line starting DS, to which you must append the hostname of the Exchange server eg:

DShostname

Then stop and start sendmail as follows:

To stop: killsm

To start go to /sbin/init.d and type:

./sendmail start

CHRIS_ANORUO
Honored Contributor

Re: Forward e-mail to MS-Exchange

Do a search (search is to the top left of the screen)on the forum with "sendmail" as the keyword. You will get lots of information on how to setup sendmail.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Douglas Cromby_1
Valued Contributor

Re: Forward e-mail to MS-Exchange

To set up a permanent forward to Exchange for a given user, you can create a .forward file.

In /user/user_name, create a file called .forward. In this file add a line which is the Exchange address you need to forward to eg abc@hostname.com. The address can be seen in the Exchange administrator under Recipients, Email addresses tab. DNS or a hostfile will be required for it to find it's way there.
Kofi ARTHIABAH
Honored Contributor

Re: Forward e-mail to MS-Exchange

W.J:

Yes it is possible to forward mails from an HPUX server to an NT exchange server. As a matter of fact there have been a number of threads in this regard. You could use the search facility of the forums to find them... but to get you started :

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x535e7e990647d4118fee0090279cd0f9,00.html

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xfe4e49c5ae73d4118fef0090279cd0f9!0,00.html

0. Include an entry in your /etc/hosts file for your exchange server:
#echo "XXX.YYY.ZZZ.AAA exch exch.yourdomain.com" >> /etc/hosts
1. Include an entry in your /etc/nsswitch.conf file :
#echo "hosts: files [NOTFOUND=continue] dns" >> /etc/nsswitch.conf
(this tells the system that if it does not find a host in the files, it should use dns)

2. on the HPUX box, edit the /etc/mail/sendmail.cf file and look for the line that with DS and change it to:
DSexch.yourdomain.com
(where exch.yourdomain.com is the name of your exchange server)

after the changes, now you have to restart sendmail with :

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

now try and send a message....

#mailx -s "Test message" user@exch.domain.com < /etc/hosts

examine your /var/adm/syslog/mail.log file for a message indicating that your message has been relayed to the exchange server....

done!
PS. Let's know how it turns out.


nothing wrong with me that a few lines of code cannot fix!
Wessel Baptist
Advisor

Re: Forward e-mail to MS-Exchange

Hi Kofi,

Thanks for your. After applying your suggestions I've got the message:

abc@xyz.com... Deferred: Name server: xyz: host name lookup failure
logics take you from A to B, imagination takes you anywhere
Douglas Cromby_1
Valued Contributor
Solution

Re: Forward e-mail to MS-Exchange

If you are not using DNS then your /etc/nsswitch.conf entry for hosts should be:

hosts: files
Wessel Baptist
Advisor

Re: Forward e-mail to MS-Exchange

Hi Douglas,

your suggestion was the final step to help me.

Thank you all for your help.
By
Wessel.
logics take you from A to B, imagination takes you anywhere
Kofi ARTHIABAH
Honored Contributor

Re: Forward e-mail to MS-Exchange

By the way if you are ever going to be using DNS remember to setup your /etc/resolv.conf properly to point to your dns servers
#echo "domain yourdomain.com" >> /etc/resolv.conf
#echo "nameserver aaa.bbb.ccc.ddd # first nameserver" >> /etc/resolv.conf
#echo "nameserver eee.fff.ggg.hhh # second nameserver" >> /etc/resolv.conf
#echo "nameserver iii.jjj.kkk.lll # third nameserver" >> /etc/resolv.conf

nothing wrong with me that a few lines of code cannot fix!
Matt Livingston
Valued Contributor

Re: Forward e-mail to MS-Exchange

One thing you may need to do if sending mail from the mailx utility (from a script or from the command line) is specify on the commandline a return address that is known to the exchange server.

e.g.

$ mailx -s "test mail" -r known.user@your.exchange.server otheruser@recipients.mailhost