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.
>
> Any ideas welcomed.
Hi !
Here'is mine:
I think the link is brought up by sendmail DNS lookups when cron uses it
to send standard output of the script to the user owning the crontab.
You can check if the /etc/service.switch used by sendmail tells it to
perform host/addresses resolution with local files (aka /etc/hosts) first.
Here's the content of mine:
$ cat /etc/service.switch
hosts file
Hoping this is the solution.
--
////// C:\WINDOWS> guess_help "what's wrong again ?"
| . . | [0650-35EF] Section: Admin SubSection: FAQ
| ^ | Hourly reboot is mandatory in some cases.
-oOo-----oOo-----------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]