Operating System - HP-UX
1829101 Members
2295 Online
109986 Solutions
New Discussion

problem with configuration of alerts to route to our mail server for relay

 
SOLVED
Go to solution
bunty.....
Frequent Advisor

problem with configuration of alerts to route to our mail server for relay

hi,
now I have SMTP mail services setup.
and my dba also have database tools that can generate alerts,
so i need to configure them to route to our mail server for relay.

(Example: As we use in windows proxy setting. and i have to give the IP address of proxy server & port no.)

i have that IP address & port no. but in HP-ux , in which file i have to make changes.

please suggest.
bunty
17 REPLIES 17
baiju_3
Esteemed Contributor
Solution

Re: problem with configuration of alerts to route to our mail server for relay

hi Bunty ,

/etc/mail/sendmail.cf and add

# "Smart" relay host (may be null)
DS YourMailServerName .

Also update /etc/hosts with IP and Hostname of the email server .

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

One suggestions , these topics are discussed million times in ITRC .Before posting just do a search in ITRC . I am sure you will get your answers from previous posts .


Regards,
BL-
Good things Just Got better (Plz,not stolen from advertisement -:) )
Rick Garland
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

The /etc/mail/sendmail.cf file

The SmartHost
DS=

Stop/start sendmail.

bunty.....
Frequent Advisor

Re: problem with configuration of alerts to route to our mail server for relay

where i have to define the port,
port is 25 for this
Jeff_Traigle
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

Port 25 is the standard SMTP port. No need to specify it anywhere.
--
Jeff Traigle
Ivan Ferreira
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

Use the solutions above to configure a SMART HOST, a server that will relay all your mail messages, but you cannot use proxy to the smtp protocol.

You should be able to contact directly your relay server (smart host), to test that use:

telnet relay_server 25

QUIT

If you can connect, then configure sendmail as described above. Ensure that your relay server is in the /etc/hosts file or in DNS.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: problem with configuration of alerts to route to our mail server for relay

Shalom bunty,

All this good stuff will come to nothing if you don't authorize relay for the hpux system on the system you want to relay.

All mail solutions now default to not allowing relay. The target server will have to be configured to allow relay.

To choose a target server:

Exchange servers can do it, but the admins always resist. I don't know why.

Firewall gateways are great, but only if they are properly patched. Otherwise they mail fail to send or even mangle the mail.

Diagnostic test:
sendmail -v -d8.99 -d38.99 alert@your.net

type some text

.


This will get you exact diagnostics and determine the exact cause and solution for any issues that come up.

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
bunty.....
Frequent Advisor

Re: problem with configuration of alerts to route to our mail server for relay

I am able to telnet mail server.

but this error while starting the sendmail service.

# /sbin/init.d/sendmail start
WARNING: local host name () is not qualified; fix $j in config file
/etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
sendmail
Deoncia Grayson_1
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

Put in your /etc/hosts file

the entry for the hostname of the server

ip hostname hostname.com

Now in your /etc/mail/sendmail.cf file

search for $j
make an entry like
add hostname.com to Dj$w

Dj$w.hostname.com

If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
bunty.....
Frequent Advisor

Re: problem with configuration of alerts to route to our mail server for relay

now i am getting this error:

# tail /var/adm/syslog/mail.log
Jan 18 12:55:17 dipper sendmail[11146]: alias database /etc/mail/aliases rebuilt by root
Jan 18 12:55:17 dipper sendmail[11146]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Jan 18 12:55:17 dipper sendmail[11148]: starting daemon (8.11.1): SMTP+queueing@00:30:00
Jan 18 12:55:33 dipper sendmail[11151]: k0IItXd11151: from=root, size=150, class=0, nrcpts=1, msgid=<200601181855.k0IItXd11151@dipper.infores.com>, relay=root@localhost
Jan 18 12:55:33 dipper sendmail[11153]: k0IItXd11151: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120150, relay=170.118.8.18, dsn=5.1.2, stat=Host unknown (Name server: 170.118.8.18: host not found)
Jan 18 12:55:33 dipper sendmail[11153]: k0IItXd11151: k0IItXc11153: DSN: Host unknown (Name server: 170.118.8.18: host not found)
Jan 18 12:55:33 dipper sendmail[11153]: k0IItXc11153: to=| /iri/sysadm/bin/myadmin , ctladdr=local-notification (1/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30123, dsn=5.3.0, stat=unknown mailer error 127
Jan 18 12:55:33 dipper sendmail[11153]: k0IItXc11153: k0IItXd11153: return to sender: unknown mailer error 127
Jan 18 12:55:33 dipper sendmail[11153]: k0IItXd11153: to=| /iri/sysadm/bin/myadmin , ctladdr=local-notification (1/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30223, dsn=5.3.0, stat=unknown mailer error 127
Jan 18 12:55:33 dipper sendmail[11153]: k0IItXc11153: Saved message in /var/tmp/dead.letter
Deoncia Grayson_1
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

edit /etc/mail/sendmail.cf

find the line starting with DS (if there is none, add a new line like this

DS(serverhostname)

save and exit.

you do not need to restart sendmail but if you want, you can stop and restart sendmail at this time

then test it by sending an email to yourself

If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Ivan Ferreira
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

You must use the hostname for the DS value, or [IP].

It seems that you don't used the host name or the host name cannot be resolved.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bunty.....
Frequent Advisor

Re: problem with configuration of alerts to route to our mail server for relay

Hi Buddy,
thanks for your support,
now i am able to send mails... :-)

I want to know one more thing,
if i want to send mail to many users, how can i do this?

now i am using only one address like:

#mailx -s "Subject" bunty@company.com

i need to send mails to 4-5 users together.
Deoncia Grayson_1
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

create a group in your alias file:

like so
cd /etc/mail

vi aliases
# Local Aliases
your group name here: abcd@domain.com, efgh@domain.com and so on

add the group name and all the corresponding email addresses that need to be notified
after you have finished adding the group, save and quit this file

then type newaliases at the command so the new
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Deoncia Grayson_1
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

before i got ahead of myself and clicked the submit button

type newaliases at the command line in order to rebuild the database for the mail aliases file and then you should be able to send an email to this group and it should send to everyone email address who was assigned to that group.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
bunty.....
Frequent Advisor

Re: problem with configuration of alerts to route to our mail server for relay

i dont require to create the group right now,
but right now i need to sendmail to different differnt users of different group.

may i use:
#mailx -s "Subject" bunty1@company.com,bunty2@company2.com,bunty3@company3.com


Ivan Ferreira
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

Yes, but separate the addresses by a space:

mailx -s "test" user1@domain user2@domain user3@domain
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Deoncia Grayson_1
Honored Contributor

Re: problem with configuration of alerts to route to our mail server for relay

#mailx -s "Subject" bunty1@company.com bunty2@company2.com bunty3@company3.com
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon