[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bad times with authinfo, smtpmail, mu4e, davmail and mails providers

From: Snail Lazy
Subject: Re: bad times with authinfo, smtpmail, mu4e, davmail and mails providers
Date: Tue, 20 Jul 2021 15:11:38 +0200
User-agent: mu4e 1.4.2; emacs 27.1

Philip Kaludercic <> writes:

> Lazy Snail <> writes:
>> If smtpmail.el and authinfo fails to let us get it this way, what do you
>> recommend as smtp server ? postfix ?
> I use msmtp, because it requires no server but acts like sendmail making
> it easy to use + it has a easy configuration file.

Thanks for the suggestion. I wrote a configuration for msmtp and it
helped me to debug our issues and to wrote tests, ultimately we stuck
with smtpmail, so the answer to my question is, yes, smtpmail and
authinfo can handle specifics domains, just use the mail adress as
username and ensure that the variable smtpmail-smtp-user is also set to
the mail address. I think you must specify instead of
localhost in authinfo for davmail thought, that was one of our pitfall.

A test for offlineimap,

#+begin_src emacs-lisp :tangle ~/mail.test.el :eval no
(require 'ert)
(require 'smtpmail)
(require 'mu4e)

(ert-deftest mail-test-offlineimap ()
    "offlineimap should exit normally"
  (should (eq

and then a test for each of the accounts

#+begin_src emacs-lisp :tangle ~/mail.test.el :eval no
(ert-deftest mail-test-account-2 ()
    "Testing sending mails with account 2"
  ;; msmtp should return 0
  ;; (should (eq
  ;;           (call-process-shell-command
  ;;            "echo \"hello there \" \\
  ;; | msmtp -a lazysnail2077")
  ;;           0))
  ;; should not produce an error
    (mu4e-context-switch 'force "lazysnail2077")
    (insert "")
    (insert "mail-test-account-2")

The tests helped us to reduce the suspects in the stack. At the end, the
‘modern password’ authentification stuck us despite having already
defined ‘app passwords’ (multiple times) and enabled ‘less secure apps’.
Defining new ‘app passwords’ a last time seemed to unlock the situation.

To conclude, we better choosed a good mail provider rather than gmail,
who not only rob your mails but also your time ;)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]