load-path). You add new directories to this list with a
command like (setq load-path (cons load-path "~/lisp")~/.emacs file. This adds a directory
lisp in your home directory to the list.
M-x byte-compile-file
(require 'unmunge-general)~/.gnus.el as my gnus startup file.
~/.gnus also works. Try and only use one at a time,
though.(add-hook 'message-header-setup-hook
'unmunge-mail-address-function).gnus.el.(add-hook 'message-signature-setup-hook
'unmunge-sigfile-function)
.gnus.el file (setq unmunge-default-address "address1@my.domain")
address1@my.domain with a valid email
address. (Leave the quotes though.) This address will be your
email address whenever unmunge thinks you are posting to
Usenet..gnus.el (setq unmunge-mail-address "address2@my.domain")unmunge thinks you're
sending email correspondence.
(setq unmunge-alist
'(("alt.religion.emacs" . unmunge-default-address)
("emacs" . "gowen+emacs@my.domain")
("alt.binaries" . my-binary-mail-address)
("^nntp" . unmunge-default-address)
("^nn" . unmunge-mail-address)))
When I post to a newsgroup, say, gnu.emacs.misc,
unmunge compares "gnu.emacs.misc" to each of the first
elements in list of pairs, starting with the first
(i.e. "alt.religion.emacs", then "emacs", then "alt.binaries").
When it first gets a match (i.e. the list element is contained in
the newsgroup name) unmunge uses the second element in
that pair as the email address.
So, in the case of my example, unmunge would first
compare "gnu.emacs.misc" with "alt.religion.emacs". These don't
match and so it would compare "gnu.emacs.misc"with "emacs". The
word "emacs" is contained "gnu.emacs.misc", so these match and
unmunge will use "gowen+emacs@my.domain" as my
email address for that posting.
Note the last two in this list identify groups whose names start
"nn" as email groups, except for those that start
"nntp". This is the default setting, and it is usually
advisable to have these as the last two pairs.
nil for no signature at
all.
The variables are
unmunge-sigfile-default ; For Usenet
unmunge-sigfile-mail ; For email
unmunge-sigfile-alist ; For matching
See the example below, to see just how similar they are to the
email address versions explained above.
.gnus file
would look like if I kept it well commented:-
(setq user-mail-address "gowen@ma.man.ac.uk") ;Used by other programs
(require 'unmunge-general)
; Set the defaults
(setq unmunge-default-address "gowen+usenet@ma.man.ac.uk")
(setq unmunge-mail-address "gowen@ma.man.ac.uk")
(setq unmunge-sigfile-default "~/.signature")
(setq unmunge-sigfile-mail "~/.signature.mail")
; Change email address
(setq unmunge-alist
'(("spam" . "gowen+spam@ma.man.ac.uk")
; For complaining in my spam mail group
("^nntp" . unmunge-default-address)
("^nn" . unmunge-mail-address)))
; Set up some apposite signatures
(setq unmunge-sigfile-alist
'(("alt.fan.warlord" . nil)
("linux" . "~/.signature.linux) ; linux groups
("vega" . "~/.signature.vega") ; Suzanne Vega mailing list
("^nntp" . unmunge-sigfile-default); Safety first
("^nn" . unmunge-sigfile-mail)))