GNU bug report logs - #30347
smtpmail.el doesn't retry with authentication when greylisting is used

Previous Next

Package: emacs;

Reported by: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>

Date: Sun, 4 Feb 2018 14:40:02 UTC

Severity: normal

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30347 in the body.
You can then email your comments to 30347 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Sun, 04 Feb 2018 14:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Feb 2018 14:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
To: bug-gnu-emacs <at> gnu.org
Subject: smtpmail.el doesn't retry with authentication when greylisting is used
Date: Sun, 04 Feb 2018 15:01:30 +0100
[Message part 1 (text/plain, inline)]
I've long been dealing with the following problem: I'm using GNU Emacs
(current 26.0.91, but the problem has existed for a long time before
that) and Gnus to send mail.  The relaying MTA uses greylisting when
receiving mail for local accounts without authentication, but
smtpmail.el cannot deal with the resulting temporary SMTP codes.  I'd
expect that it would retry with authentication, but doesn't.

I've used the following snippet to fix this.  Perhaps this (or something
similar) can be used to fix this issue?

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


[smtpmail.el.patch (text/x-patch, inline)]
--- -	2018-02-04 01:21:02.374212479 +0000
+++ /tmp/smtpmail.el	2018-02-04 01:20:44.340497887 +0000
@@ -838,8 +838,9 @@
 		 ((and auth-mechanisms
 		       (not ask-for-password)
 		       (integerp (car result))
-		       (>= (car result) 550)
-		       (<= (car result) 554))
+		       (or (and (>= (car result) 550)
+				(<= (car result) 554))
+			   (eq (car result) 450)))
 		  ;; We got a "550 relay not permitted" (or the like),
 		  ;; and the server accepts credentials, so we try
 		  ;; again, but ask for a password first.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Sun, 15 Apr 2018 17:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Cc: 30347 <at> debbugs.gnu.org
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Sun, 15 Apr 2018 19:24:46 +0200
Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE> writes:

> I've long been dealing with the following problem: I'm using GNU Emacs
> (current 26.0.91, but the problem has existed for a long time before
> that) and Gnus to send mail.  The relaying MTA uses greylisting when
> receiving mail for local accounts without authentication, but
> smtpmail.el cannot deal with the resulting temporary SMTP codes.  I'd
> expect that it would retry with authentication, but doesn't.
>
> I've used the following snippet to fix this.  Perhaps this (or something
> similar) can be used to fix this issue?

Hm...  Well, the SMTP error message you're getting is "450, Requested
mail action not taken: mailbox unavailable."?  Retrying with a password
seems a bit odd in that instance.  On the other hand, if this is the
common way for SMTP servers to say that "we're greylisting; log in
first" then it would be OK anyway.

But is it?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Mon, 16 Apr 2018 14:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 30347 <at> debbugs.gnu.org, Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Mon, 16 Apr 2018 16:58:06 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE> writes:
>
>> I've long been dealing with the following problem: I'm using GNU Emacs
>> (current 26.0.91, but the problem has existed for a long time before
>> that) and Gnus to send mail.  The relaying MTA uses greylisting when
>> receiving mail for local accounts without authentication, but
>> smtpmail.el cannot deal with the resulting temporary SMTP codes.  I'd
>> expect that it would retry with authentication, but doesn't.
>>
>> I've used the following snippet to fix this.  Perhaps this (or something
>> similar) can be used to fix this issue?
>
> Hm...  Well, the SMTP error message you're getting is "450, Requested
> mail action not taken: mailbox unavailable."?  Retrying with a password
> seems a bit odd in that instance.  On the other hand, if this is the
> common way for SMTP servers to say that "we're greylisting; log in
> first" then it would be OK anyway.
>
> But is it?  :-)

Itʼs one of the ways. Some return 451 instead. Some 421. Itʼs all very
fuzzy :-)

Oh, and thereʼs an official 'authentication is required' code whose
value escapes me for the moment.

BTW, if emacs has credentials for the connection itʼs making, would it
not make sense to attempt authentication before delivery?

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Mon, 16 Apr 2018 18:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Cc: 30347 <at> debbugs.gnu.org
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Mon, 16 Apr 2018 20:45:56 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Itʼs one of the ways. Some return 451 instead. Some 421. Itʼs all very
> fuzzy :-)
>
> Oh, and thereʼs an official 'authentication is required' code whose
> value escapes me for the moment.

Yeah, smtpmail just uses the "relay not permitted" codes to guess that
it's supposed to try again, which aren't exactly official, either.  So
adding 450/451/421, too, probably won't break anything.

> BTW, if emacs has credentials for the connection itʼs making, would it
> not make sense to attempt authentication before delivery?

You'd think so...  But this might lead to some annoyances in that people
have password-protected their password store, and will now be prompted
for that password even if the SMTP server doesn't require a password.

If you see what I mean.  :-)

So I'm not sure that change would be welcomed by everybody.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Tue, 17 Apr 2018 10:34:02 GMT) Full text and rfc822 format available.

Message #17 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 30347 <at> debbugs.gnu.org, Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Tue, 17 Apr 2018 12:33:25 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Robert Pluim <rpluim <at> gmail.com> writes:
>
>> Itʼs one of the ways. Some return 451 instead. Some 421. Itʼs all very
>> fuzzy :-)
>>
>> Oh, and thereʼs an official 'authentication is required' code whose
>> value escapes me for the moment.
>
> Yeah, smtpmail just uses the "relay not permitted" codes to guess that
> it's supposed to try again, which aren't exactly official, either.  So
> adding 450/451/421, too, probably won't break anything.
>

OK

>> BTW, if emacs has credentials for the connection itʼs making, would it
>> not make sense to attempt authentication before delivery?
>
> You'd think so...  But this might lead to some annoyances in that people
> have password-protected their password store, and will now be prompted
> for that password even if the SMTP server doesn't require a password.
>
> If you see what I mean.  :-)
>

Iʼm not sure I follow: the user has a matching machine in authinfo or
wherever they keep their passwords, and the SMTP server advertizes
AUTH support. Why would we not attempt authentication?

> So I'm not sure that change would be welcomed by everybody.

Thatʼs true. What we have now works for me :-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Tue, 17 Apr 2018 12:46:02 GMT) Full text and rfc822 format available.

Message #20 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Cc: 30347 <at> debbugs.gnu.org
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Tue, 17 Apr 2018 14:45:46 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Iʼm not sure I follow: the user has a matching machine in authinfo or
> wherever they keep their passwords, and the SMTP server advertizes
> AUTH support. Why would we not attempt authentication?

Because Emacs doesn't know that the user has a password entry in
~/.authinfo.gpg until the user has type the password.  (If the user is
using password-protected ~/.authinfo files without a password agent,
that is.)

Since most SMTP is still unauthorised, "opportunistic" password sending
may not be welcome.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Tue, 17 Apr 2018 16:15:02 GMT) Full text and rfc822 format available.

Message #23 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 30347 <at> debbugs.gnu.org, Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Tue, 17 Apr 2018 18:14:19 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Robert Pluim <rpluim <at> gmail.com> writes:
>
>> Iʼm not sure I follow: the user has a matching machine in authinfo or
>> wherever they keep their passwords, and the SMTP server advertizes
>> AUTH support. Why would we not attempt authentication?
>
> Because Emacs doesn't know that the user has a password entry in
> ~/.authinfo.gpg until the user has type the password.  (If the user is
> using password-protected ~/.authinfo files without a password agent,
> that is.)
>

Ah, people who like typing passwords all the time. I see your point, though.

> Since most SMTP is still unauthorised, "opportunistic" password sending
> may not be welcome.

True, unfortunately, much like SMTP/TLS is sadly underused.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Mon, 07 Sep 2020 20:50:02 GMT) Full text and rfc822 format available.

Message #26 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 30347 <at> debbugs.gnu.org,  Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Mon, 07 Sep 2020 22:49:24 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

>> Because Emacs doesn't know that the user has a password entry in
>> ~/.authinfo.gpg until the user has type the password.  (If the user is
>> using password-protected ~/.authinfo files without a password agent,
>> that is.)
>
> Ah, people who like typing passwords all the time. I see your point, though.

So I think this isn't something we should try to automate -- the user
will just have to specify that the SMTP connection uses a password.  (I
think that's pretty common for mail user agents.)  So I'm closing this
bug report as a "wontfix".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Sep 2020 20:50:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 30347 <at> debbugs.gnu.org and Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Sep 2020 20:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Tue, 08 Sep 2020 10:00:02 GMT) Full text and rfc822 format available.

Message #33 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 30347 <at> debbugs.gnu.org, Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Tue, 08 Sep 2020 11:59:21 +0200
>>>>> On Mon, 07 Sep 2020 22:49:24 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Robert Pluim <rpluim <at> gmail.com> writes:
    >>> Because Emacs doesn't know that the user has a password entry in
    >>> ~/.authinfo.gpg until the user has type the password.  (If the user is
    >>> using password-protected ~/.authinfo files without a password agent,
    >>> that is.)
    >> 
    >> Ah, people who like typing passwords all the time. I see your point, though.

    Lars> So I think this isn't something we should try to automate -- the user
    Lars> will just have to specify that the SMTP connection uses a password.  (I
    Lars> think that's pretty common for mail user agents.)  So I'm closing this
    Lars> bug report as a "wontfix".

Didnʼt some bloke add smtpmail-servers-requiring-authorization just
for this kind of use-case?

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30347; Package emacs. (Tue, 08 Sep 2020 10:03:02 GMT) Full text and rfc822 format available.

Message #36 received at 30347 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 30347 <at> debbugs.gnu.org, Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Subject: Re: bug#30347: smtpmail.el doesn't retry with authentication when
 greylisting is used
Date: Tue, 08 Sep 2020 12:02:22 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Didnʼt some bloke add smtpmail-servers-requiring-authorization just
> for this kind of use-case?

http://www.quickmeme.com/img/0d/0d00166e7e67eeeb51eab67da8be3a0a0fdad3579811b4b8b0430c13b045d440.jpg

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 06 Oct 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.