HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] pdf2ps, faxmail, sendfax, sendmail



Robert,

I've got a Debian Sarge install with Postfix and
Hylafax 4.1.x.  I've been trolling for information for
this for ages with no firm answer.

From what I understand, you need to set the
postfix/sendmail/exim mail filter mangle up to handle
e-mails, which it sounds like you have in place.  The
next thing is you have to setup a MIME converter to
handle the conversion from pdf to ps.  This is where I
am at present.

I'll send you what I have (which isn't much), to see
if you can get any further than myself.  If you have
any success, I'd be grateful to know.


Here's the fax section of /etc/hylafax/hyla.conf:

<snip>
MIMEConverters: /usr/bin/hylamail/application
<end-snip>


Here's /usr/bin/hylamail/filter.pl:

<snip>
#!/bin/bash

/bin/echo " "
/bin/echo "showpage"
/usr/bin/pdftops $1 | /usr/bin/hylamail/filter.pl
cipher:/usr/bin/hylamail/application# cat 
/usr/bin/hylamail/filter.pl
#!/usr/bin/perl
# Read from the standard input
@text=<STDIN>;
$size=@text;

# Count the number of "showpage"
$count=0;
for($i=0;$i<=$size;$i++){if($text[$i] =~
/showpage/){$count++;}}

# Discard the last line that contain "showpage"
$num=1;
for($i=0;$i<=$size;$i++){
   if($text[$i] =~ /showpage/){
      if($num!=$count){$num++;}
      else{$text[$i]=~s/showpage//g;}
   }

   print $text[$i];
}
<end-snip>


Here's /usr/bin/hylamail/application/pdf:

<snip>
#!/bin/bash

/bin/echo " "
/bin/echo "showpage"
/usr/bin/pdftops $1 | /usr/bin/hylamail/filter.pl
<end-snip>


Here's the fax section of /etc/postfix/transport:

<snip>
fax     fax:localhost
<end-snip>

Here's the fax section of /etc/postfix/master.cf:

<snip>
# use for hylafax
fax      unix    -       n       n       -       1    
  pipe
  flags= user=fax argv=/usr/bin/faxmail -d -n ${user}
${sender}
<end-snip>


Here's the fax section from /etc/postfix/main.cf:

<snip>
# use for hylafax
transport_maps = hash:/etc/postfix/transport
fax_destination_recipient_limit = 1
<end-snip>


The filter.pl and postfix stuff came stright from the
hylafax source as the faxmail-postfix mangle.  I've
set postfix to accept only the @fax domain and
automatically send out any e-mail destined for
<number>@fax to be send via hylafax to <phonenumber>.

As with the stage you are at, I cannot get the
filter.pl to automatically strip any pdf attachments,
convert them to ps and tack them on the end of the
fax.  It's been driving me crazy for ages.

I think if we are able to get this working, we should
get it added as a fully documented section in the
hylafax documentation.

Ben

--- Robert McIntosh <mcintoshrt@xxxxxxxxx> wrote:
> Hi,
> 
> I've got a working installation of hylafax 4.1.x
> talking with sendmail.
> 
> I'd like to send faxes via e-mail and receive them
> via e-mail.  E-mail
> without attachments goes to fax no problem.  The big
> hurdle right now
> is getting either sendfax or faxmail to decode
> outbound pdf
> attachments and also incoming faxes sent to a
> specified address.
> 
> Everytime I attempt to send an e-mail with a pdf to
> fax, I get
> "DISCARDED application/pdf GOES HERE".  I've been
> combing through
> hylafax archives without a good script to get
> faxmail (or sendfax) to
> pipe through a converter like pdf2ps, because as I
> understand it -
> faxmail does not natively support pdf
> attachments...mostly just ps.
> 
> I'd love a push in the right direction - been
> googling for hours.
> 
> Thanks!
> Robert
> 
> ____________________ HylaFAX(tm) Users Mailing List
> _______________________
>   To subscribe/unsubscribe, click
> http://lists.hylafax.org/cgi-bin/lsg2.cgi
>  On UNIX: mail -s unsubscribe
> hylafax-users-request@xxxxxxxxxxx < /dev/null
>   *To learn about commercial HylaFAX(tm) support,
> mail sales@xxxxxxxxx*
> 
> 

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions