Operating System - HP-UX
1831618 Members
2063 Online
110027 Solutions
New Discussion

Re: email and sendmail help

 
SOLVED
Go to solution
mcater
Advisor

email and sendmail help

Hi,
I want to send emails from my hpux 11.00 server to certain users.
So email would go from hp server, to companies windows email server, to users.
What settings do i need to make in the hp server to be able to send emails?
13 REPLIES 13
Muthukumar_5
Honored Contributor
Solution

Re: email and sendmail help

sendmail has to run to send mails initially.

# ps -ef | grep sendmail
root 1026 1 0 Sep 20 ? 0:51 sendmail: accepting connections on port 25

Try as,

# echo "hi" | mailx -s "test" root@localhost
# mail

It will give recent mail to you.

To other machines you have to have reachablity to that machine.

# echo "hi" | mailx -s "test" root@machine1.domainname.com

It will work. You can as well as use sendmail instead of mailx command.

hth.
Easy to suggest when don't know about the problem!
Gavin Clarke
Trusted Contributor

Re: email and sendmail help

One way is to set the DS entry in /etc/mail/sendmail.cf

Then stop and start sendmail to pick up the change.

This forum post gives more detail:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=951776
Arunvijai_4
Honored Contributor

Re: email and sendmail help

Your server need to be in primary domain and sendmail should be configured properly.

# /sbin/init.d/sendmail start

# ps -ef|grep sendmail
check to confirm daemon now appears

# mailq

to check mail queue
# sendmail -v
test settings.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
mcater
Advisor

Re: email and sendmail help

thanks to everyone, didnt realise how easy it was - i thought there would be more to it.

It is working, however i get this following message each time i use mailx:
Switch map aliases: unknown member map aliases.dns: Socket operation on non-socket

any ideas how to fix/stop it?
Arunvijai_4
Honored Contributor

Re: email and sendmail help

Look at the docs here,

http://docs.hp.com/en/B3782-90728/ch07s06.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Gavin Clarke
Trusted Contributor

Re: email and sendmail help

It can get more complicated if you want. If you want to send outside your network you might need to allow relaying for your HPUX host on your exchange (windows mail) server.

As for that message I can't say I've seen it before, looks like a dns problem perhaps? I will add more as and when I find out.
Gavin Clarke
Trusted Contributor

Re: email and sendmail help

Here is a post I picked up from a search, it might have your answer:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=900918
Muthukumar_5
Honored Contributor

Re: email and sendmail help

I feel the problem is with /etc/mail/sendmail.cf configuration file.

Set:
O QueueDirectory=/var/spool/mqueue

Try to restart it as,

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

hth.
Easy to suggest when don't know about the problem!
Gavin Clarke
Trusted Contributor

Re: email and sendmail help

This post seems to cover the steps to configure sendmail quite comprehensively. I like SEP's answer.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=610438

I think I would be tempted to look at my /etc/hosts (to add the exchange server IP and full name).
Then see what /etc/nsswitch.conf (putting the hosts entry to look at files first) and then see what resolv.conf looked like.
mcater
Advisor

Re: email and sendmail help

O QueueDirectory=/var/spool/mqueue

is already in sendmail.cf
Gavin Clarke
Trusted Contributor

Re: email and sendmail help

Here are examples of /etc/resolv.conf and /etc/nsswitch.conf that work for us:

/etc/nsswitch.conf

#
# /etc/nsswitch.files:
#
# @(#)B.11.11_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files

/etc/resolv.conf
domain ????.com
nameserver IPofDNSserver
nameserver IPofDNSserver

I suspect that it is the /etc/aliases file that may contain your problem. Although this is only a guess.
Muthukumar_5
Honored Contributor

Re: email and sendmail help

what is there in /etc/mail/service.switch for aliases.

I hope it will be like,

aliases dns files or bind

remove except files and put it as,

aliases files

# Restart sendmail with this.

hth.
Easy to suggest when don't know about the problem!
mcater
Advisor

Re: email and sendmail help

the /etc/mail/service.switch
has:
#hosts dns files
aliases files

i commented out the hosts and restarted sendmail but still get same error.
the /etc/aliases appears as default.

i have checked resolv.conf and nsswitch.conf and all appears ok.

we use dns here.