Skip to content

[FR] IMAP: Allow use of subdomain only as host #275

@narcisgarcia

Description

@narcisgarcia

Is your feature request related to a problem? Please describe.
I'm hosting Nextcloud for CardDAV/CalDAV logins from IMAP authentication, but this NC instance needs to host accounts from different mail services.
I can configure:

 'user_backends' => 
 array (
   0 => 
   array (
     'class' => '\\OCA\\UserExternal\\IMAP',
     'arguments' => 
     array (
       0 => 'imap.example.net',
       1 => 993,
       2 => 'ssl',
       3 => ,
       4 => false,
       5 => false,
     ),
   ),
 ),

to [email protected] that authenticate to imap.example.net
but I can't configure [email protected] that need to authenticate to imap.example.COM

Describe the solution you'd like
My proposal is to allow specify only subdomain as IMAP server:

 'user_backends' => 
 array (
   0 => 
   array (
     'class' => '\\OCA\\UserExternal\\IMAP',
     'arguments' => 
     array (
       0 => 'imap.',
       1 => 993,
       2 => 'ssl',
       3 => ,
       4 => false,
       5 => false,
     ),
   ),
 ),

This way, when External user authentication extension finds first argument ending with a dot '.' it should append e-mail address FQDN to argument:
On 0 => 'sub.', and username is "[email protected]" concatenate "sub." + "example.net" to get "sub.example.net" as IMAP host.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions