sendmail issue: multiple mailqueues - load balancer

Hi All,

If someone can send me a very informative link that can help me to underdstand the following with examples

1 . sendmail logs (/var/log/maillog)
2 . mailq
3 . how to check the deffered mails?
4 . how to check the rejected emails?
5 . how to resend the deferred and rejected emails?
6 . how can we count how many emails went successful / rejected / deferred in a day?
7 . how can we set and manage the multiple mailqs?
8 . understand /var/mail/mqueue (enteries starting with qf/df/Qf/tf )
9 . understand /var/mail/clientmqueue
10. shared mail server? (load balancer)

I am crazy to learn sendmail fully as in the new office sendmail is being used which i never used :-(
I will really appreciate if someone can help me to sort out these issues.

Many thanks.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

If you're new to sendmail and really want to learn everything about how it works, I'd suggest you buy a book and read it. However many of your questions are pretty simple to answer:

1. the logs show all mail traffic (in and out) and most information about the message. You'll see the date, the message id, the process id handling the mail, the To addr, the From addr, the size, the number of recipients, and the relay, which is just the server that submitted the mail if it's an incoming msg or the server that accepted it if it's an outgoing message. Keep in mind there will be multiple log entries for each message, and they can overlap each other, so look at the message id to keep track of which log entries go together or relate to the same mail.

2. mailq simply shows you what is currently in the queue. If the message has been deferred or tempfailed, it'll list the reason in between the sender and the recipient.

3. Use mailq to check deferred mail. They'll have "(Deferred:" listed in the reason.

4. Really the only way to check on rejected msgs is to look in the /var/log/maillog file. Do a search for the term "reject" or search for status codes in the 500s (5.[0-9].[0-9]). 500s are permanent failures, 400s are temporary failures and will be retried.

5. To force the queue runner, type "sendmail -q", but they'll be resent automatically, but you can force it that way. You can't resent rejected mail, the server discards it. Only the original sender can resend, but chances are, it's going to get rejected again.

6. Use the mailstats program to keep counts. It tells you the number of messages to, from, rejected, discarded, in the queue and the total bytes in and out. Write a shell script to run from a cron job to parse the output of mailstats to build a db of daily stats.

7. This should give you an idea about multiple queues:

8. qf files are the headers, df files are the msg bodies. There should be two files (1 qf and 1 df) for each message in the queue.

9. First, mail gets dumped into the mqueue folder for processing. If it isn't delivered promptly it gets moved to the clientmqueue folder for later retries afaik.

10. I'm not quite sure what you're asking on this one, but for load balancing basically you just need multiple sendmail boxes all listed as MX records (with the same priority) or just using roundrobin dns (1 name points to multiple IPs). If you want all the servers to share a common queue or mailbox folder, you'll have to map that location from yet another shared server using NFS or CIFS .

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
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
Email Servers

From novice to tech pro — start learning today.