1

Topic: ampersand in email address

==== Required information ====
- iRedMail version: 1.8.2 (You are running version 1.8.2)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue:
====

Something of a minor issue, but we have a user in one of the ~320 domains we manage who has an ampersand in the user portion of his email address.  Naturally, when attempting to manage this user in the control panel we get:

not found

Example URL:

https://webmail.*****.net/iredadmin/profile/user/general/gr&weaver@******.com

The ampersand appears to be RFC compliant in this portion of an email address.  Is there an easy workaround for users like this?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: ampersand in email address

Try this:

1) Open file 'libs/iredutils.py', find below line:

regx_email = r'''[\w\-][\w\-\.\+\=]*@[\w\-][\w\-\.]*\.[a-zA-Z]{2,15}'''

2) Modify it to be this one:

regx_email = r'''[\w\-][\w\-\.\+\=\&]*@[\w\-][\w\-\.]*\.[a-zA-Z]{2,15}'''

3) Save change and restart Apache server.

Just curious, why use '&' in email address?

3

Re: ampersand in email address

Thanks, that appears to have worked perfectly.

I have no idea why this user used that character.  Probably add just that one extra layer of complexity to everything.  Dovecot would not permit this user to login anyways, so we ended up editing this user rather than editing our entire 19,000 user system for one user, and set up an alias for the old address.