Subject: Re: mail queue
To: xiamin <ingerrn@cris.com>
From: Charles Lepple <clepple@foo.org>
List: netbsd-users
Date: 04/11/1997 23:10:30
In message <Pine.BSD.3.91.970411224214.1570E-100000@localhost>, xiamin 
writes:
>i have a rather long mail queue, all of which is deferred, mostly because 
>some stupied aol server refused my connection, a sample:
>                Mail Queue (13 requests)
>--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
-
>UAA05422       63 Mon Apr  7 20:34 ingerrn
>                 (Deferred: Connection refused by a.mr.aol.com.)
>                                   pidgeongrl@aol.com
>

Here at foo.org we run sendmail in queue-only mode:

=== sendmail.cf ===
# default delivery mode
O DeliveryMode=q
===

and we have a queue-running process every 30 seconds:

sendmail -q30s

which means that mail gets delayed up to 30 seconds before it is sent, but 
better performance is achieved in the case of multiple messages to the 
same host. Sendmail (at least really recent versions; dunno about the 
default NetBSD version) optimizes these things when it batches up things 
during a queue run.

This can really bring stuff down if you have a flaky connection, so I'd 
only change the delivery mode if you have lots of alternative MX hosts for 
the address you're sending to (like aol.com, which has 7 MX servers). 
Otherwise, you could make sendmail reprocess the queue every, say, two 
hours. The argument to -q is a number and s, m or h for the unit of time.

>i got this from the daily output. how do clear these, or better yet, get 
>sendmail to resend these? sometimes my email to pidgeongrl@aol.com gets 

You can clear them by toasting the contents of /var/spool/mqueue or 
(better yet) run the queue once (thereby delivering them instead of 
deleting them) by doing:

sendmail -q

(add a -v if you're curious and want to see the transaction and associated 
error messages.)

>through, but not always :( i was also wondering why this is? is it 
>because pine is using my sendmail rather than popping it to cris.com's 
>mail server?

MUAs (mail user agents) should never try and deliver mail themselves; this 
is left to the MTAs (mail transport agents) like sendmail. 

Feel free to email me sendmail.cf if you still are having problems.

Hope this helps.
--
Charles Lepple
charles@foo.org