Hello Steve,

your initial message contained:

>  I've been trying to configure the system to also allow authentication using 
> the user's email address (in addition to their unadorned cyrus mailbox name), 
> but I've not been successful. 

Email address is singular, so each user has one email address and you want to 
allow login with that email address.  But your later emails say users have two 
email addresses: "[email protected]" and 
"[email protected]", and depending on the configuration (the 
defaultdomain setting) the one or the other works.  Yes, to my knowledge this 
is all you can get with the current configuration options.

If the defaultdomain is sample.domain.com, unless you explicitly create the 
mailbox [email protected] (or have autocreate enabled), then the 
answer will be “Mailbox does not exist” when [email protected] logs 
in.  Thes same statement is still valid, if you swap the domains.

Then you wrote:

> It looks to me like some additional imapd.conf option like "striploginrealm" 
> would need to be implemented, but I can't see an opportune place in the code 
> where the logic for such an option could be inserted.
> However, virtdomains only works if defaultdomain is specified, and 
> defaultdomain only allows one value.  This seems incorrect.  I would expect 
> defaultdomain to only be used when a local-part (e.g. "person") login is 
> specified, then the concatenation of "person@<defaultdomain>" would be used 
> as the login name (and compared against loginrealms as it is when a user 
> specifies a full email address). 

As I mentioned earlier, on your file system the mailboxes exist without domain 
and Cyrus does remove the defaultdomain from the authentication ID in order to 
map to your system (users exist in no domain).  It is thus not possible to 
append the default domain to a login ID without domain and get useful results.

> I would rather not modify the code unless the solution I come up with would 
> be accepted into the mainline code base.

It is not clear which of the above two citations you mean as proposed solution. 
 If you do not modify the code, you will not get your system to work in the way 
you want it.

Greetings // Дилян




-----Original Message-----
From: Steve Turner <[email protected]>
Reply-To: Info <[email protected]>
To: Info <[email protected]>
Subject: Re: Enabling email based logins on existing system
Date: 18/09/24 22:13:32

I would rather not modify the code unless the solution I come up with would be 
accepted into the mainline code base.

Prior to your reply, I've been running with the following settings:
virtdomains: userid
defaultdomain: imap.sample.domain.com
loginrealms: imap.sample.domain.com
This allows logging as either "person" or "[email protected]"

Changing the configuration as you suggested:
virtdomains: userid
defaultdomain: sample.domain.com
loginrealms: imap.sample.domain.com
Allows logging as either "person", "[email protected]", or 
"[email protected]", but in the final case I get a "Mailbox not 
found" error.

And you are correct, simply removing the loginrealms statement:
virtdomains: userid
defaultdomain: imap.sample.domain.com
still allows logging as either "person" or "[email protected]".  I 
will simply have to do without the ability to login as 
"[email protected]".

Cyrus / Info / seediscussions +participants +delivery options
Permalink


------------------------------------------
Cyrus: Info
Permalink: 
https://cyrus.topicbox.com/groups/info/Tae2b59346d586220-Md823ca90dd825ec79c391131
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

Reply via email to