Closed Valansch closed 5 years ago
This wizard is for neomutt. Your errors are all related to non-vanilla-mutt settings. Try with neomutt and see if any problems persist.
Thanks for the reply. Sorry about that, you're right. Now I installed neomutt and the errors are gone. However i still cannot send. Note: I edited my original post.
What is the domain name of your email? Were the server settings auto-produced by the wizard or did you have to input them manually? It might be that the SMTP server info was wrong either way.
Actually I should ask if you reverted sendmail
to what the mutt-wizard originally produced.
I have the same error on macos (shame on me I know) and still couldn't figure out why.
I though it was because there wasn't a muttrc setting for sendmail:
set sendmail="/usr/local/bin/msmtp"
note the /usr/local/bin is from brew installation
still doesn't work (not in ~/.muttrc nor /usr/local/share/mutt-wizzard/.muttrc (default) nor ~/.config/mutt/muttrc
the mw isn't too friendly with macos but I got it to work. will leave it here my workarounds if anyone is struggling and want to give it a try here is my GUIDE
I assume you have brew installed
PREFIX = /usr/local
brew install neomutt isync msmtp pass gpg
make install
vim $(which mw)
find muttshare and set it to:
muttshare="/usr/local/share/mutt-wizard"
samething for mwconfig:
mwconfig="/usr/local/share/mutt-wizard/.muttrc"
4a. on of make install commands is:
cp -f mutt-wizard.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard
which, on macos doesn't create ../share/mutt-wizard/.muttrc but ../share/mutt-wizard/mutt-wizard.muttrc so you have to rename it to /usr/local/share/mutt-wizard/.muttrcsudo ln -s /etc/ssl/cert.pem /etc/ssl/certs/ca-certificates.crt
although I found out later you don't need this as SystemCertificate is already in use.gpg --full-gen-key
pass init <mail>
mw add
and follow the program's instructions. it should fail with gmail
though it was because of certificate and removed the CertificateFile entry on ~/.mbsyncrc.
tried to setup an old Gmail account with no success at first. I have 2fa turned on and had to generate an "App password"
as Luke mentioned. but also, had to through
AuthMechs LOGIN
in ~/.mbsyncrc for it to work
you can also download any certificate for your connecting imaps server with
mbsync-get-cert imap.gmail.com
(change imap.gmail.com with yours of course).
after AuthMechs LOGIN I could finally do:
mbsync -l gmail
with success (called my account "gmail" during mw setup)mbsync gmail
though I can't send email :P any tips?
I recommend both of you and anyone else who has problems to attempt to send mail directly with msmtp. This error come in mutt is based off the fact that there was some error in the send mail command so running msmtp will be more specific about the problem:
echo "test" | msmtp -a accountname your@email.addr
Note that the email won't be read in the current mw/neomutt config correctly without a header, but just see if it sends.
good idea. my response:
msmtp: envelope from address <from_email> not accepted by the server msmtp: server message: 530 5.7.0 Must issue a STARTTLS command first. p8sm17826413wrx.62 - gsmtp msmtp: could not send mail (account <account_name> from /Users/user/.config/msmtp/config)
also my ~/.config/msmtp/config file:
account <account_name> host smtp.gmail.com port 587 from <email_addr> user <email_addr> passwordeval "pass mutt-wizard-<account_name>"
Eh, hmm. I suppose you could manually add tls_starttls on
to ~/.config/msmtp/config
, although that setting should be active by default... I suppose it's possible that it isn't on Mac.
Actually shoot, there was a hardcoded certificate name in the ~/.config/msmtp/config
file, you might want to change it to the Mac version. I doubt if that would make a difference if you linked it though.
got it to work with gmail with these additional settings on ~/.config/msmtp/config
auth login
tls on
tls_starttls on
as you said, the last two ar on by default. reading the manual, auth login instead of plain is the one to use with gmail at least.
thank you.
will try my luck with proton mail + bridge
my success was within the terminal with plaing msmtp as you suggested:
echo "test" | msmtp -a accountname your@email.addr
can't seem to send via neomutt as it doesn't set the "current" account when sending and so, msmtp says (when sending, via neomutt):
msmtp: account default not found in /Users/<user>/.config/msmtp/config
should I have the config say, account default instead of my mw add
?
You changed your sendmail
variable above, right? That would be the problem.
It should be
set sendmail = "/usr/bin/msmtp -a ACCTNAME"
EDIT: I.e. that should be in your account-specific muttrc in the accounts/
directory.
@mikeziri On further reading, I think you having to say auth login
might be a result of a "weird" character in your password. Seems like most of the options have to do with encoding and other people have had problems based on their particular passwords.
Did you try it with auth plain
?
so I think I finally understood how all this programs are connected. didn't see the mutt accounts configs but now when you mentioned it.
the exit code 127 refers to the program I guess. it couldn't find /usr/bin/msmtp as brew on macos installs it in /usr/local/bin/msmtp.
as I set an override it couldn't find the account as you said, because the correct command (although with the wrong generated path) was on the accounts/config file. updating msmtp's path did the trick.
then neomutt gave me the same error as before (when running it on the cli) because I had no auth login
after reading your comment (https://github.com/LukeSmithxyz/mutt-wizard/issues/156#issuecomment-486889285) I tried with auth plain
and it also works.
I still had to keep tls on
but no need for tls_starttls on
though.
tnx
Ah! That's the problem! The msmtp location is hardcoded! Okay, this can be fixed.
Now the question is, if you have the default setting of auth on
, does it work? I suspect it actually should as on
is a superset of the other options.
I'll go ahead and ask, if you replace /usr/bin/msmtp
(in the muttrc) with just msmtp
, does it work on Mac OS?
I'll go ahead and ask, if you replace
/usr/bin/msmtp
(in the muttrc) with justmsmtp
, does it work on Mac OS?
yes it does.
it should be fine. also $(which msmtp) -a ... shoud be the same
Ah! That's the problem! The msmtp location is hardcoded! Okay, this can be fixed.
Now the question is, if you have the default setting of
auth on
, does it work? I suspect it actually should ason
is a superset of the other options.
without auth directive it gives:
msmtp: envelope from address <email_from> not accepted by the server
msmtp: server message: 530-5.5.1 Authentication Required. Learn more at
msmtp: server message: 530 5.5.1 https://support.google.com/mail/?p=WantAuthError h12sm21367442wrq.95 - gsmtp
so auth on
isn't a default here.
but adding auth on
instead of plain or login, works fine!
I mean that auth on
is added automatically by mutt-wizard. Either way, it seems like your issue is resolved.
I suspect that @Valansch 's issue is him changing the smtp_url
when encountering those error messages. That's what his original editted post would lead me to believe.
I mean that
auth on
is added automatically by mutt-wizard. Either way, it seems like your issue is resolved.
in which file?
~/.config/msmtp/config
. Is that not what you were editing?
I see. I must've edit the file. just checked the source code and it only does it first time (if the file doesn't exist). so I must have lost those configs from $msmtp_header var.
tnx.
@LukeSmithxyz i'm an idiot, sorry for wasting your time. I hadn't had msmtp installed, even though you clearly state it is as a dependency. Thanks for your help anyways.
An a related note: What do you think about printing a warning on execution of mw if any dependency is missing?
Hi when i try to send emails i get an error in the footer bar:
I installed sendmail and set smtp_url and pass as suggested here
But that didnt change anything.
uname -a
Linux username-manjaro 5.0.7-1-MANJARO #1 SMP PREEMPT Sat Apr 6 08:50:27 UTC 2019 x86_64 GNU/Linux
pacman -Qe
How i got here