<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2800: mutt crashes if piped mail to send and sendmail fails.



The following reply was made to PR mutt/2800; it has been noted by GNATS.

From: Brendan Cully <brendan@xxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2800: mutt crashes if piped mail to send and sendmail fails.
Date: Thu, 29 Mar 2007 21:10:18 -0700

 On Monday, 26 February 2007 at 02:47, mutt-bugs@xxxxxxxxxxxxx wrote:
 > mutt crashes if piped mail to send and sendmail fails.
 > 
 > >How-To-Repeat:
 > rm /usr/sbin/sendmail
 
 Don't do that :)
 
 > echo mail | mutt me@xxxxxxxx
 > 
 > >Fix:
 > This happens because when mutt sees !isatty(0), it sets OPTNOCURSES.  But 
 > yet, when sendmail fails, it attempts to use the internal pager to display 
 > the sendmail output.
 > 
 > One solution which works for me is to add the following at line #77 of 
 > main.c:
 > 
 > if (option(OPTNOCURSES))
 >   Pager="cat";
 > 
 > This causes mutt to cat the output file, rather then paging it or dying 
 > trying.
 > 
 > Works for me.
 
 I've applied a different fix, where stdout/err simply aren't captured
 in batch mode.