On 11.08.22 11:36, Dominik George wrote:
I am currently integrating Postfix tightly into a web-based
system. The objective is to do as much communication between a cloud
platform and the systems using it using pure HTTP / REST APIs.
The platform provides a REST API that takes an e-mail address and
returns a list of recipients that the e-mail address shall expand to.
EXPN was supposed to do that within SMTP, but postfix doesn't support that:
https://www.seaglass.com/postfix/faq.html#exexpn
Up to here, we are clearly within the scope of (virtual_)alias_maps,
only that these have a very limited set of tables available, and
adding lookup tables to Postfix today still seems to involve
re-compiling Postfix with a patch set.
I was planning to do this for use with spamass-milter that uses the info to
know who's the final recipient of a message.
My idea now was to put it all together in one big milter service,
what's the milter service supposed to do?
big services might not be a good idea.
and
I started out writing the alias expansion. It works quite well with
the miltertest tool; here is the first shot at the code for anyone who
is interested:
https://codeberg.org/Bergblau/webmilterd/src/branch/main/internal/frontend/milter.go
Of course, for access control and filtering, milter is obviously
correct. But concernign the alias expansion, I somehow have the
feeling that it is not a good idea, mostly because it happens
before-queue. Thus, the queue daemon will never see the original
recipients. Then again, isn't that also the case with the cleanup
service, which does regular alias expansion?
In short:
* Is it ok to do alias expansion like that in the milter?
* Will I lose something important if I hide the original envelope
recipients from the queue, by rewriting them before-queue?
And one more thing:
* If I use a dedicated domain for the milter-handled aliases, where
would I list that domains? Neither $mydestination nor
$virtual_alias_domains works, Postfix never sends the RCPT TO
commands to my milter fora domain listed there.
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Fighting for peace is like fucking for virginity...