Message is quite aggressive on the message generation front. It has to be—it's a combined news and mail agent. To be able to send combined messages, it has to generate all headers itself (instead of letting the mail/news system do it) to ensure that mail and news copies of messages look sufficiently similar.
t, generate all required headers before starting to compose the message. This can also be a list of headers to generate:
(setq message-generate-headers-first '(References))
message-required-news-headers specify which headers are
Note that some headers will be removed and re-generated before posting,
because of the variable
message-deletable-headers (see below).
message-draft-headerssays which headers should be generated when a draft is written to the draft group.
Fromheaders should look. There are four valid values:
anglesif that doesn't require quoting, and
parensif it does. If even
parensrequires quoting, use
*post-buf*buffer, edit the
Newsgroupsline, and ship it off again. By default, this variable makes sure that the old generated
Message-IDis deleted, and a new one generated. If this isn't done, the entire empire would probably crumble, anarchy would prevail, and cats would start walking on two legs and rule the world. Allegedly.
Here's an example of a value to deal with these headers when responding to a message:
(setq message-subject-re-regexp (concat "^[ \t]*" "\\(" "\\(" "[Aa][Nn][Tt][Ww]\\.?\\|" ; antw "[Aa][Ww]\\|" ; aw "[Ff][Ww][Dd]?\\|" ; fwd "[Oo][Dd][Pp]\\|" ; odp "[Rr][Ee]\\|" ; re "[Rr][\311\351][Ff]\\.?\\|" ; ref "[Ss][Vv]" ; sv "\\)" "\\(\\[[0-9]*\\]\\)" "*:[ \t]*" "\\)" "*[ \t]*" ))
nil, leave the subject unchanged. If it is the symbol
ask, query the user what to do. In this case, the subject is matched against
t, always strip the trailing old subject. In this case,
For example, if you have two secondary email addresses firstname.lastname@example.org and email@example.com and want to use them in the From field when composing a reply to a message addressed to one of them, you could set this variable like this:
(setq message-alternative-emails (regexp-opt '("firstname.lastname@example.org" "email@example.com")))
This variable has precedence over posting styles and anything that runs
Fcc. If it is
always, the posting is allowed. If it is
never, the posting is not allowed. If it is
ask(the default), you are prompted.
notand the rest are regexps. It says which headers to keep hidden when composing a message.
(setq message-hidden-headers '(not "From" "Subject" "To" "Cc" "Newsgroups"))
Headers are hidden using narrowing, you can use M-x widen to
expose them in the buffer.
message-carefully-insert-headerswill not insert a
Toheader when the message is already
Cced to the recipient.