Subject: Developers of Sympa
List archive
- From: "Paul Haldane" <address@concealed>
- To: <address@concealed>
- Subject: [sympa-dev] RE: address transformations
- Date: Wed, 20 Oct 2004 15:43:33 +0100
> From: Olivier Salaun
>
> > Paul Haldane wrote:
> > I've had a quick look at this (working on source from CVS)
> > and I've got something that works for me.
> In what branch did you pick up you version?
> Was it a tagged version?
I just did
cvs -d :pserver:address@concealed:/sympa checkout sympa
Which tag would you recommend? We're nowhere near running a service on
sympa but would like something that was stable enough to run some
internal computing service lists.
> (I ask this because we don't recommend the use of
> an unidentified CVS version of Sympa, especially on
> the development branch)
> > There's a function (get_canonical_email) already in tools.pl
> > that seems the obvious place for this (indeed there's a comment
> > there suggesting this). [the tools.pl in CVS has got two copies
> > of the functions get_canonical_email, del and remove_dir - this
> > got me very confused as I couldn't work out why it wasn't using
> > my version]
> >
> > As a proof of concept I've just added
> >
> > $email =~ s/\@ncl\.ac\.uk$/\@newcastle.ac.uk/;
> >
> > ... towards the end of get_canonical_email - obviously the
> > mappings would be read from a config file in a production system.
> >
> > Apart from that it was just a matter of adding calls to
> > get_canonical_email at appropriate places in wwsympa.fcgi
> > and sympa.pl. I've found 5 places where I needed to do this
> > - there may be more but that seems to have caught the majority
> > of issues.
> Actually tools::getcanonical_email() is not generalized yet;
> it is only used in a web context.
> To change the sender email address of every message, you should
> change Message::new() the following way:
>
> $message->{'sender'} =
lc(&tools::get_canonical_email($sender_hdr[0]->address));
OK - I didn't have that one (the lc() is unnecessary there as
get_canonical_email does lc()).
I think there are a few other places where the function needs to be
applied (so that email addresses in list configs are canonicalised for
example). It doesn't matter (except for efficiency) if the function is
applied too many times as it should have no effect on an address that is
already in the canonical form.
Paul
-
[sympa-dev] RE: address transformations,
Paul Haldane, 10/20/2004
- Re: [sympa-dev] RE: address transformations, Olivier Salaun - CRU, 10/20/2004
- <Possible follow-up(s)>
-
RE: [sympa-dev] RE: address transformations,
Paul Haldane, 10/21/2004
- Re: [sympa-dev] RE: address transformations, Olivier Salaun - CRU, 10/21/2004
Archive powered by MHonArc 2.6.19+.