[Asterisk-Users] Fax to email using mime-contruct

BJ Weschke bweschke at gmail.com
Wed Aug 24 08:54:35 MST 2005


> Fra: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] På vegne av Eddie
> Sendt: 24. august 2005 08:42
> Til: asterisk-users at lists.digium.com
> Emne: [Asterisk-Users] Fax to email using mime-contruct
> 
> I have followed and succesfully receive incoming faxes to email with
> Scott Laird's faxing with asterisk guide.
> http://scottstuff.net/blog/articles/2004/03/28/faxing-with-asterisk
> 
> But, I'm receiving the email from root at mydomain.com.
> I would prefer it to receive from asteriskfax at mydomain.com.
> How do I achive this? Please advice. I'm using postfix.
> 
> Thanks.

 mime-construct is handing off to sendmail (in your case, postfix is
impersonating sendmail) and is not specifying a from address to the
MTA. If you want to change the behavior of mime-construct to do this,
you apply the following patch to mime-construct and then adjust the
mailfax script to include the --from option with the email address you
want the emailed faxes to appear to come from.

60d59
<     --from address      specify the sending address (will default to
the user the script is run as)
281c280
<       @output, $multipart, $multipart_encoding, @recip, $prelude, $fromaddr);
---
>       @output, $multipart, $multipart_encoding, @recip, $prelude);
289c288
<     $fromaddr = '';
---
>
369,371c368
<       elsif ($switch eq '--from') {
<           $fromaddr = $arg;
<         }
---
>
446d442
<     push @output, cont "From: ", $fromaddr, "\n" if $fromaddr ne "";
502,503c498,499
<               exec qw(sendmail -oi), @recip
<                       or xdie "can't run sendmail:";
---
>           exec qw(sendmail -oi), @recip
>               or xdie "can't run sendmail:";



More information about the asterisk-users mailing list