Operating System - HP-UX
1829113 Members
10420 Online
109986 Solutions
New Discussion

Advice on sendmail configuration is needed

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

Advice on sendmail configuration is needed

Hi,

This message may be posted in comp.mail.sendmail, but this forum provides better feedback also on this topic :-).

1. I'd like to forward mail from plenty of HP-UX boxes (e.g. root mail) to a single server by means of '.forward' files. The problem is the simpliest and the safest mail configuration on these dumb 'e-mail generators'. Is it possible not to run sendmail in daemon mode listening to port 25? Of course, sendmail should process mail queue periodically.

If listening to port 25 is 'the must', is it possible to listen only to loopback address? Yes, I know sendmail can be configured to take mail only from restricted addresses.

2. I do not run name services on these dumb hosts.
The only way I found for forcing sendmail to use /etc/hosts instead of DNS is creation of /etc/nsswitch.conf. Is it possible to configure it in another way? As far as I know, sendmail ignores /etc/mail/service.switch under HP-UX.

Thanks in advance for your comments!

BR,
Mihails
KISS - Keep It Simple Stupid
3 REPLIES 3
Jeff Schussele
Honored Contributor
Solution

Re: Advice on sendmail configuration is needed

Hi Mihails,

1) Yes - you can place the sendmail -q command in a crontab file & have it execute on whatever schedule you desire. It will only process the queue. You don't have to run sendmail as a daemon

2) AFAIK, setting up the nsswitch.conf to use files is the only way, but I'm not positive.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Shannon Petry
Honored Contributor

Re: Advice on sendmail configuration is needed

Port 25 is not an issue. It is harder to get SMP to work on a different port! This is kind of like saying I need DNS to work off of port53, or http traffic to move on port 80. (Default stuff).

Sendmail can work fine without DNS unless you are sending out to external networks. Sounds like you just want one mail server in your shop to gather all mail.

REQUIRED for LOCAL MAIL
1. known hosts/ip's (update /etc/hosts is enough)
2. known users (mail will be rejected for unknown users. you may want to implement NIS/NIS+ if not done already. This will fix the hosts problem too)
3. Disk space in /var/mail
4. modify /etc/mail/sendmail.cw
5. modify /etc/mail/relay-hosts if it exists
6. Client side mail access protocol server (POP/IMAP).
7. all HP clients should have the file /etc/rc.config.d/mailsvrs changed to reflect the mailhost!

* both QPOP and Washington University IMAP are free, easy to configure and work very well.

Regards,
Shannon
Microsoft. When do you want a virus today?
Mihails Nikitins
Super Advisor

Re: Advice on sendmail configuration is needed

Thanks for your replies!

I want to keep copy of mail in local mailboxes, so the variant of forwarding all local mail is not the best for my case.

I have chosen not to run 'sendmail -q' from crontab, but put a command in startup scripts like
'/usr/sbin/sendmail -q60s'
instead of original
'/usr/sbin/sendmail -bd -q30m '

As a result, sendmail process mailqueue regularly and doesn't listen to incoming connections.

My way to do it is in modifying /sbin/init.d/sendmail
because it's impossible to set
parameters in /etc/rc.config.d/mailsrvs
Surely, I know that it's not good to modify generic scripts. Unfortunately, config files allow configuring either full mail server or dumb forwarder.

BR,
Mihails




KISS - Keep It Simple Stupid