[Mimedefang] filter recipient regex

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Thu Nov 22 05:39:53 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 21 Nov 2007, Paul Houselander wrote:

> Date: Wed, 21 Nov 2007 13:53:56 -0000
> s172hsgw.876 at custs.dom.com
>
> i.e. "s" + 7 alpha numeric chars + "." + 3 alphanumeric chars + @domain
>
> I relay onto an old groupwise server that I cant verify the recipient
> against with md_check_against_smtp_server.

Can you get a list of all recipients from it and put it into the access 
DB?

> my($recip,$sender,$ip,$host,$first,$helo,$rcpt_mailer,$rcpt_host,$rcpt_addr)
> = @_;
>
> if($recip =~ /<?s([0-9a-z]{7}).([0-9]{3})+(\@custs\.dom\.com)>?/){

Well, the pattern looks OK, no need for the ()'s, quote the first dot, no 
need for the '+'-quantifier, but those won't cause the pattern fail. In 
fact, it works with your example.

The [0-9]{3} does not match your spec:  3 alphanumeric chars
tough.

Bye,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBR0VceugJIbZtwg6XAQLLrQgAmzJU9TrztJxFqdiFArIANPH4d6iL3fNH
NQba2lZJvPemrFn/+SLzxNN1qp0DY8LMXE6q+b2OEIsGfzU+MdDKsJp18yanSwgA
QGbiEGvJwQUALJ2i6eUzjgJgNDdwRk9qq2lK3/TTD4mGRraViCmn/plW7CuDaeYx
JbExVCfSZ+vj/9aYzqKTeNgp0SNxzauAtU+qPKfRodh940Etc3Uem9ES994dW6/N
byAmM54mheG92Oi3OR0cn0vf0oZgFmfczON8hZ3PfJ816yBPRG41wQpdrHavNpaJ
E+BPJDgKhjkjjIaz4sdGfljYZj6ScBYs6iGGldujft1382SyM6Ri1w==
=IS4Q
-----END PGP SIGNATURE-----


More information about the MIMEDefang mailing list