Fax to email problem


exten => 0323816480,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => 0323816480,2,Answer
exten => 0323816480,3,Goto(fax,${EXTEN},1)

exten => 0323816480,1,Macro(faxreceive)
exten => h,1,System(/usr/local/sbin/mailfax ${FAXFILE} \ ${EMAILADDR} “${CALLERIDNUM}” “${CALLERIDNAME}”)


exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => s,2,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN})
exten => s,3,rxfax(${FAXFILE})
exten => s,103,SetVar(EMAILADDR=defaultuser@example.com)
exten => s,104,Goto(3)



tiff2ps -2eaz -w 8.5 -h 11 $FAXFILE |
ps2pdf - |
mime-construct --to $RECIPIENT --subject “Fax from $FAXSENDER”
–a /var/spool/asterisk/fax/${UNIQUEID}.tif

here is my configuration of my fax to email, i can receive the fax inside my var/spool/asterisk/fax.But i cannt send the attach file to my email address. Is it i need to do some configuration inside my sendmail ?
Plz advice

here is my extensions.conf