Jan Carlson wrote:
> Col Mackrory wrote:
>> 
>> Hello All,
>> 
>> I am looking for a way to test if there is mail to send - and only bringing
>> up the link if the answer is positive.
>> 
>> Before using Diald I happily ran shell script - that albeit clumsy - did
>> the job. Now using Diald the script brings the link up.
>> 
>> Note - if I ran the script from root Diald only brought up the link if
>> there was mail to send. When I run it from cron - I get the indication that
>> no mail is there to send - but the link comes up anyway.
>> 
>> So...I am looking for a shell script I can use that will test if I have
>> mail - and only bring the linkup if I do.
>
> The mqueue command causes sendmail to bring up the link
> unless you run sendmail in deferred mode.
> In sendmail.cf, use this option:
> 
> O DeliveryMode=deferred

This was the intention of this option, but it still does a DNS query.
Use

O DeliveryMode=queueonly

This is a fairly recent addition; I know it works in 8.8.8.  In
queueonly mode, sendmail doesn't even *think* about taking an action
when it isn't queue time.  (I'm pretty sure it isn't in 8.7.5, as my
machine that is still on that sendmail doesn't queueonly.)

Still, I'm suprised that a directory access would wake up sendmail.

However, I think that, rather than using the script, you just let
sendmail do its own requesting the link to come up.

As a hack to get around possible extended dialing attempts timing out
sendmail's DNS lookups, I kill and restart sendmail when the link comes
up.  This has the side effect that if the link comes up before the queue
time, and there's mail to send, it still goes out.

Ed

-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to