On 30/08/2019 18:00, Ede Wolf wrote:

While trying to learn opensmtpd, amongst other things I am struggeling with the virtual user handling - for a non virtual domain setup.

From what I have been able to understand so far it seems, as if there is no way to deliver mails to a lmtp socket, if there is not at least some reference/mapping to a system user?

accept from any for domain "example.com" recipient <vusers> alias <aliases> deliver to lmtp "/run/cyrus/lmtp" rcpt-to as nobody

where vusers contains:

However, despite being listed in vusers, when trying to send a mail to bob, it gets rejected with "550 Invalid recipient". Creating a systemuser "bob" makes it work. But then I do not need the vusers table, so I am wondering, is it possible to get along without the need for a system user? Now the man page mentions a userbase parameter, and I assume, the according table has to be in the format of the userinfo table mentioned in tables(5)? What then effectively again refers to a system user - just with a mapping in between.

For virtual aliases you need to have a mapping of a virtual address to a user:

table vusers { b...@example.com = bob }

You might try this:

accept from any for domain "example.com" virtual <vusers> deliver to lmtp "/run/cyrus/lmtp" rcpt-to

The userbase parameter is handy if you deliver to mailboxes straight from OpenSMTPD or you want OpenSMTPD to read the users .forward files:

table userinfo { bob = 5000:5000:/var/mail/example.com/bob }

accept from any for domain "example.com" virtual <vusers> userbase <userinfo> deliver to lmtp "/run/cyrus/lmtp" rcpt-to

Good luck,

Reply via email to