![]() |
Thanks for the quick response...does this assume a sendmail setup? I'm using qmail. When I place the procmail file below in the user's home directory, I get the following message in my mail log: @400000003c8d0a490d1a261c delivery 38: success: procmail:_Error_while_writing_to_"_(formail_-r_-A"X-Loop:_$USER@$FAXHOST"_;_\/________echo_"FAX_ERROR:_You_do_not_have_permission_to_fax.")_|_$SENDMAIL"/procmail:_Skipped_"-t"/did_0+0+1/ Any suggestions? Thanks, Aaron On Mon, 11 Mar 2002, Lee Howard wrote: > On 2002.03.11 10:16 Aaron Bell wrote: > > Hello, > > > > I'm using HylaFAX as my fax server currently, but would like to implement > > > > mail to fax capabilities. I need to be able to send attachments, so I'm > > guessing procmail is the best way for me to go. I'm not sure if I can > > modify the procmail recipe that is out there for RelayFax, since I'll be > > using a strictly e-mail to fax setup; no client software on any of the > > workstations. > > > > Is there anyone out there who has a procmail recipe for HylaFAX that > > would > > simply pipe the phone number (which would be on the subject line) to > > sendfax? > > The RelayFax .procmailrc should do this already (recipient number in the > Subject: header) except that it requires "FAXPASSWORD: my_faxpassword" to > be in the body. You have to realize that you could conceivably suffer > from abuse if you do not include some type of authentication mechanism > like this for your user base. E-mail addresses are easy to spoof. > > Granted, the RelayFax recipies are a bit bloated for simple email-to-fax > requests like you propose, but they wouldn't be hard to clean up: > > RETURNPATH=`grep -e "return-path" -i | sed "s/^.*<//;s/>//"` > MAILSUBJECT=`grep -e "^subject" -i | sed -e 's/[Ss]ubject. //g' -e > 's/["@]//g'` > FAXPASSWORD=`grep -e FAXPASSWORD | sed -e 's/FAXPASSWORD: //g'` > METAMAIL_TMPDIR="$HOME/faxtmp" > PASSWDCHECK=`grep -e "$RETURNPATH $FAXPASSWORD" $HOME/faxuserlist` > FAXHOST=`hostname -f` > > :0 > * ! $PASSWDCHECK ?? ^^$RETURNPATH $FAXPASSWORD^^ > * ! ^FROM_DAEMON > * ! ^X-Loop > { > :0 > | (formail -r -A"X-Loop: $USER@$FAXHOST" ; \ > echo "FAX ERROR: You do not have permission to fax.") | $SENDMAIL > -t > > :0:faxtmp.lock > /dev/null > } > > # Uncomment this recipe if you wish to have copies CC'ed back to you... > # :0 c > # ! $RETURNPATH > > :0 ic:faxtmp.lock > | rm -f $METAMAIL_TMPDIR/* > > :0 ic:faxtmp.lock > | metamail -w -x > > :0 ic:faxtmp.lock > | rm -f $METAMAIL_TMPDIR/mm.* > > :0 i:faxtmp.lock > | sendfax -f "$RETURNPATH" -n -d "$MAILSUBJECT" $METAMAIL_TMPDIR/* > > Lee. > > ____________________ HylaFAX(tm) Users Mailing List _______________________ > To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null > ____________________ HylaFAX(tm) Users Mailing List _______________________ To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null