According to the last two paragraphs of (message) Insertion Variables and this comp.mail.headers post by the package's author:
Quoth RFC1036bis:
If a poster or posting agent does append a signature to an
article, the signature SHOULD be preceded with a delimiter
line containing (only) two hyphens (ASCII 45) followed by
one blank (ASCII 32).
Note that this isn't a standard in any formal sense, and RFC1036 is a
Usenet news thing. However, it has been the done thing since, well,
forever. It works.
the trailing space is considered conventional, if not a bit outdated, netiquette. In more practical terms, however, message-mode feels quite strongly about enforcing this convention in the messages it helps you compose by hard-coding the trailing space in at least a couple of places. I believe it is possible to work around these, but minor unforeseen complications are always possible:
(defun my-message-trim-signature ()
"Delete trailing space of `message-mode' signature."
(let ((marker (point-marker)))
(goto-char (point-min))
(when (re-search-forward "^-- $" nil t)
(delete-char -1))
(goto-char marker)))
(add-hook 'message-setup-hook #'my-message-trim-signature)
;; Teach paragraph motion commands about our signature
(defun my-message-fix-paragraphs ()
"Adapt paragraph variables to `my-message-trim-signature'."
(setq paragraph-start (concat "--$\\|" paragraph-start))
(setq paragraph-separate paragraph-start))
(add-hook 'message-mode-hook #'my-message-fix-paragraphs)
;; "Loosen" regexp for `message-goto-signature' et al. to work
(setq message-signature-separator "^-- *$")
--separator? Have you configuredmessage-modeto insert a signature at all? If so, where does it get populated from? A string, file or elsewhere? It may help if you provide a sample mail transcript (e.g. an expected vs actual text comparison) to indicate which whitespace you are trying to eliminate.