3 # put this file in /etc/network/if-up.d/exim4-smarthost
4 # add an exim4-smarthost smtp.server.example.com::587 line to your interface
5 # stanza in /etc/network/interfaces
7 # this will only work for split config, since in non-split config we
8 # only have a single file which is included and which would need more
9 # serious string processing to alter. With split config, we can blindly
10 # overwrite our previous file.
13 # MODE = { start | stop }
14 # IF_EXIM4_SMARTHOST = hostname[::port]
16 SMARTHOSTFILE
="/etc/exim4/conf.d/main/00_local_DCsmarthost"
18 if [ -z "$IF_EXIM4_SMARTHOST" ]; then
22 if [ "$MODE" = 'stop' ]; then
24 invoke exim4 reload
> /dev
/null || true
28 if [ "$IF_EXIM4_SMARTHOST" = "none" ]; then
30 invoke exim4 reload
> /dev
/null || true
34 echo "DCsmarthost = ${IF_EXIM4_SMARTHOST}" > $SMARTHOSTFILE
36 invoke exim4 reload
> /dev
/null || true