I have managed to setup sendmail so that it only sends non-local emails at
preset times by issuing the sendmail -q command.
This works great, dials up the ISP at preset times and send and receives the
mail. However if there is no e-mail in the queue, sendmail doesn't dial the
ISP thus not receive possible incoming mail.
I have written a script which does the following to always force it open the
connection upon sendmail -q to check incoming mail by doing the following
ping -c 5 mailserver |& sendmail -q
This pings the external email server, opening the connection as the IP
address is non-local, and upon connection any waiting mail is downloaded.
Is there any better way of doing this. Any tips would be most appreciated.