Have you tried calling a bash script that in turns calls mutt. That way you
could debug much easier, adding echo to a log file.
Sent from my iPhone
On 2013-06-20, at 5:27 PM, Daniel - Asterisk wrote:
> Hello jg:
>
> When mutt is called from Asterisk's dialplan there's no output at mail.log
>
> When I use:
> echo | /usr/bin/mutt -s "New fax" earohua...@gmail.com -a
> ${FAXDEST}/${tempfax} > /tmp/ocurrencias.txt 2>&1
> replacing FAXDEST and TEMPFAX with proper values, the output is as follows:
>
> Jun 20 16:16:16 SERVER-NAME sendmail[21276]: My unqualified host name
> (SERVER-NAME) unknown; sleeping for retry
> Jun 20 16:17:16 SERVER-NAME sendmail[21276]: unable to qualify my own domain
> name (SERVER-NAME) -- using short name
> Jun 20 16:17:16 SERVER-NAME sendmail[21276]: r5KLHGgk021276: from=root,
> size=116501, class=0, nrcpts=1, msgid=<20130620211615.GA21267@SERVER-NAME>,
> relay=root@localhost
> Jun 20 16:17:17 SERVER-NAME sm-mta[21285]: r5KLHGNY021285:
> from=, size=116646, class=0, nrcpts=1,
> msgid=<20130620211615.GA21267@SERVER-NAME>, proto=ESMTP, daemon=MTA-v4,
> relay=localhost [127.0.0.1]
> Jun 20 16:17:17 SERVER-NAME sendmail[21276]: r5KLHGgk021276:
> to=earohua...@gmail.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01,
> mailer=relay, pri=146501, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent
> (r5KLHGNY021285 Message accepted for delivery)
> Jun 20 16:17:19 SERVER-NAME sm-mta[21287]: STARTTLS=client,
> relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL,
> cipher=RC4-SHA, bits=128/128
> Jun 20 16:17:20 SERVER-NAME sm-mta[21287]: r5KLHGNY021285:
> to=, ctladdr= (0/0), delay=00:00:03,
> xdelay=00:00:03, mailer=esmtp, pri=236646, relay=gmail-smtp-in.l.google.com.
> [173.194.76.26], dsn=2.0.0, stat=Sent (OK 1371763040 f6si834075qaf.111 -
> gsmtp)
> ocurrencias.txt is empty also.
>
> Elder Arohuanca
>
>
>
> On Wed, Jun 19, 2013 at 3:12 PM, jg wrote:
>> More things to try:
>>
>> (1) Is there any entry in /var/log/maillog (or equivalent log file)? If so,
>> mutt basically works and the messages should give some clues.
>> (2) What happens if you call mutt without any attachments?
>>
>> I am using mutt in exactly the same way and it works.
>>
>> jg
>>
>> Am 19.06.2013 21:50, schrieb Daniel - Asterisk:
>>> Hi Andre:
>>>
>>> I added echo to provide STDIN, I'm sure on variable contents, please see
>>> bellow
>>>
>>>
>>> Hello Steve,
>>>
>>> 1. I've just addd echo at my sentence, please see output bellow.
>>> 2. Asterisk is executing as root, I think Asterisk has access to read TIF
>>> files since I've used ls, chmod, cp & mv from Asterisk's CLI with '!'
>>> character.
>>> 3. I don't get you, please give some advice to try using Verbose instead
>>> System
>>> 4. I don't know how to get this, but I'm using /usr/bin/mutt as you can see
>>> bellow.
>>> 5. I have redirected output of System this way : System(echo |
>>> /usr/bin/mutt -s "New fax" earohua...@gmail.com -a ${FAXDEST}/${tempfax} >
>>> /tmp/ocurrencies.txt 2>&1), ocurrencies.txt is empty.
>>>
>>>
>>> DIALPLAN:
>>> [ Context 'default' created by 'pbx_config' ]
>>> '*95' => 1. NoOp(trying to send a fax to an email)
>>> 2. Set(FAXDEST=/tmp/faxes)
>>> 3. Set(tempfax=${SHELL(ls /tmp/faxes/*.tif):11})
>>> 4. NoOp(file name is: ${tempfax})
>>> 5. Goto(incoming-fax,fax,7)
>>>
>>> [ Context 'incoming-fax' created by 'pbx_config' ]
>>> 'fax' => 1. Verbose(3,Incoming fax)
>>> ...
>>> 5. ReceiveFax(${FAXDEST}/${tempfax})
>>> 6. Verbose(3,- Fax receipt completed with status:
>>> ${FAXSTATUS})
>>> 7. System(echo | /usr/bin/mutt -s "New fax"
>>> earohua...@gmail.com -a ${FAXDEST}/${tempfax})
>>> 8. NoOp(System command status is: ${SYSTEMSTATUS})
>>> 9. Hangup()
>>>
>>> ASTERISK CLI OUTPUT:
>>> -- Goto (default,*95,1)
>>> -- Executing [*95@default:1] NoOp("SIP/40106-1ea1", "trying to send
>>> a fax to an email") in new stack
>>> -- Executing [*95@default:2] Set("SIP/40106-1ea1",
>>> "FAXDEST=/tmp/faxes") in new stack
>>> -- Executing [*95@default:3] Set("SIP/40106-1ea1",
>>> "tempfax=20130619.tif") in new stack
>>> -- Executing [*95@default:4] NoOp("SIP/40106-1ea1", "file name is:
>>> 20130619.tif") in new stack
>>> -- Executing [*95@default:5] Goto("SIP/40106-1ea1",
>>> "incoming-fax,fax,7") in new stack
>>> -- Goto (incoming-fax,fax,7)
>>> -- Executing [fax@incoming-fax:7] System("SIP/40106-1ea1", "echo |
>>> /usr/bin/mutt -s "New fax" earohua...@gmail.com -a
>>> /tmp/faxes/20130619.tif") in new stack
>>> -- Executing [fax@incoming-fax:8] NoOp("SIP/40106-1ea1", "System
>>> c