Am 24.05.2019 um 16:23 schrieb Brent Clark:
Good day Guys
We have a need to put an imap reverse / proxy in front of our clients
machines.
Google is not proving to be of any help. Is there way a way I can have
perdition connect to the clients imap server based on their username?
Ive been looking at delimiter, but perdition keeps looking "locally".
So the idea is perdition looks at the username e.g.
bob(a)variablemydomain.com
perdition connects to variablemydomain.com:993.
Hi Brent,
option 1: This option should be chosen if you can not tell which domains
are valid and which are not. Use regular expression maps. Maybe you have
a look at:
https://de.slideshare.net/jpmens/the-perdition-and-nginx-imap-proxies
especially slides 11 and 13, last line on slide 13 is very close to what
you want to achive. You would need something like ^(.*)$: $1:993
Note that you should definitely have some outgoing network filter,
because otherwise you are building an open IMAP relay for everyone with
this configuration.
option 2: If you have a data source that contains a list of valid
domains, preferably LDAP or database, you should use the corresponding
map modules from perdition. If it is some other kind of data source,
maybe write a small script that reads the domain list regularly and
generates the popmap. This way the perdition instance cannot be abused
to connect somewhere else.
for BOTH options you need to set the option "query_key" to "\d" so
that
only the domain part of the incoming user name is used as lookup key.
Regards
Matthias