Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Reserved Username(s) Regex Question

Quote Reply
Reserved Username(s) Regex Question
Hi,

I thought I had already posted this, but can't find it so I must have been dreaming it or something...

I'm reserving some generic word usernames that require both the singular, and pural of each to be reserved.

eg: rentalcar and rentalcars (with an s)

I know that the regex rentalcar?@mydomain.com matches rentalcars, but GM then doesn't match the username rentalcar.

I'm also not sure if GM recognises any other regex expressions apart from the * and the ? for the reserved usernames section? My perl book (yes I have a couple :) says the ? matches 0 or 1 of any character, but it doesn't seem to in this case.

Cheers,
R.



Quote Reply
Re: Reserved Username(s) Regex Question In reply to
I think both of these _may_ work:

Code:
rentalca??@mydomain.com
Code:
rentalca*@mydomain.com
Installations:http://www.wiredon.net/gt/

Quote Reply
Re: Reserved Username(s) Regex Question In reply to
Hi Paul,

Thanks for that. The * matches any number of characters after the login specified, which is ok accept in this case I only want to match 1 character. The ?? also didn't recognise the straight "username" without the "s".

Hopefully there's another solution somewhere? It would be great if you could enter full regex's into these fields... assuming you can't at this stage?

Cheers,
R.


Quote Reply
Re: Reserved Username(s) Regex Question In reply to
I think it's designed to only support * and ? to make it simple for the normal user. If it were to support normal regex users would have to learn how to use regex just to use this feature and that wouldn't be too nice...

I do think the regular * and ? are probably all most people need for matching usernames and hosts, and full blown regex would probably be overkill (and prone to error).

*'s are 0 or more of a character.
.'s are 1 of any character.

so using a . for username and usernames won't work. using a * would work, but then would work with usernamesabc.

One solution is changing the regex that checks this. You would change the ?. Currently it probably tr's ? to a .
If you made it change it to a .? then it should match 0 or 1 of any character.

Adrian