Link to home
Start Free TrialLog in
Avatar of agregory23
agregory23

asked on

Sendmail on RHEL being a relay to an MTA. How to queue mail?

I have a Sendmail (8.13.4) server running Symantec Brightmail Anti-Spam at the gateway.  It relays all mail to an Exchange 2003 server on the backend to user mail boxes.  Everthing works fine except for when I take the exchange server down for a reboot.  Is there a way to make it so that when I reboot the exchange server that the sendmail will queue mail on its end until the Exchage server comes back up?  Right now I think I am waiting on retries from the sending mail server.  I would like to queue them on my end if possible.

Thanks,

Alex
Avatar of jonesy2k
jonesy2k

That's how sendmail should be working.
If you run
mailq
does it list any messages in the queue?
you can flush the queue with
sendmail -q

or sendmail -q10 to make it retry every ten minutes.
Jonesy
If there is no bounce message sent to the sender, the message is almost certainly queued somewhere....
Maybe symantec has it's own queue?? read up on the documentation.
Jonesy
Avatar of agregory23

ASKER

Ok great thanks Jonesy2k.  The problem is that I might have to wait the timeout when testing for a bouce message.  I think it should be getting queued on the sendmail server.  Actually, when I look in my queue I see all of these entries.  Is this because its trying to send mail to root@localhost?  I see all these alias database unavailable errors:

<snippet>
j62BaVIR008879     6193 Sat Jul  2 04:36 MAILER-DAEMON
                 (alias database unavailable)
                                         postmaster
j62BaVIS008879     7724 Sat Jul  2 04:36 MAILER-DAEMON
                 (alias database unavailable)
                                         postmaster
j62B33YJ008071     2901 Sat Jul  2 04:03 <root@spooolnmail>
                 (host map: lookup (spooolnmail): deferred)
                                         <root@spooolnmail>
j61GaV4H016146     3370 Fri Jul  1 09:36 MAILER-DAEMON
                 (alias database unavailable)
                                         postmaster
j61FaVgV014905     3999 Fri Jul  1 08:36 MAILER-DAEMON
                 (alias database unavailable)
                                         postmaster
j61FaVgU014905     6072 Fri Jul  1 08:36 MAILER-DAEMON
                 (host map: lookup (spooolnmail): deferred)
                                         <root@spooolnmail>
j61BaVUx009803     1846 Fri Jul  1 04:36 MAILER-DAEMON
                 (host map: lookup (spooolnmail): deferred)
                                         <root@spooolnmail>
j61BaVV2009803     2475 Fri Jul  1 04:36 MAILER-DAEMON
                 (host map: lookup (spooolnmail): deferred)
                                         <root@spooolnmail>
j61BaVV0009803     6121 Fri Jul  1 04:36 MAILER-DAEMON
                 (alias database unavailable)
                                         postmaster
j61BaVV1009803     7652 Fri Jul  1 04:36 MAILER-DAEMON
                 (alias database unavailable)
                                         postmaster
j61B354v008882     4350 Fri Jul  1 04:03 <root@spooolnmail>
                 (host map: lookup (spooolnmail): deferred)
                                         <root@spooolnmail>
                Total requests: 35
[root@spooolnmail root]#

</snippet>

Thanks,

Alex
ASKER CERTIFIED SOLUTION
Avatar of jonesy2k
jonesy2k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
#1 is fine - Resolves to 127.0.0.1.

#2 - For some reason my aliases file was in /etc rather than /etc/mail/ which is where the other configs are.  I ran /usr/bin/newaliases and it complained it could not find the file.  Copied it to /etc/mail and then ran newaliases again and got this one (which relates to #1)

WARNING: local host name (spooolnmail) is not qualified; see cf/README: WHO AM I?

This seems pretty easy to fix.  I will just have to do some playing around with DNS and local resolution.  Thanks for all your help Jonesy2k.  I really appreciate it.
No problem, glad you've got it sorted :)
Few things that were out of order:

Set /etc/hosts so that the hostname was the FQDN
Then set the /etc/sysconfig/network NETWORK= to the FQDN
Then set it at the kernel level using echo mybox.mydomain.com > /proc/sys/kernel/hostname (to save a restart)

That makes it so that when I do a "uname -n" or telnet to the SMTP port that it has the FQDN in the header.  That and when I stop/start the service its quick now.  It took a minute or so before but since I had not ever ran sendmail, thought that was how it was.  Thanks again Jonesy.  I am set to go!

Alex