Gnus Home
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.11.1 Composing a correct MFT header automagically

The first step in getting Gnus to automagically generate a MFT header in posts you make is to give Gnus a list of the mailing lists addresses you are subscribed to. You can do this in more than one way. The following variables would come in handy.

message-subscribed-addresses
This should be a list of addresses the user is subscribed to. Its default value is nil. Example:
 
(setq message-subscribed-addresses
      '("ding@gnus.org" "bing@noose.org"))

message-subscribed-regexps
This should be a list of regexps denoting the addresses of mailing lists subscribed to. Default value is nil. Example: If you want to achieve the same result as above:
 
(setq message-subscribed-regexps
      '("\\(ding@gnus\\)\\|\\(bing@noose\\)\\.org")

message-subscribed-address-functions
This can be a list of functions to be called (one at a time!!) to determine the value of MFT headers. It is advisable that these functions not take any arguments. Default value is nil.

There is a pre-defined function in Gnus that is a good candidate for this variable. gnus-find-subscribed-addresses is a function that returns a list of addresses corresponding to the groups that have the subscribed (see section `Group Parameters' in The Gnus Manual) group parameter set to a non-nil value. This is how you would do it.

 
(setq message-subscribed-address-functions
      '(gnus-find-subscribed-addresses))

message-subscribed-address-file
You might be one organized human freak and have a list of addresses of all subscribed mailing lists in a separate file! Then you can just set this variable to the name of the file and life would be good.

You can use one or more of the above variables. All their values are "added" in some way that works :-)

Now you are all set. Just start composing a message as you normally do. And just send it; as always. Just before the message is sent out, Gnus' MFT generation thingy kicks in and checks if the message already has a MFT field. If there is one, it is left alone. (Except if it's empty - in that case, the field is removed and is not replaced with an automatically generated one. This lets you disable MFT generation on a per-message basis.) If there is none, then the list of recipient addresses (in the To: and Cc: headers) is checked to see if one of them is a list address you are subscribed to. If none of them is a list address, then no MFT is generated; otherwise, a MFT is added to the other headers and set to the value of all addresses in To: and Cc:

Hm. "So", you ask, "what if I send an email to a list I am not subscribed to? I want my MFT to say that I want an extra copy." (This is supposed to be interpreted by others the same way as if there were no MFT, but you can use an explicit MFT to override someone else's to-address group parameter.) The function message-generate-unsubscribed-mail-followup-to might come in handy. It is bound to C-c C-f C-a by default. In any case, you can insert a MFT of your own choice; C-c C-f C-m (message-goto-mail-followup-to) will help you get started.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by on August, 4 2008 using texi2html