[Mailman-Users] Apache subscription Referer rules

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Thu Jan 16 04:09:35 EST 2020

Jim Popovitch via Mailman-Users writes:

 > Mod_Rewrite is "too heavy" for something this simple.

It's only too heavy if it actually has an unacceptable impact on
system load.  That said, I like the SetEnvIf* approach better.

 > SetEnvIfNoCase Referer "https://.*/mailman/listinfo/" ListInfoReferer

I see three possible issues with the regexp.  First, evidently you're
handling multiple domains.  You might want to include that the
referral comes from the same domain (I don't know how to do it
offhand, though -- that might justify the "heavier" mod_rewrite
approach?)  Second, I think I've seen referrals that are relative to
the base URL in the logs.  You might want to check that the referer
(sp? I would write "referrer" but I don't know if that's correct) in
this context is always a full URL.  Third, if as I suspect the ".*" is
intended to match just the authority component (domain) of the URL,
you may wish to change that to "[^/]*" or perhaps "[^/]+".  (I don't
think I've ever seen a "https:///..." URL with no domain -- that can't
be validated by SSL without a domain!)

 > thoughts?

I haven't checked the command syntax.  It seems to me SetEnvIf
expresses the intent better than mod_rewrite does, and I did a little
thinking about when you would want the extra flexibility that
mod_rewrite allows, and didn't come up with anything, for what that's


More information about the Mailman-Users mailing list