From owner-freebsd-questions@FreeBSD.ORG Thu Apr 8 10:06:39 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 577E716A4CE for ; Thu, 8 Apr 2004 10:06:39 -0700 (PDT) Received: from capable.rogards.com (63-255-228-251.ip.mcleodusa.net [63.255.228.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EAEE43D4C for ; Thu, 8 Apr 2004 10:06:38 -0700 (PDT) (envelope-from rbeyer@capable.rogards.com) Received: from capable.rogards.com (localhost [127.0.0.1]) by capable.rogards.com (8.12.11/8.12.11) with ESMTP id i38HGRBM055803 for ; Thu, 8 Apr 2004 12:16:27 -0500 (CDT) (envelope-from rbeyer@capable.rogards.com) Received: (from rbeyer@localhost) by capable.rogards.com (8.12.11/8.12.11/Submit) id i38HGP7j055802 for freebsd-questions@freebsd.org; Thu, 8 Apr 2004 12:16:25 -0500 (CDT) (envelope-from rbeyer) Date: Thu, 8 Apr 2004 12:16:25 -0500 From: "Ross A. Beyer" To: freebsd-questions@freebsd.org Message-ID: <20040408171625.GA55658@capable.rogards.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: problems with Mutt and esmtp X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 17:06:39 -0000 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