To use ESMTP with mutt add the following line set sendmail="/path/to/esmtp" to your ~/.muttrc and create a ~/.esmtprc (see the included sample.esmtprc for an example.) ESMTP supports SENDMAIL envelope sender '-f' flag, so don't forget to add set envelope_from=yes as well. For debugging purposes you may prefer using the follwing shell script which logs ESMTP to #!/bin/sh LOGFILE=/tmp/esmtp.log echo $0 $@ > $LOGFILE /path/to/esmtp -v $@ >> $LOGFILE exit $? Save it as esmtp.sh, make it executable, and put in your ~/.muttrc set sendmail="/path/to/esmtp.sh" instead.