Dovecot Configuration: rewriting / key→value lookup for variables; aliasing the domain

I’d like to configure Dovecot in a way so that it dispatches userdb/passwd lookups into domain specific locations, where the domain itself may have several aliases, but all of them direct to the same location.

The Dovecot wiki gives a simple, trivial example

Multiple passwd files

You can use all the variables in the passwd-file filenames, for example:

passdb {   driver = passwd-file   # Each domain has a separate passwd-file:   args = /etc/auth/%d/passwd } 

However this does not take care of the domain aliasing that may take place. For example a company might have the domains and, and would like to alias them to all work with the same file /site/example/mail/passwd.

Assuming the above example, it would require to rewrite the %d variable through some alias lookup or to first alias the domain, before moving on to look up the user and authenticating.

Now I do understand that Dovecot doesn’t treat the domain part in any special way, so I could users just have configure their MUAs using the joint domain alias. However this doesn’t deal with domain aliasing on delivery.

Ideally I could insert some lookup to rewrite the domain part early on, to be used for delivery and authentication. However I don’t see how to do that without crude hacks.

Exercício de Aliasing

Estou fazendo um curso EAD sobre Processamento de Sinais, e me deparei com o seguinte exercício:

“Uma senoide analógica com frequência 886 Hz é amostrada a fs = 8192/5 amostras por segundo. Essa frequência vai aparecer em qual frequência digital entre 0 e π?”

Eu resolvi o mesmo sendo: Ts = 1/Fs -> Ts = 0.0006103515625 Omega = 2πFanalogTs -> Omega = 3.3977 Rad/s = 0.540Hz

Porém a resposta não está certa. Também tentei outras abordagens, mas não consegui resolver.

Alguém poderia me ajudar? Desde já agradeço.