Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 0d0016551c4508a4eb832eabf7fca67f > files > 5

hylafax+-client-5.5.5-13.mga5.i586.rpm

#! /usr/bin/bash
#
# This file is considered part of the software distribution,
# and any changes made to it may get overwritten in a
# subsequent upgrade or reinstallation.  Instead of making
# changes here, directly, consider copying the entire
# default MIMEConverters directory to a custom location, i.e.
# /usr/local/sbin/faxmail.custom, set MIMEConverters in 
# hyla.conf to point there, and make changes there instead.
#

DISCARDMSG="DISCARDED application/octet-stream goes here"
FILECMD=file

. /var/spool/fax/etc/setup.cache

if [ ! -x $FILECMD ]; then
    echo "$DISCARDMSG" | $LIBEXEC/textfmt -B
    exit
fi

MIMETYPE="`$FILECMD -bi "$1" | $SED 's/;.*//g'`"
if [ "$MIMETYPE" != "application/octet-stream" ] && [ -x $LIBDATA/faxmail/$MIMETYPE ]; then
    echo "running: $LIBDATA/faxmail/$MIMETYPE \"$1\"" >&2
    $LIBDATA/faxmail/$MIMETYPE "$1"
else
    case "$MIMETYPE" in
	"application/postscript") cat "$1";;
	"message/rfc822")	cat "$1" | $LIBEXEC/textfmt -B;;
	text/*) 		cat "$1" | $LIBEXEC/textfmt -B;;
	*)  echo "Discarding: \"$@\"" >&2
	    echo "$DISCARDMSG" | $LIBEXEC/textfmt -B;;
    esac
fi

exit