Authenticating Virtual Users without domain

Leon Kyneur
2014-12-31T02:49:22Z

Hi,

I'm trying to migrate a large number of users to a new Dovecot
cluster. The existing mail system allows a user to authenticate with a
bare username if they have connected to the correct local IP on the
server.

e.g.
imap.somedomain.com = 1.1.1.1
imap.anotheromain.com = 2.2.2.2

charlie at somedomain can authnenticate as 'charlie' or
'charlie at somedomain.com' as long as he is connected to
imap.somedomain.com (1.1.1.1)

likewise for bare usernames if they connect to imap.anotherdomain.com.

A previous colleague actually achieved this by hacking with the
Dovecot source code and writing in a lookup table feature. The code is
very old and won't patch cleanly to the latest 2.2.15 source. Another
platform we are using (commercial product) also has this feature but
we also need to migrate these users to Dovecot.

I already have a Dovecot proxy layer for mailbox lookup - so ideally I
would like to do this on my Dovecot proxies.

I know I can also do this kind of thing if I swapped my dovecot proxy
for Perdition, however I don't really want to do that.

I've looked into checkpassword scripts and could possibly make
something work (albeit ugly) - is this the right direction to take
here?

Thanks,

Leon