Mutt through user@mail.domain


#1

If I send a mail with alpine from the account cmsb@cmsob.org with the setting:
smtp-server=mail.cmsob.org/novalidate-cert/user=cmsb@cmsob.org
it goes through homiemail-a76.g.dreamhost.com, which attaches a DKIM-Signature and it gets received by multiple addresses. When i start alpine, it asks me for a password. Unfortunately alpine is not scriptable.

I have been unsuccessful using mutt to do the same thing. I have been trying variations of instructions in http://wiki.dreamhost.com/Mutt . An example of a muttrc is:
set realname="Chamber Music Society of Bethlehem"
set from="cmsb@cmsob.org"
set use_from
set use_envelope_from=yes
set smtp_url="smtp://cmsb@cmsob.org@mail.cmsob.org:587/"
set ssl_force_tls=yes
Typing:

mutt -d 2 -s “587 tls” -F msendann_muttrc a_user@somewhere.com < message.txt
Debugging at level 2.
cat /home/cmsb/.muttdebug0
[2014-07-12 08:04:36] Mutt/1.5.20 (2009-06-14) debugging at level 2
[2014-07-12 08:04:36] Reading configuration file ‘/etc/Muttrc’.
[2014-07-12 08:04:36] Reading configuration file ‘/usr/lib/mutt/source-muttrc.d|’.
[2014-07-12 08:04:36] Reading configuration file ‘/etc/Muttrc.d/charset.rc’.
[2014-07-12 08:04:36] Reading configuration file ‘/etc/Muttrc.d/colors.rc’.
[2014-07-12 08:04:36] Reading configuration file ‘/etc/Muttrc.d/compressed-folders.rc’.
[2014-07-12 08:04:36] Reading configuration file ‘/etc/Muttrc.d/gpg.rc’.
[2014-07-12 08:04:36] Reading configuration file ‘/etc/Muttrc.d/smime.rc’.
[2014-07-12 08:04:36] Reading configuration file ‘msendann_muttrc’.
[2014-07-12 08:04:36] maildir_open_new_message (): Trying /home/cmsb/sent/tmp/cur.1405177476.28982_1.derby:2,S.
[2014-07-12 08:04:36] maildir_open_new_message (): Success.
[2014-07-12 08:04:36] maildir_commit_message (): renaming /home/cmsb/sent/tmp/cur.1405177476.28982_1.derby:2,S to /home/cmsb/sent/cur/1405177476.28982_2.derby:2,S.
[2014-07-12 08:04:36] Connected to mail.cmsob.org:587 on fd=4
[2014-07-12 08:04:37] 4< 220 homiemail-a21.g.dreamhost.com ESMTP
[2014-07-12 08:04:37] 4> EHLO derby.dreamhost.com
[2014-07-12 08:04:37] 4< 250-homiemail-a21.g.dreamhost.com
[2014-07-12 08:04:37] 4< 250-PIPELINING
[2014-07-12 08:04:37] 4< 250-SIZE 40960000
[2014-07-12 08:04:37] 4< 250-ETRN
[2014-07-12 08:04:37] 4< 250-STARTTLS
[2014-07-12 08:04:37] 4< 250-AUTH PLAIN LOGIN
[2014-07-12 08:04:37] 4< 250-AUTH=PLAIN LOGIN
[2014-07-12 08:04:37] 4< 250-ENHANCEDSTATUSCODES
[2014-07-12 08:04:37] 4< 250 8BITMIME
[2014-07-12 08:04:37] 4> STARTTLS
[2014-07-12 08:04:37] 4< 220 2.0.0 Ready to start TLS

But no mail is ever received. I don’t want to put a smtp_pass in the muttrc. According to the mutt manual, smtp_pass: “Specifies the password for your SMTP account. If unset, Mutt will prompt you for your password when you first send mail via SMTP.” It doesn’t prompt.

I have tried all kinds of variations in muttrc but nothing has worked. Does anyone have a hint?


Where can we find the articles hosted in the old DreamHost wiki?
#2

It is solved!

On my home computer, I run mutt non-interactively from a script. On the server, I ran mutt interactively with the same .muttrc that hadn’t worked and the screen showed:

This certificate belongs to:
*.mail.dreamhost.com
Dreamhost Web Hosting
admins
Brea California US

This certificate was issued by:
DREAMHOST SSL CA
DREAMHOST CERTIFICATION AUTHORITY

   US

This certificate is valid
from Wed, 25 Jan 2012 00:00:00 UTC
to Tue, 24 Jan 2017 23:59:59 UTC
SHA1 Fingerprint: B985 A8C4 F8B6 757A BF37 9613 BB78 331E 9CFB 3A57
MD5 Fingerprint: 7D6E A98C 4E30 6035 9242 07B5 5505 4522

WARNING: Server hostname does not match certificate

– Mutt: SSL Certificate check (certificate 4 of 4 in chain)
®eject, accept (o)nce, (a)ccept always

I typed a. Then it asked me to confirm To and Subject. Then it asked me for the password. There were no errors and the mail went through!

So the problem was a bad certificate, possibly because our account was recently moved to a different server. Running mutt non-interactively REQUIRES putting smtp_pass in .muttrc .


#3

the certificate error is normal when using mail.yourdomain.com

if you wish to avoid it, you can do so by using the servers direct name as can be determined here http://wiki.dreamhost.com/Certificate_Domain_Mismatch_Error#Direct_server