Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: sending only a coverpage
Hi,
to avoid the headers from being sent to sendfax, why don't you pipe the
mail through sed and delete all header lines? As far as I remember, all
headers are on consecutive lines, then followed by an empty line, then
comes the body (is this true? well, there is a way to find the beginning
of the message..., review RFC822 if needed).
So just use sed to delete all lines starting with the first line up to
the first blank line, and pass the remaining lines thru to sendfax.
Hope that helps,
Marco
Lee Howard wrote:
>
> I'm modifying a .procmailrc file that handles outbound fax requests on an
> email-to-fax gateway to allow the sending of a coverpage only as a "small
> note"
>
> In order to execute sendfax from the rc file a pipe command is used, and
> the mail is consequently sent to sendfax as standard input. This is fine
> when a filename is specified because stdin is ignored, but when a filename
> is not specified sendfax accepts the standard input (which in my case is
> the mail being piped to it) as the body of the fax.
>
> Obviously this isn't what I want (who wants e-mail header info and all that
> being faxed anywhere?). So, I tried to avoid this by using an empty file
> called noattachment (zero bytes) as the specified filename, however, I get
> the following error from sendfax:
>
> [koopa@redhat koopa]$ sendfax -R -c "comments" -d "7550959" noattachment
> noattachment: Empty file
>
> No fax is sent and procmail detects the error which ends up putting the
> mail in the mailbox ultimately.
>
> So apparently sendfax doesn't like my workaround. I'm not far from
> deciding to get my job done with a perl script rather than entirely relying
> on procmail, but does anyone have any ideas on how I can supress the
> standard input from becoming the body of the fax?
>
> Thanks.
>
> Lee Howard