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
agregory23Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jonesy2kCommented:
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
jonesy2kCommented:
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
agregory23Author Commented:
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
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

jonesy2kCommented:
There are probably a couple of issues here:
1. It looks like your machine cannot resolve spoolnmail (which I assume is your machine). You'll need to fix that in /etc/hosts
2. It also looks like your alias table is not working properly. make sure that /etc/sendmail/aliases exists and run 'make' in the /etc/sendmail directory to build the lookup tables.
Hope that helps,
Jonesy

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
agregory23Author Commented:
#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.
jonesy2kCommented:
No problem, glad you've got it sorted :)
agregory23Author Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.