HylaFAX The world's
most advanced open source fax server
Re: [hylafax-users] I want the subject field in the notification mail
Quoting Mr Poirier Xavier <email@example.com>:
> 2- The mail server is a sendmail server.
> Mfax, P=/usr/lib/fax/mailfax, F=DFMShu, M=1000000,
> A=faxmail $u@$h $f
I'm no sendmail expert, but here is how I understand this: you call
mailfax with parameters <name@faxnumber> and <from email address>
> 4- The mailfax script I have modified like you said is :
> /usr/bin/faxmail -n -d "$1" "$2" | /usr/bin/sendfax -f "$SENDER" -
> i "$USRKEY" -R -d "`/usr/bin/expr \"$EXT2\" : '.*%\(.*\)\.fax$'`"
Ok, so you didn't remove the -d to faxmail and all the parameters you are
calling faxmail with are parameters that should be transfered to sendfax.
It's all in the man page (look at -n, see what it does and when it can be
used...). Also, try to understand what you write, reading both mailfax and
sendfax man pages will tell you what each options you sent to faxmail are
and how to set them when calling sendfax. Don't try to just cut and paste
lines from other source without understanding what they do (at least try
> It works but i have : DSN: unknown mailer error 255 in the logs
> and it sends a message telling that sendfax : no dial string specified
Of course, look at what you passed to the -d option...
> And the -i option for having subject returned is not working (of
> course, cause I DON T KNOW what variable I must put here)
> may i put :
> -i "$usrkey" like you said with JPARM
> -i "$subject"
> -i ...
wathever variable your subject is in... as you didn't pass the subject on
the command line from sendmail (if you can do it, this probably would be
the simpler way.. sorry, I don't know sendmail much), you have to parse
the mail yourself and look for the subject. Then, you'll be able to pass
it to sendfax but as you did read the pipe, you'll have to set something
so that the mail will be able to be repiped to faxmail...
> I don' t know what to do.(I am missing a lot my -d direct delivery
> option with faxmail,sorry,it was so clean)
You can still modify faxmail to recognize an option which will set the
USRKEY according to the subject and you will still be able to use -d as
Which one are you better in? C++, perl, sh, sendmail, ...?
Hint: if you can pass the subject as a third parameter to mailfax from
sendmail, you can change the faxmail line to the following (but please
read the man pages to understand why is that...):
/usr/bin/faxmail | /usr/bin/sendfax -n -f "$2" -i "$3" -R -d "$1"
Do note that this won't work if you don't pass the subject from sendmail
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe firstname.lastname@example.org < /dev/null