#!/bin/sh #---------------------------------------------------------------------------- # /usr/sbin/uucp-receive - receive uucp message(s) and send it to exim # # Copyright (c) 2001-2020 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2006-11-03 jed # Last Update: $Id$ # # Usage: call the script under one of its aliases: # rbsmtp, rcsmtp, rgsmtp, rssmtp # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # get used script name uu_comp="`basename $0`" case $1 in --help|-h|-?|/?|'') # show help echo echo "Usage: call the script under one of the its aliases 'rbsmtp," echo " rcsmtp, rgsmtp, rssmtp' and pipe input to stdin." echo exit 1 ;; esac case ${uu_comp} in rbsmtp) # use bzip2 cprog='/usr/bin/bunzip2' ;; rcsmtp) # use compress cprog='/usr/bin/uncompress' ;; rgsmtp) # use gzip cprog='/usr/bin/gunzip' ;; rssmtp) # use szip cprog='/usr/bin/sunzip' ;; rsmtp|*) # use no compression at all (rsmtp will be directly called) cprog='' ;; esac # check if compression program exists if [ -n "${cprog}" ] then # use compression if [ -f ${cprog} ] then # ... pipe it to rsmtp (exim) ${cprog} | /usr/bin/rsmtp else # error echo "compression program '${cprog}' cannot be found!" exit 1 fi fi