[FAX2MAIL]
exten => 429,1,Verbose(1,### incomming Fax ${CDR(uniqueid)})
exten => 429,n,Set(LOCALSTATIONID=customer)
exten => 429,n,Set(LOCALHEADERINFO=customer)
exten => 429,n,Set(MAILADDR=my.mail1@example.com)
exten => 429,n,Set(COMMAND=/var/lib/asterisk/scripts/mailfax)
exten => 429,n,Set(FAXFILE=/tmp/fax-${CDR(uniqueid)}.tif)
exten => 429,n,ReceiveFAX(/tmp/fax-${CDR(uniqueid)}.tif)
exten => 429,n,Verbose(1,###       FAXSTATUS: ${FAXSTATUS})
exten => 429,n,Verbose(1,###        FAXERROR: ${FAXERROR})
exten => 429,n,Verbose(1,###         FAXMODE: ${FAXMODE})
exten => 429,n,Verbose(1,###        FAXPAGES: ${FAXPAGES})
exten => 429,n,Verbose(1,###      FAXBITRATE: ${FAXBITRATE})
exten => 429,n,Verbose(1,###   FAXRESOLUTION: ${FAXRESOLUTION})
exten => 429,n,Verbose(1,### REMOTESTATIONID: ${REMOTESTATIONID}

[FAXDELIVERY]
exten => h,1,System(sh -x ${COMMAND} ${FAXFILE} ${MAILADDR} 2> /tmp/extension.deb)
exten => h,2,Hangup()
