#!/bin/bash #Copyright (C) DatuX 2009 #License GPLv3: GNU GPL version 3 #. #This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. echo "fax2email started at: `date`" echo "FAXFILE=${FAXFILE} EMAILADDR=${EMAILADDR} FAXPAGES=${FAXPAGES} FAXBITRATE=${FAXBITRATE} FAXRESOLUTION=${FAXRESOLUTION} FAXSENDER=${FAXSENDER}" if [ -e "$FAXFILE" ]; then echo "Fax OK, sending mail with attachment." /usr/bin/sendEmail -s localhost -f "fax@`hostname -f`" -t "$EMAILADDR" -u "Fax ontvangen van $FAXSENDER" -a "$FAXFILE" -m " U heeft $FAXPAGES pagina(s) ontvangen van $FAXSENDER. De fax is bijgevoegd als .tif file. " else echo "Fax ERROR, sending error mail." /usr/bin/sendEmail -s localhost -f "fax@`hostname -f`" -t "$EMAILADDR" -u "Fax mislukt van $FAXSENDER" -m " Het nummer $FAXSENDER heeft geprobeerd u een fax te sturen, maar dit is mislukt. Deze mail is puur ter informatie. De afzender moet de fax opnieuw versturen. " fi