Thread (9 messages) 9 messages, 6 authors, 2017-04-16

Error while sending a mail from mutt

From: AYAN KUMAR HALDER <hidden>
Date: 2017-03-30 10:28:56

On Thu, Mar 30, 2017 at 3:15 AM, Okash Khawaja [off-list ref] wrote:
quoted
On 29 Mar 2017, at 21:19, Jim Davis [off-list ref] wrote:

On Wed, Mar 29, 2017 at 12:32 PM, AYAN KUMAR HALDER
[off-list ref] wrote:
quoted
Hi,

I am trying to send a mail using mutt. I am getting the error as follows :-

SMTP session failed: 501 5.5.4

I understand the error meant that a valid mail transaction protocol
was used with invalid arguments. Please let me know how do I debug
this issue further.
Mutt usually invokes some other program to send mail -- on my
workstation, for instance, that other program is /usr/sbin/sendmail:

[jim at krebstar ~]$ mutt -v | grep '^SENDMAIL'
SENDMAIL="/usr/sbin/sendmail"

so to debug a similar problem on my workstation I'd first look to see
where sendmail (or whatever program your mutt installation uses) logs
its messages.

That used to be in /var/log/maillog or such; nowadays you might have
to run journalctl instead.

For example, if I try

mutt postmaster at example.com </dev/null

on my workstation, then

journalctl | grep sendmail

tells me

Mar 29 12:59:06 krebstar.arl.arizona.edu sendmail[27263]:
v2TJx61J027263: to=postmaster at example.com, ctladdr=jim (1000/1000),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30294,
relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection
refused by [127.0.0.1]

which reminds me I don't actually have the sendmail service running.
You can check ~/.muttrc file to see what it is using to send emails. If it is using sendmail or esmtp, then in .muttrc file where it specifies sending program you can append -X /path/to/log/file. That will output the whole SMTP dialog to that log file.
In my case, I get the following error messages in /var/log/mail.log
Mar 30 15:39:55 ayankh-X553SA postfix/sendmail[24765]: fatal: usage:
sendmail [options]
Mar 30 15:40:17 ayankh-X553SA postfix/sendmail[24891]: fatal: usage:
sendmail [options]

How do I see what arguments are being sent by mutt to sendmail.
Is there any quicker way by which I can get mutt working fine.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help