1848540 Members
8956 Online
104033 Solutions
New Discussion

Re: Sendmail config

 
Brian Willis
Advisor

Sendmail config

I've managed to install Sendmail 8.13.3 - Revision 2.001 on my HP-UX machine. It's config seems fine and working. I have it relaying mail for all my other machines so they don't have to run Sendmail as a deamon.

Most of the other machines are running Redhat and using sendmail 8.12.11. They all use a submit.cf for sending mail out using the MSA. Sendmail has to be running for it to deliver mail to mailboxes outside the machine or to local accounts. I tweaked the submit.mc from this:
FEATURE(`msp', `[127.0.0.1]')dnl
to this:
FEATURE(`msp', `[relay-host-name]')dnl
(where relay-host-name is the host name of the HP-UX machine that is relaying mail for the subnet)
Then recreate the submit.cf.
This allows any invocation of sendmail to relay via my relay host. This works fine for mail bound for an outside host, but also relays mail that is for local delivery.

Is there anyway to configure sendmail to relay mail for outbound but still deliver local mail without running as a daemon?
2 REPLIES 2
Kofi ARTHIABAH
Honored Contributor

Re: Sendmail config

You can configure the local mail to be delivered without going to the relay by creating the /etc/mail/local-host-names on the RH machines and inserting the hostname.

Whenever a mail is created on you RH box, and sent, an attempt will be made to deliver it immediately. If it is unsuccessful, the mail will sit in the mail queue (thats why running as a deamon is useful because then it wakes up every now and again and tries to deliver the mail). In the absence of this, you would have to set up a cron job that invokes sendmail -q to clear the queue of each of the hosts.

Good Luck
nothing wrong with me that a few lines of code cannot fix!
Brian Willis
Advisor

Re: Sendmail config

That doesn't seem to work. I think that only works if the message makes it into the MTA. Since I've changed the MSA, it tries to relay through the machine I specified. I don't think it ever sees the local-host-names. When I envoke sendmail, it sends to the relay host. If I set it back to localhost, the message just sits in the client mailq. The message won't leave when I type sendmail -q or sendmail -Ac -q.