Hello all,

I’m currently rewriting an internal tool that my team uses. We do a lot of 
testing work for numerous clients and have the need for a large number of 
temporary email addresses. For each piece of work, we are likely to have 
multiple addresses, and they all need to end up in the same mailbox. The 
mailboxes are defined as part of the domain that the emails are sent to, and 
can be any string of characters that the tester defines when they need an 
address.

Some examples:

These three addresses need to go to the “foo123” mailbox.
test...@foo123.example.com <mailto:test...@foo123.example.com>
test...@foo123.example.com <mailto:test...@foo123.example.com>
test...@foo123.example.com <mailto:test...@foo123.example.com>

And these need to go to the “bar456” mailbox:
test...@bar456.example.com <mailto:test...@foo123.example.com>
test...@bar456.example.com <mailto:test...@foo123.example.com>
tester3@ <mailto:test...@foo123.example.com>bar456 
<mailto:test...@foo123.example.com>.example.com 
<mailto:test...@foo123.example.com>

I have been able to do this with postfix and dovecot by using postfix’s virtual 
aliases - I do a DB lookup that returns foo123 or bar456 as needed, which 
simultaneously creating a foo123 or bar456 user in dovecot’s DB so that the 
mail will be accepted. (Postfix and dovecot share a DB).

For accessing the mailboxes, I have a web app which people authenticate against 
using SAML. That gives me their username. I check whether they are allowed 
access to the requested mailbox (via a DB table) and then impersonate the 
foo123 or bar456 dovecot user using a separate dovecot master user account 
(basically an account that allows impersonation).

My question is: can I replicate something like the above using James? It feels 
like it should be possible but I would appreciate any pointers or advice before 
I dive too deep. (My plan is to use the JPA Docker image, but I would need to 
enable JMAP for my web app and change to use Postgres for the DB.)

I’d also like to say that the new docs are looking great and look like they 
will be really, really useful once complete, so thank you to whoever’s putting 
in the effort with those.

Thanks in advance,

Felix

Reply via email to