From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/4906 Path: news.gmane.org!not-for-mail From: "Bruno Hertz" Newsgroups: gmane.emacs.gnus.user Subject: Re: Personality / Alias / Posting Style State of the Union? Date: Wed, 13 Apr 2005 18:07:13 +0200 Organization: Cablecom Newsserver Message-ID: References: <86d5syzs2n.fsf@ufl.edu> <425d3475@epflnews.epfl.ch> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138670761 25349 80.91.229.2 (31 Jan 2006 01:26:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:26:01 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:34:29 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!news.tele.dk!news.tele.dk!small.news.tele.dk!irazu.switch.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: 80-218-17-54.dclient.hispeed.ch Original-X-Trace: news.hispeed.ch 1113408434 687 80.218.17.54 (13 Apr 2005 16:07:14 GMT) Original-X-Complaints-To: news@hispeed.ch Original-NNTP-Posting-Date: Wed, 13 Apr 2005 16:07:14 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:rYck/Cyr3V/UNqmtyLRqNdIMMsg= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:5047 Original-Lines: 84 X-Gnus-Article-Number: 5047 Tue Jan 17 17:34:29 2006 Xref: news.gmane.org gmane.emacs.gnus.user:4906 Archived-At: Marc writes: > "Bruno Hertz" writes: > >> gnus-alias.el, dating back to 2003, and apart from one or two minor >> points it worked alright, with Emacs CVS in my case (IIRC, one issue > > Hi, > > Recently I tried to use gnus-alias.el and ran into a problem concerning > the user-mail-address. The documentation says that > (setq gnus-alias-override-user-mail-address t) > should force the user-mail-addres to match the one in the From field, > but it seems to be broken (at least, in my tests it was not working) > (this is anoying as the Return-Path field will be set according to this > value by the MTA). > > 'address' field in posting-style is working fine. OK, here's a complete list of things I did to get gnus-alias working for me: (1) message-functionp/assoc-ignore-case If you're using Emacs CVS, change - all occurences of 'message-functionp' into 'functionp' - all occurences of '(assoc-ignore-case blah)' into '(assoc-string blah t)' or else you'll get compilation warnings/errors. This might not be neccessary for older Emacs versions, so check first if byte compilation goes OK (2) message-send-and-exit This function sets user-mail-address, i.e. effectively reply-to, from the 'From field. In case that field contains your full name also, like "Tom Jones" that might cause mail servers to choke. I changed this to pick just the mail address between '<' and '>', though in a crude way. This surely breaks easily and can be done better, so use it just as a starting point if you need it. (defadvice message-send-and-exit (around message-send-and-exit-special-user-mail-address) "Temporarily change the value of `user-mail-address' (maybe)." (let ((user-mail-address (save-restriction (message-narrow-to-headers) (let* ((from (message-fetch-field "From" t))) (if (string-match "<" from) (let* ((first (1+ (string-match "<" from))) (last (string-match ">" from))) (substring from first last)) from))))) ad-do-it) ) (3) Enable advice (override-user-mail, forward-as-reply) 'gnus-alias-override-user-mail-address' and 'gnus-alias-allow-forward-as-reply' functionality is implemented as advice, which isn't enabled nowhere but the corresponding 'customize' functions. I.e. if you enable those variables through the 'customize' interface they will work, otherwise not. So to get them working anyway, I put the following into my .gnus (setq gnus-alias-override-user-mail-address t) (ad-enable-advice 'message-send-and-exit 'around 'message-send-and-exit-special-user-mail-address) (ad-activate 'message-send-and-exit) (setq gnus-alias-allow-forward-as-reply t) (ad-enable-advice 'message-forward 'around 'message-forward-with-reply-buffer) (ad-activate 'message-forward) And that's it. All of the above is obviously just quick hacking, but it got me a working gnus-alias setup. Regards, Bruno.