2001-08-19 Simon Josefsson <jas@extundo.com>
[gnus] / lisp / message.el
index 9cae0fe..e08d4ff 100644 (file)
@@ -40,6 +40,7 @@
     (require 'mail-abbrevs))
 (require 'mail-parse)
 (require 'mml)
+(require 'rfc822)
 
 (defgroup message '((user-mail-address custom-variable)
                    (user-full-name custom-variable))
@@ -190,7 +191,7 @@ header, remove it from this list."
   '(From Subject Date (optional . In-Reply-To) Message-ID Lines
         (optional . User-Agent))
   "*Headers to be generated or prompted for when mailing a message.
-RFC822 required that From, Date, To, Subject and Message-ID be
+It is recommended that From, Date, To, Subject and Message-ID be
 included.  Organization, Lines and User-Agent are optional."
   :group 'message-mail
   :group 'message-headers
@@ -1515,14 +1516,11 @@ Point is left at the beginning of the narrowed-to region."
     ["Spellcheck" ispell-message
      ,@(if (featurep 'xemacs) '(t)
         '(:help "Spellcheck this message"))]
-    ["Attach file as MIME" mml-attach-file
-     ,@(if (featurep 'xemacs) '(t)
-        '(:help "Attach a file at point"))]
     "----"
     ["Send Message" message-send-and-exit
      ,@(if (featurep 'xemacs) '(t)
         '(:help "Send this message"))]
-    ["Abort Message" message-dont-send
+    ["Postpone Message" message-dont-send
      ,@(if (featurep 'xemacs) '(t)
         '(:help "File this draft message and exit"))]
     ["Kill Message" message-kill-buffer
@@ -3014,6 +3012,14 @@ to find out how to use this."
         (message
          "Denied posting -- the From looks strange: \"%s\"." from)
         nil)
+       ((let ((addresses (rfc822-addresses from)))
+          (while (and addresses
+                      (not (eq (string-to-char (car addresses)) ?\()))
+            (setq addresses (cdr addresses)))
+          addresses)
+        (message
+         "Denied posting -- bad From address: \"%s\"." from)
+        nil)
        (t t))))
    ;; Check the Reply-To header.
    (message-check 'reply-to