Re: Help - How to unwind an SRS address?
Shevek <[email protected]> Tue, 23 Nov 2004 12:02:41 +0000 (GMT)
| Newsgroups | gmane.mail.spam.srs.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 20 Nov 2004, Chris Drake wrote:
> Hi,
>
> Please can someone give me a regex or *simple* instructions on how to
> reconstruct the real senders email address from an SRS one (pref
> without installing anything)?
I haven't checked this. And I did put a few extra (?:) constructs in to
clarify the blocks. I used [^=]+ to match each section.
s/^SRS0[-+=](?:[^=]+)=(?:[^=]+)=([^=]+)=([^@]+)@/$2@$1/
HH0 T0 domain user
s/^SRS1[-+=](?:[^=]+)=(?:[^=]+)=(?:[^=]+)=[-+=](?:[^=]+)=(?:[^=]+)=([^=]+)=([^@]+)@/$2@$1/
HH1 T1 fwdomain
SRS addresses are those matching ^SRS[01][-+=] as noted by Mark.
S.
--
Shevek http://www.anarres.org/
Robust Sender Policy Framework (SPF) http://www.libspf2.org/
SRS for the next generation http://www.libsrs2.org/