From f37f93f364aed34275f515a8c933f48a0e2735b9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 10 Dec 2016 19:03:28 -0800 Subject: [PATCH] Tweaks for message bogus address detection * lisp/gnus/message.el (message-bogus-recipient-p): Do not require "@", since some mailers deliver to local addresses without one. (Bug#23054) Move "@.*@" from here... (message-bogus-addresses): ...to here, so it can be customized. --- lisp/gnus/message.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 448ba7b9971..5446aa2b8c9 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4206,14 +4206,14 @@ not have PROP." (nreverse regions))) (defcustom message-bogus-addresses - '("noreply" "nospam" "invalid" "@@" "[^[:ascii:]].*@" "[ \t]") + '("noreply" "nospam" "invalid" "@.*@" "[^[:ascii:]].*@" "[ \t]") "List of regexps of potentially bogus mail addresses. See `message-check-recipients' how to setup checking. This list should make it possible to catch typos or warn about spam-trap addresses. It doesn't aim to verify strict RFC conformance." - :version "23.1" ;; No Gnus + :version "26.1" ; @@ -> @.*@ :group 'message-headers :type '(choice (const :tag "None" nil) @@ -4222,7 +4222,7 @@ conformance." (const "noreply") (const "nospam") (const "invalid") - (const :tag "duplicate @" "@@") + (const :tag "duplicate @" "@.*@") (const :tag "non-ascii local part" "[^[:ascii:]].*@") (const :tag "`_' in domain part" "@.*_") (const :tag "whitespace" "[ \t]")) @@ -4339,8 +4339,6 @@ An address might be bogus if if there's a matching entry in (mapc (lambda (address) (setq address (or (cadr address) "")) (when (or (string= "" address) - (not (string-match "@" address)) - (string-match "@.*@" address) (and message-bogus-addresses (let ((re (if (listp message-bogus-addresses) -- 2.39.2