The existing /usr/sbin/ppp-off
script should work just fine.
The only changes you may wish to make are for the script to wait for any
outgoing email currently being processed by sendmail.
In addition, you can create a script file that will be executed once the
link has been terminated. This is stored in /etc/ppp/ip-down
.
It can be used to undo anything special that you did in the
corresponding /etc/ppp/ip-up script
.