Subject: Developers of Sympa
List archive
- From: Olivier Salaun - CRU <address@concealed>
- To: Paul Haldane <address@concealed>
- Cc: address@concealed
- Subject: [sympa-dev] Re: [sympa-users]
- Date: Wed, 20 Oct 2004 14:20:38 +0200
Hi Paul, I shifted this thread to the sympa-dev mailing list that is more appropriate... 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 ask this because we dont 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 obviosu 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)); -- Olivier Salaün Comité Réseau des Universités ------------------------------------------- Validation signature / Trusting signature: --> http://igc.cru.fr/trust.html ------------------------------------------- |
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
- [sympa-dev] Re: [sympa-users], Olivier Salaun - CRU, 10/20/2004
Archive powered by MHonArc 2.6.19+.