1

Topic: iRedAdmin Error: Username must be an valid email-while *technically*..

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2.1 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? download tar + bash iRedMail.sh
- Linux/BSD distribution name and version: deb 10.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mariadb
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue. "Error: Username must be an valid email address." on iRedAdmin
====

hi there! short praise: awesome product even only seeing a fraction of it! very handy.

but! im experiencing a problem most likely nobody else has had, confirmed by forum searches here..

iRedAdmin is an interface ive never seen since my master email address won't log me in: "Error: Username must be an valid email address."

i can guess why: the main domain is set to "s.h" because i have internal dns with this domain-name ("s") and TLD ("h") combo i can reasonably expect never to appear in the wild. the main purpose of this iredmail instance is it's solid roundcube install mostly for reading mail on OTHER external mail servers [via editing imap server list in roundcube conf]. the side purpose is to provide mail services for a totally-internal, non-routable email domain.

it seems that unlike postfix, SOGo and so many other pieces of software (including your installer!), your iRedAdmin panel gets a little carried away verifying the input email address beyond a strict but permissive 'email should have an @ coming before at least one dot, and not contain [illegal characters]' and throws out my entry of...
postmaster@s.h
...before even checking the database to see that it's correct!

so, questions:
1- is there any quick basic patch that can be applied to do one of the following (for me, now)?
   a- simply disable whatever extra checking is happening to allow the address;
   b- add/change to another master email -- keeping in mind those with this issue have never logged into the admin and so can't create users/domains that way -- even if the new email doesn't actually exist or isnt to be served by this server..
2- might you want to call this a 'bug' and do something about it (for all, later)? that'd basically mean changing your validation code at iredadmin to match that of other installed software, or restricting setup with any domain that iredadmin won't accept..

thanks for your time and consideration!

----

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

2

Re: iRedAdmin Error: Username must be an valid email-while *technically*..

sushost wrote:

1- is there any quick basic patch that can be applied to do one of the following (for me, now)?

Open file /opt/www/iredadmin/libs/iredutils.py, find first 2 parameters, replace "2,15" by "1,15", then restart "iredadmin" service:

reEmail = r'''[\w\-][\w\-\.\+\=]*@[\w\-][\w\-\.]*\.[a-zA-Z0-9\-]{2,15}'''
reDomain = r'''[\w\-][\w\-\.]*\.[a-z0-9\-]{2,15}'''

Real top-level domain name has at least 2 characters, so your 's.h' is invalid/illegal.
We have no plan to "fix" it, it's not a bug at all. Instead you can use fake mail domain name like 's.io', or what ever with at least 2 characters for the top-level domain name.