<HTML ><HEAD ><TITLE >Handling email queues</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK REL="HOME" TITLE="Linux PPP HOWTO" HREF="index.html"><LINK REL="UP" TITLE="After the link comes up - the /etc/ppp/ip-up script" HREF="ip-up.html"><LINK REL="PREVIOUS" TITLE="After the link comes up - the /etc/ppp/ip-up script" HREF="ip-up.html"><LINK REL="NEXT" TITLE="A sample /etc/ppp/ip-up script" HREF="x1455.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ><A HREF="http://www.linuxports.com/howto/ppp" TARGET="_top" >Linux PPP HOWTO</A ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="ip-up.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 25. After the link comes up - the <TT CLASS="LITERAL" >/etc/ppp/ip-up</TT > script</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x1455.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN1448" >25.2. Handling email queues</A ></H1 ><P >When the link between two LANs comes up, you may well want to make sure that email that is queued at either end is <I CLASS="EMPHASIS" >flushed</I > - sent out to its destination. This is done by adding the appropriate <TT CLASS="LITERAL" >sendmail</TT > invocation.</P ><P >Using the bash 'case' statement on an appropriate parameter that pppd passes into the script accomplishes this. For example, this is the <TT CLASS="LITERAL" >/etc/ppp/ip-up</TT > script I use to handle our WAN links and the link to my home Ethernet (also handled on the same ppp server).</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="ip-up.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x1455.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >After the link comes up - the <TT CLASS="LITERAL" >/etc/ppp/ip-up</TT > script</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ip-up.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >A sample <TT CLASS="LITERAL" >/etc/ppp/ip-up</TT > script</TD ></TR ></TABLE ></DIV ></BODY ></HTML >