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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configure sendmail 5

Status
Not open for further replies.

LeDam

IS-IT--Management
Oct 10, 2001
210
BE
I want to configure sendmail. I want to send mail from AIX to a lotus notes client. The lotus notes server is running on a NT station.
Can somebody help me .... with details because i try to modify some line of my sendmail.cf and that doesn't work.
Thanks for all!!
PS i'm using DNS
 
You should just be able to specify your notes server as a relay host. Our setup is similar to yours - our Notes Mail server is called 'firestarter'. In /etc/sendmail.cf we have an entry as follows:

DSsmtp:firestarter

This should work ( assuming you want to use smtp as your mail protocol ).
 
LeDam,

Here is how I have set up sendmail to a notes server - it takes you step by step:

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,bind4

- 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 Lotus Notes 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 Lotus Notes 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 local server>

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 Lotus Notes 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

- If there is only one recipient per mail the configuration is complete, test via:

echo “test” |sendmail –v <email address of recipient>

i.e.

echo “test” |sendmail –v paulsharpe-deacon@hsbc.com

N.B. Any non local mail is sent to the relayhost i.e. the notes server for processing.

- If there is more than one recipient per mail, configure a ‘sendmail’ alias:

- Configure the ‘/etc/aliases’ file with the e-mail addresses of all recipients of the e-mail:

vi /etc/aliases

TEST:paul@hsbc.com,steve@hsbc.com

- Get the ‘sendmail’ daemon to re-read the ‘/etc/aliases’ file:

sendmail –bi

- Now test the handshaking between the server and the Lotus Notes server:

echo “test” |sendmail –v <alias name>@<hostname of local machine>

i.e.

echo “test” |sendmail –v TEST@notesserver

PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
Would these steps be pretty much the same if you are trying to get to a Microsoft Exchange server????
 
redwings,

Well it should work but specific instructions on doing this are as follows:

Add in the Exchange servers hostname and IP address to /etc/hosts:

199.92.146.55 NTMAILBOX

Create an /etc/netsvc.conf file:

hosts=local

In sendmail.cf:

Change:

Dwyourhostname to Dwlocalhost

N.B. ensure that localhost exists in /etc/hosts

Make sure Cw is as follows and is commented in:

Cwlocalhost $w $?m$w.$m$.

Quick test for handshaking:

mail -sthis_is_a_test @NTMAILBOX:paul.sharpe@test.com < /etc/motd

That is it use the format above to send mails.


Hope that helps

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

Can you help me out agian. I am trying to get the mail to send any messages sent to root to go to myself and one other person. I am unsure where to add a group and how to set it up to do that automatically, can you help me out?
 
redwings,

You can set up a mail alias as follows:

vi /etc/aliases

Add to the bottom:

root:root,<your user name>,<other user name>

save the file

Re-read the aliases file:

sendmail -bi

Run a test mail :

mail root
subject
body
cntrl-d

You should now have 3 copies of the mail to root one in each users mailbox.

Cheers

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

Let me start off by saying thanks for the help on this sendmail. Question: Are the aliases that we input in the /etc/aliases supposed to be user logons? What i need it to do is send the messages to root and to two Outlook mailboxes going through a Microsoft Exchange server. Is there an easy way to do that?

Redwings
AIX/TSM/PDM Admin
 
redwings,

the aliases can be either user logons or external e-mail address so just use my previous instructions and just add any other external e-mail addresses to the end of the line i.e.:

root:paul,john,paul@test.com

Then run :

sendmail -bi

and test.

I assume that you have set upo sendmail now and get e-mails through Outlook?

Cheers

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

Thank you. I have finally gotten it to work the way I wanted too. Thanks for all the help.
 
I have another problem.... It send the mail to notes server.... Your domain is LBK.BE
When we try to send a mail to ANYONE@LBK.BE, it send the mail to ANYONE@LBK.BE.LBK.BE
I think i should comment a line in sendmail.cf??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top