Paul Slootman wrote:
> The switching between online and dial-on-demand is done via a command in
> /etc/ppp/ip-up and /etc/ppp/ip-down.
>
> Now, I currently have queue_smtp set, so that exim doesn't immediately
> cause a dialout when a message is sent.
You mean queue_remote, surely? queue_smtp will still cause a DNS lookup
(it does here anyway).
> However, I'd love to see some
> way of telling exim it's ok to immediately deliver a message when the
> connection is up and running (otherwise it'll be queued, and perhaps
> cause a dialout when 'exim -q' is run, and waste money).
>
> I can't currently see how this could be done, short of editing the
> config file every time (yuck!).
What's so yuck? What I do is have something run from ppp.linkup like:
/usr/exim/configure.update queue_remote no_queue_remote
(amongst other things) and from ppp.linkdown which says:
/usr/exim/configure.update no_queue_remote queue_remote
where /usr/exim/configure.update is just a simple script:
#!/bin/sh
cd /usr/exim || exit 1
if [ `grep -c "^$1\$" configure` -eq 1 ]; then
sed "s/^$1\$/$2/" < configure > tmp
mv -f tmp configure
chown exim configure
chmod 664 configure
rm -f tmp
fi
Works fine :-) No need for anything in Exim like this.
--
Ben Smithurst : ben@??? :
http://www.scientia.demon.co.uk/
PGP: 0x99392F7D - 3D 89 87 42 CE CA 93 4C 68 32 0E D5 36 05 3D 16
http://www.scientia.demon.co.uk/ben/pgp-key.html (or use keyservers)
--
*** Exim information can be found at
http://www.exim.org/ ***