<<< Date Index >>>     <<< Thread Index >>>

Fun With Alternates (was: Re: Reply-To header problem)



On Fri, Jan 16, 2004 at 10:04:01AM EST, Payal Rathod wrote:
> On Fri, Jan 16, 2004 at 02:45:18PM +0100, Christoph Berg wrote:

> > set alternates="payal(-[0-9]*\.*[a-z]*)?@.*staticky\.com"
> > 
> > The address you are using right now does not match this, because "vim"
> > does not contain a literal '.'. I think you meant something like:
> 
> But it is .* i.e match _zero_ or mor einstances of ".", right?
> For this vim address it is working properly.

Yeah, good point ("\.*" not ".*" BTW).

> > OTOH, @(.*\.)?staticky\.com might be a good thing to use.
> 
> Hehehe, cool. To extend it further, what if I had more than 1 domain
> too, I mean something other than staticky.com, how do you match that?

@(blah.com|goo\.org)
@((blah|goo)\.com)
@((.+\.)?(blah|goo)\.com)

Here's my own setup (only I don't use the --compat flag, since I'm using
a new patch that turns alternates (as well as lists and subscribe) into
a command that takes a list of regexps), which I generate automatically
from a list of regexps matching individual groups of addresses:

$ cat ~/.mutt/my_addys | ~/.mutt/makealternatesrc --compat
set 
alternates=(dummy@addy|dave@(.+\.)?dave\.tj|dave@(.+\.)?bigfatdave\.com|lists([+].*)?@dave\.tj|lists([+].*)?@bigfatdave\.com|listas([+].*)?@dave\.tj|listas([+].*)?@bigfatdave\.com|paypal@dave\.tj|paypal@bigfatdave\.com|.+-abuse@dave\.tj|.+-abuse@bigfatdave\.com|bigfatdave@optonline\.net)

Here's what my actual config looks like:

$ cat ~/.mutt/my_addys | ~/.mutt/makealternatesrc
or
$ cat ~/.mutt/alternatesrc
alternates dave@(.+\.)?dave\.tj dave@(.+\.)?bigfatdave\.com 
lists([+].*)?@dave\.tj lists([+].*)?@bigfatdave\.com listas([+].*)?@dave\.tj 
listas([+].*)?@bigfatdave\.com paypal@dave\.tj paypal@bigfatdave\.com 
.+-abuse@dave\.tj .+-abuse@bigfatdave\.com bigfatdave@optonline\.net

The patch is on mutt-dev, and I'll repost it here if anybody's interested,
to spare you the hassle of going through the mutt-dev archives.
(Thomas Roessler himself made it.)

> BTW, my original problem is still not solved. Any ideas on that?

I don't think anybody actually understood your original problem ;^)

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgp0oyuqccBmG.pgp
Description: PGP signature