1834189 Members
2744 Online
110064 Solutions
New Discussion

Re: Sendmail

 
Dave Elliott
Frequent Advisor

Sendmail

Hi guys
I am trying to get sendmail working, i can achieve this if my machine only uses /etc/Hosts. but if i try to to configure this machine to work the way all my other servers work sendmail fails to find mail server.
We normally have the system set to look at the host file first then if not found there DNS, talking to a NT PDC.
i can see the mail server using the current set up.
but sendmail just refuses to see it.
i am using HPUX 11.00.
has anyone had a similar problem in the past.
regards
andy
Oracle DBA
6 REPLIES 6
Ian Dennison_1
Honored Contributor

Re: Sendmail

What does /etc/resolv.conf look like?

sendmail.cf - what is the DS variable, and the Dj variable?

Share and Enjoy! Ian
Building a dumber user
Steven E. Protter
Exalted Contributor

Re: Sendmail

I had similar issues when I first tried to get mail off my boxes.

I had to change /etc/nsswitch.conf to DNS,files in order to make things work right.

Thats a more standardized or friendly way of dealing with the network or so our network people told me.

There are a lot of Windows based mail relay servers that have problems relaying mail from HP-UX. Push those administrators to stay current on bug fixes. I once had project delay four months becaue the relay server was rejecting mail. I spent days messing with a email attachment script while the relay server admin says nothing was wrong.

After lots of politics, he put in a general bug fix and wala, my mail went through with the original script, written 4 months ago.

I also had to set up a DNS server because our network people decided to change our internal domain name.

I don't think you need to to the nsswitch change, but if there is a dns server available, its probably a pretty good idea.

It will cause omniback 3.x problems and will totoally break openspool, if you still use it.

If you don't want to set the Dj variable in sendmail.cf you can make your hostname fully qualified.

/etc/rc.config.d/netconf

Change your hostname to hostname.yourdomain.com

Here is a good diagnostic command for sendmail, lots of nice data and it can be redirected to a file. Just run the commandline to a valid email addy, type in a one line message, then period then enter.

/usr/sbin/sendmail -v -d8.99 -d38.992 helpdesk@yourdomain.com
P
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
Chuck J
Valued Contributor

Re: Sendmail

You shouldn't need to configure /etc/nsswitch.conf

Make sure

* /etc/rc.config.d/netconf is correct with IP, name, default gateway & subnet mask

* /etc/resolv.conf has the correct info e.g:
domain yourdomain.com
nameserver x.x.x.x

Also make sure your full domain name (hostname in the /etc/rc.config.d/netconf and the domain in /etc/resolv.conf) is configured on the nameserver as specified in /etc/resolv.conf

Then, the default sendmail should work fine.

Chuck J
Jose Mosquera
Honored Contributor

Re: Sendmail

Hi,

If you are using a Relay server you need set DS definition into /etc/mail/sendmail.cf, i.e:
DS

Where must be a resolute name.

Also you can try setting your "official domain name", i.e:
Dj

After any change in /etc/mail/sendmail.cf you must restart sendmail service, these commands allow you stop|start sendmail service:

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

You can check your pending mail queue by the comand: "mailq -v". All mails queued are in /var/spool/mqueue. Each email have 2 files, one is mail header and other is data

Remember always that sendmail variable must be set to 1, in /etc/rc.config./mailservers file.

Rgds.
Dave Elliott
Frequent Advisor

Re: Sendmail

Thanks for the answers guys, i have assigned pionts for you but have been unable to try the suggestions yet, i have just been nailed with another priority problem, sendmail has to go on back burner til monday, as i am off thursday and friday.(lucky me)
i will action pionts kindly supplied first thing monday, any body else that may have some thoughts, great.
regards
andy
Oracle DBA
Dave Elliott
Frequent Advisor

Re: Sendmail

Hi guys
i eventually have got round to trying the sendmail problem and have got this error when i try to run it.( it looks at hosts file first then dns, which it seems to be doing)># rew.@company name.co.uk good morning <
seq_map_parse(aliases.files, )
map_init(sequence:aliases.files, NULL, 0)
sequence:aliases.files NULL: valid
map_init(implicit:Alias0, /etc/mail/aliases, 0)
wrong pass (pass = 0, rebuildable = 1)
map_init(host:host, NULL, 0)
host:host NULL: valid
map_init(switch:aliases, aliases, 0)
switch_map_open(aliases, aliases, 0)
switch_map_find => 1
files
map_stack[0] = sequence:aliases.files
switch:aliases aliases: valid
map_init(dequote:dequote, NULL, 0)
dequote:dequote NULL: valid
map_init(sequence:aliases.files, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(implicit:Alias0, /etc/mail/aliases, 1)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
implicit:Alias0 /etc/mail/aliases: valid
map_init(host:host, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(switch:aliases, aliases, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(dequote:dequote, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
getcanonname(company name.co.uk), trying files
text_getcanonname(company name.co.uk)
getcanonname(company name.co.uk), trying dns
dns_getcanonname(company name.co.uk, trymx=1)
dns_getcanonname: trying company name.co.uk. (ANY)
;; res_querydomain(company name.co.uk, , 1, 255)
;; res_query(company name.co.uk., 1, 255)
;; Querying server (# 1) address = 10.132.192.6
;; Querying server (# 1) address = 10.132.192.6
;; Querying server (# 1) address = 10.132.192.6
;; Querying server (# 1) address = 10.132.192.6
closemaps: closing aliases.files (NULL)
closemaps: closing Alias0 (/etc/mail/aliases)
impl_map_close(Alias0, /etc/mail/aliases, 12a3)
db_map_close(Alias0, /etc/mail/aliases, 12a3)
closemaps: closing host (NULL)
closemaps: closing aliases (aliases)
closemaps: closing dequote (NULL)


Any ideas.

andy
Oracle DBA