1833568 Members
3558 Online
110061 Solutions
New Discussion

Send mail hold-up

 
Clair D. Bittner
Frequent Advisor

Send mail hold-up

I am sending from my H.P. box through send mail. The first mail goes through without a hitch but the next one and subsequent ones may take anywhere from 5 minutes to 2 hours depending on how many may follow. Does anyone know if there is a specific way to tell if it is on the H.P. side or the mail server??
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Send mail hold-up

On your HP box, issue this command:

sendmail -bp

This will indicate if the mail is still in the local queue.

You can also examine, /var/adm/syslog/mail.log for possible problems.
If it ain't broke, I can fix that.
Uday_S_Ankolekar
Honored Contributor

Re: Send mail hold-up


sendmail -qtime would process queued messages at given interval.

sendmail -q0 will flush all the mails.

-USA..

Good Luck..
W.C. Epperson
Trusted Contributor

Re: Send mail hold-up

Start with the mail log, as previously noted. In particular, look for lines containing "to=" and either "stat=Deferred" or "stat=Sent". The "stat=Deferred" lines should contain a reference to the reason that the relay to the mail server was delayed. And/or the "stat=Sent" may offer a clue in the "delay=" field. If the delay is minimal, then the hold up is on the mailserver. If there's a significant delay, and no "stat=Deferred" lines for the same message id, the hold-up is on your box--you may have a long mail sweep interval set.
"I have great faith in fools; self-confidence, my friends call it." --Poe
Clair D. Bittner
Frequent Advisor

Re: Send mail hold-up

I appreciate all of the responses. It has been helpful. I still have one question on the command sendmail -q0. Does it flush the queue or try to again re-send these e-mails??? If it tries to re-send, is there a way to just delete the e-mails left in queue???
Fred Martin_1
Valued Contributor

Re: Send mail hold-up

If you do a search for "mailq" in this forum I think you'll find answers to your questions, in other threads.

I've discovered at my site, sometimes it's suprising why mail ends up in the queue. We discovered that DNS was failing, and that caused sendmail to defer mail until later when it would try again to resolve a name.

In your sendmail.cf file, crank up the loglevel to something like 11 for a time and watch it, you may get some clues as to what the problem is, in mail.log.

Also, I think the queue itself may tell you the reason why mail has been deferred. Do a "mailq -v" when there's stuff in there.

Flushing the queue does not delete email, but attempts to deliver on demand, as far as I know.

To delete mail in the queue, just delete the files in /var/spool/mqueue - careful though if you are trying to delete a single email from the queue, as there is more than one file in there for each email.

And, of course, if you delete files in the queue, the sender may never know that the email was not delivered.
fmartin@applicatorssales.com
Sergejs Svitnevs
Honored Contributor

Re: Send mail hold-up

"sendmail -q0" is a way to force a queue run with sendmail.

if you want to delete the sendmail mail queue, then:
a) stop sendmail.
b) Delete all files in the directory you have specified as "QueueDirectory" in /etc/mail/sendmail.cf.

Regards,
Sergejs
W.C. Epperson
Trusted Contributor

Re: Send mail hold-up

WHOA!

It's not unheard of to have other files in the queue directory! Just remove all df*, qf*, and xf* files.
"I have great faith in fools; self-confidence, my friends call it." --Poe