Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configure sendmail 3

Status
Not open for further replies.

aix43

Technical User
Apr 20, 2001
26
0
0
SA
Hi,

I need to configure send mail to be able forward an email to exchange server.

Can anybody tell me how to to that ?

Thank in advance
Gofur, MCSE,MCDBA
 
Gofur,

I have written a document on how to do this pasted below:


- Ensure that ‘sendmail’ is running on the system:

Run both commands:

lssrc –s sendmail

ps –ef |grep sendmail

- If ‘sendmail’ is not running start via:

startsrc -s sendmail -a "-bd -q30m"

- Ensure that ‘sendmail’ is running:

ps –ef |grep sendmail

This should echo:

root 5704 1 0 11:08:42 - 0:00 sendmail: accepting connections on port 25

- Ensure that the ‘sendmail’ daemon is started on reboot, comment in the ‘sendmail’ startup line in ‘/etc/rc.tcpip’

vi /etc/rc.tcpip

Comment in the following line:

start /usr/lib/sendmail "$src_running" "-bd -q${qpi}"

- 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 the ‘/etc/hosts’ file the IP address and hostname of the Exchange server. If you wish to check the hostname of the server use telnet to connect to port 25 of the server:

telnet <IP address of Exchange server> 25

N.B. Type: quit to close the session

Add the IP and hostname into ‘/etc/hosts’:

vi /etc/hosts

- Copy away the original ‘/etc/sendmail.cf’ file

cp /etc/sendmail.cf /etc/sendmail.cf.orig

- Edit the ‘/etc/sendmail.cf’ and make the following changes:

Vi /etc/sendmail.cf

Change:

#DwYourHostName

To:

Dw<hostname of machine>

Change:

# &quot;Smart&quot; 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:

# &quot;Smart&quot; 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<hostname of Exchange Server>

Save the file.

- Refresh the ‘sendmail’ daemon to pick up the new changes to the ‘/etc/sendmail.cf’ file

refresh –s sendmail

It will take a few minutes for the ‘ps’ process to return:

root 5704 1 0 11:08:42 - 0:00 sendmail: accepting connections on port 25

In the interim period the following will be displayed via ‘ps’:

root 5704 1 0 11:08:42 - 0:00 /usr/lib/sendmail –bd –q30

- Now test the handshaking between the server and the Exchange server:

echo “test” |sendmail –v paulsd@domain.com

Hope that helps

Cheers





PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
PSD,

great timing. This is something I've been beating my head against the wall for for the last few days. Your directions actually got me closer but I still fail.

I after doing everything you said I still get an error that the route to remote host is not available.

During the verbose commands I can see it's attempting to connect to 25.tcp and then 25 (tcp) and then deferred with the above error message.

Any suggestions as to how to fix.

Thanx.
 
Gamesman,

o.k. so you are getting an error, what is the error I cannot see it in your last mail?

Can you telnet to port 25 of the mail server:

telnet <IP of mail server> 25

Does this let you connect? If it does post the verbose output from the sendmail command....

Cheers PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
To solve this problem, I had to add the IP address of the exchange server to the hosts file with the host name of the domain that I was sending to. This is ok if you are only emailing out to one or two domains.

Whether this is the correct way to do it I couldn't say, other than it works for what I want.

E.g.

10.10.10.1 mailserver destination.co.uk

Hope that helps...
 
Actually I took off the port and it's working like a champ. Thanks so very much.

Star for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top