Subject: bug#23054: 25.1.50; Unqualified recipients are considered bogus by message.el

From: [email-masked] (Peder O. Klingenberg)
Date: Fri, 18 Mar 2016 17:17:53 +0100

In emacs master as of today, unqualified email addresses are considered
bogus by message-bogus-recipient-p, despite my smarthost being perfectly
happy sending mail to local addresses.  This started with commit 762986c
"Remove message-valid-fqdn-regexp, since it changes too much now" by
Lars Ingebrigtsen at Feb 7.

Restoring local addresses to non-bogus status seems simple enough:

--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4345,7 +4345,6 @@ message-bogus-recipient-p
     (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

Test case, starting from emacs -Q:

After evaluating (require 'message), the following two forms should both
return nil:

(message-bogus-recipient-p "[email-masked]")
(message-bogus-recipient-p "peder")

With current master, only the first returns nil.

In GNU Emacs 25.1.50.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2016-03-18 built on luna
Repository revision: ace779da01b7ad3130640e945a883f35c0d27330
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description:	Ubuntu 14.04.4 LTS

Configured using:
 'configure --prefix=/usr/local/emacs-git
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/site-lisp/:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars
 --with-pop=yes'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11

Important settings:
  value of $LC_MONETARY: en_NO.UTF-8
  value of $LC_NUMERIC: en_NO.UTF-8
  value of $LANG: en_NO.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  linum-mode: t
  show-paren-mode: t
  paredit-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Contacting host: lars.ingebrigtsen.no:80
Checking new news...done
nnimap read 0k from tarrant.klingenberg.no
Mark saved where search started [2 times]
Saving file /home/pok/src/emacs/local/lisp/gnus/message.el...
Wrote /home/pok/src/emacs/local/lisp/gnus/message.el
Wrote /home/pok/src/emacs/local/lisp/gnus/message.elc
Loading /home/pok/src/emacs/local/lisp/gnus/message.elc...done
Finding changes in /home/pok/src/emacs/local/lisp/gnus/message.el...done
nil [2 times]

Load-path shadows:
/usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/local/emacs-git/share/emacs/25.1.50/lisp/language/thai-word

Features:
(shadow emacsbug vc-cvs php-mode speedbar sb-image ezimage dframe
flymake cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs debug log-view misearch multi-isearch
vc-annotate map magit-blame magit-stash magit-bisect magit-remote
magit-commit magit-sequence magit magit-apply magit-wip magit-log
magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify
magit-process magit-popup magit-mode magit-git magit-section magit-utils
git-commit help-fns log-edit pcvs-util add-log with-editor
async-bytecomp async tramp-sh tramp tramp-compat tramp-loaddefs trampver
ucs-normalize shell dash rect mailalias slime-indentation
slime-cl-indent cl-indent slime-fancy slime-trace-dialog
slime-fontifying-fu slime-package-fu slime-references
slime-compiler-notes-tree advice slime-scratch slime-presentations
bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-repl slime-parse slime etags
xref project arc-mode archive-mode pp hyperspec thingatpt bbdb-message
footnote flow-fill shr-color color shr svg dom browse-url vc
vc-dispatcher vc-git diff-mode sort gnus-cite mail-extr gnus-async
gnus-bcklg qp gnus-ml disp-table gnus-topic mm-archive url-http url-gw
url-cache url-auth pop3 nnrss xml mm-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
nndraft nnmh nnml utf-7 bbdb-gnus epa-file network-stream puny nsm
starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp
gnus-cache pok-gnus nnir gnus-sum gnus-group gnus-undo bbdb-mua bbdb-com
crm bbdb bbdb-site timezone gnus-start gnus-cloud nnimap nnmail
mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message sendmail dired dired-loaddefs rfc822 mml mml-sec epa
derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader subr-x gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils wid-edit linum
paren paredit pok-init org org-macro org-footnote org-pcomplete
pcomplete org-list org-faces org-entities time-date noutline outline
org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs gedcom
slime-autoloads reftex reftex-loaddefs reftex-vars edmacro kmacro ido
seq server filladapt dmacro mm-util mail-prsvr cl compile comint
ansi-color ring finder-inf tex-site info package epg-config url-handlers
url-parse auth-source cl-seq eieio byte-opt bytecomp byte-compile
cl-extra help-mode easymenu cconv eieio-core cl-macs gv eieio-loaddefs
cl-loaddefs pcase cl-lib password-cache url-vars emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 635042 91703)
 (symbols 48 53663 44)
 (miscs 40 1734 3507)
 (strings 32 144162 24602)
 (string-bytes 1 7911285)
 (vectors 16 79006)
 (vector-slots 8 1909100 73328)
 (floats 8 837 845)
 (intervals 56 7825 9130)
 (buffers 976 69)
 (heap 1024 87016 21105))