On 2016/03/06 09:07, ludovic coues wrote: > 2016-03-05 22:56 GMT+01:00 Stuart Henderson <s...@spacehopper.org>: > > > > For OpenSMTPD I haven't tried it but I suspect you may be able to do > > this with a virtual map using a python script via table-python (in > > ooensmtpd-extras in ports) but there isn't much documentation for > > this. Though actually a quick search for "opensmtpd table-python" > > throws up https://gist.github.com/unconfigured/e72a18f3dd12f7c4fc5c > > which looks pretty much like what you need there. > > > > OpenSMTPD in base 5.8 support sqlite table which might be enough.
The mapping would need to be something like 'foo-...@example.com' -> 'foo' or 'foo-...@example.com' -> 'example', I don't see how to do this with the string handling functions available in sqlite. (And in 5.9+ the sqlite table is in opensmtpd-extras as well).