1

Topic: How to enable login with uid to imap/smtp/roundcube

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: CentOS 7.1
- Related log if you're reporting an issue:
====

How to enable login to imap, smtp, roundcube using UID as login (so far I had to use full mail address)

I have two domains, but UID-s are unique, cca 500 users on one domain and cca 10000 user on other, all with their unique UID.

For now login is user@domain1 or user@domain2, but since every user has unique UID I would like to add possibility for IMAP/SMTP login to domain1 (domain1 is SMTP/IMAP MX record) with only UID and same on domain2 (domain2 is also on MX record) .... and for roundcube login with UID can perform search on both domains but roundcube is no of big importance for this...

Ofcourse I would like to add that feature and to keep current login way also.

----

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

2

Re: How to enable login with uid to imap/smtp/roundcube

You can only do this for one domain, there is no way to "enforce" having unique *uid*s so you can only have one default realm.
You could get a Roundcube plugin written that will try multiple realms when one isn't specified

3

Re: How to enable login with uid to imap/smtp/roundcube

OK. ... how to enable this for one domain (eg. domain1) .... and keep full mail login for another domain

4

Re: How to enable login with uid to imap/smtp/roundcube

/etc/dovecot/dovecot.conf

auth_default_realm = yourdomain.com

If the line exists in your file, just add yourdomain.com to the end; otherwise add the line, easiest would be near the ssl settings.
Following this, restart the Dovecot Service.

5

Re: How to enable login with uid to imap/smtp/roundcube

I don't understand this request. You need a way to login with unique identity, why not just login with full email address? email address is unique.

and for roundcube login with UID can perform search on both domains but roundcube is no of big importance for this...

If this is what you want to solve with login with uid, you can easily solve it by change the ldap search base dn to 'o=domains,dc=xx,dc=xx', and use a bind dn which has privilege to search all accounts under this dn (for example, cn=vmail,dc=xx,dc=xx).

6 (edited by kmihalj 2015-05-08 05:03:56)

Re: How to enable login with uid to imap/smtp/roundcube

ZhangHuangbin wrote:

I don't understand this request. You need a way to login with unique identity, why not just login with full email address? email address is unique.

Well I need such use for Ysoft SafeQ ... synced with LDAP.... there is UID as username, and if I import mail address for each user SafeQ try to send mail using UID as login (.... that way of working is default with AD and Exchange)

...SafeQ support any LDAP sync (that is why is that purchased), but uses MS philosophy for dealing with usernames/domains/accounts ... and I cannot change SafeQ way of working since it is proprietary software.

7

Re: How to enable login with uid to imap/smtp/roundcube

OK, then use @7t3chguy's solution in this thread (#4 post), it should work for you. Roundcube setting 'username_domain' is used for the same purpose.
https://github.com/roundcube/roundcubem … c.php#L437

By the way, i strongly recommend you to ask support from your software vendor, ask them whether or not SafeQ is able to use other LDAP attribute as login username (e.g. the attribute name which stores full mail address).