(and now to the list instead of directly, apologies 'bout that) > >I have Local users and users with forwards. > how do they forward? Using virtual_alias_maps - Lookup into a database, that returns the field alias as destination (alias due to a backend expecting that particular fieldname). If there is more than one forward, it is commaseparated.
The SQL itself is fairly straightforward : select alias as destination from MAILAUTH where username = '%u' and domain = '%d' and is_alias = 'yes' limit 1 for the a...@a.test it would be select alias as destination from MAILAUTH where username = 'a' and domain = 'a.test' and is_alias = 'yes' limit 1 +-------------------+ | destination | +-------------------+ | b...@a.test,c...@b.test | +-------------------+ This works as expected, Postfix sees this, and fires off one process for b...@a.test and one for c...@b.test. And everything is then handed off to xMTPDeliver > > why do you use this xMTPDeliver at all? At first, I didn't have that. I delivered directly to users mailboxes. The issue started with people having aliases/forwards that are not local. This means that the dovecot-lda did not really do anything for the remotes and they ended up in "Nope" land basically. Hence my test for "IS_LOCAL" - This works, the remote gets one as expected, but during the "remote" part, the local part all of a sudden gets one more. I'm now investigating the sendmail part of the xMTPDeliver to get it to do what I want. But if you have a better suggestion that ensures local deliver ends up in either INBOX or SPAM, and that remote gets theirs as well, I'm all ears 😊 Best regards, Søren P. Skou