Date: Thu, 8 Apr 2004 12:16:25 -0500 From: "Ross A. Beyer" <rbeyer@rossbeyer.net> To: freebsd-questions@freebsd.org Subject: problems with Mutt and esmtp Message-ID: <20040408171625.GA55658@capable.rogards.com>
next in thread | raw e-mail | index | archive | help
I'm having a problem getting the Mutt and esmtp programs to work together. What happens is that when I run Mutt and hit send, Mutt will just hang forever displaying its "Sending message..." message. I think that it might be something to do with the sending of the control character signalling the end of message, but I don't know for sure. I'm running FreeBSD 4.9-STABLE (rebuilt this past weekend), esmtp-0.5.0_1, and mutt-1.4.2.1, which are the most recent of things. I've simplified the config files for each program down for testing, and these are the only contents of both files (and there are no system-level config files for either in /usr/local/etc, this is it): -----~/.esmtp---------------------------------------- identity = rbeyer@rossbeyer.net hostname = localhost:2525 preconnect = "ssh -f -C -L 2525:rossbeyer.net:25 rossbeyer.net 'sleep 5'" -----~/.esmtp---------------------------------------- -----~/.mutt/muttrc---------------------------------- set envelope_from=yes set from="rbeyer@rossbeyer.net" set sendmail="/usr/local/bin/esmtp -v -X esmtp.log" -----~/.mutt/muttrc---------------------------------- Additionally, I use ssh-agent, so no login/password is needed for authorization to my remote mailserver, rossbeyer.net. I find that when I hit send, Mutt has successfully called esmtp (as esmtp created its logfile, but hasn't written anything to it), and that esmtp has properly created the ssh tunnel. However, after that nothing happens until I eventually get fed up and kill the mutt process. I find that if I run "/usr/local/bin/esmtp -v -X esmtp.log -f rbeyer@rossbeyer.net -- rbeyer@rossbeyer.net" from the command line, I get similar results before I start typing, everything is set up, but waiting for user input. Naturally doing this allows you to type a message, hit control-D, then the process finishes, and I get a very rough e-mail delivered to my rbeyer@rossbeyer.net account, so esmtp is working properly to some degree. So I wonder if Mutt isn't talking to esmtp in the right way or esmtp isn't listening in the right way? More testing seems to confirm this. I wrote a little Perl program to put in place for the "set sendmail=" line in ~/.mutt/muttrc that simply captured the command line arguments and STDIN, and wrote them to a file. Then, on the command line I fed those same command line arguments to esmtp and redirected (with '<') the contents of the message file I had captured from Mutt, and then everything worked just fine. I wasn't expecting that to work, so I'm kind of even more confused. So I tried not using a tunnel, and just using esmtp for local delivery via procmail, and the results are identical. Clearly esmtp is running, it has created an empty log file, but Mutt is just sitting there saying "Sending message...". I can't help but wonder if the message hasn't been sent but the correct termination character isn't being sent or received properly. When I comment out the set sendmail="/usr/local/bin/esmtp -v -X esmtp.log" line in the ~/.mutt/muttrc, the mail gets delivered locally no problem, so Mutt is working (and certainly I use Mutt on other systems to happily send and receive mail). The problem is definitely where esmtp and Mutt communicate, as both seem to work fine independently. Have I missed a configuration variable either in esmtp or in Mutt that is causing this problem? I searched around the net and the FreeBSD mail lists and couldn't find anything relevant to this problem, so I'm thinking that maybe I've screwed something up since everyone else seems to be having no trouble. I also contacted the esmtp author, Jose Fonseca, and he isn't aware of this problem, and says that everything works fine for him. Is it something particular to FreeBSD? Any help you can give me would be great, as I'm looking forward to using esmtp and Mutt together. Thank you. -- Ross
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040408171625.GA55658>