LMTP and virtual users confusion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LMTP and virtual users confusion

Joe Buck
Hi fair folks. After years of using OS X servers I'm back on FreeBSD and
well... owls have sure aged since then.

So I'm trying to do a virtual domain+virtual users setup with Dovecot where
I'd have several virtual domains and several users. Each user is supposed to
be authenticated via the simple username both for SMTP and IMAP, not a full
email address and each will have several email aliases on different domains.
Pretty simple so far. However, I've set up the virtual_transport to be lmtp
and that transport relays the entire recipient's email address to Dovecot.

main.cf:

virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = aqq.is
virtual_mailbox_maps = hash:/usr/local/etc/postfix/virtualmailboxes

virtualmailboxes:
[hidden email] testmail
[hidden email] testmail

And in the mail log:

dovecot: lmtp(20405): Connect from local
dovecot: auth-worker(20407): passwd([hidden email]): unknown user

I would expect Postfix to accept mail both for test and test2 and tell
Dovecot via LMTP to deliver the mail to the user named testmail. But I
cannot do that because Postfix doesn't relay "testmail" to Dovecot for user
lookup.

All other options that I've tried either make Postfix try to write to
mailboxes by itself or make Dovecot indiscriminate and accept every incoming
message, creating folders with different email addresses.

So the question is, what am I doing wrong there? Is the configuration that I
have in my mind even possible?
And suppose if it's possible, second question is how do I make SMTP
authentication work in such a scenario?



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: LMTP and virtual users confusion

John Fawcett
On 09/03/18 11:47, Joe Buck wrote:
Hi fair folks. After years of using OS X servers I'm back on FreeBSD and
well... owls have sure aged since then.

So I'm trying to do a virtual domain+virtual users setup with Dovecot where
I'd have several virtual domains and several users. Each user is supposed to
be authenticated via the simple username both for SMTP and IMAP, not a full
email address and each will have several email aliases on different domains.
Pretty simple so far. However, I've set up the virtual_transport to be lmtp
and that transport relays the entire recipient's email address to Dovecot.

main.cf:

virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = aqq.is
virtual_mailbox_maps = hash:/usr/local/etc/postfix/virtualmailboxes

virtualmailboxes:
[hidden email]	testmail
[hidden email]	testmail

And in the mail log:

dovecot: lmtp(20405): Connect from local
dovecot: auth-worker(20407): passwd([hidden email]): unknown user

I would expect Postfix to accept mail both for test and test2 and tell
Dovecot via LMTP to deliver the mail to the user named testmail. But I
cannot do that because Postfix doesn't relay "testmail" to Dovecot for user
lookup.

All other options that I've tried either make Postfix try to write to
mailboxes by itself or make Dovecot indiscriminate and accept every incoming
message, creating folders with different email addresses.

So the question is, what am I doing wrong there? Is the configuration that I
have in my mind even possible?
And suppose if it's possible, second question is how do I make SMTP
authentication work in such a scenario?



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html

from the documentation page http://www.postfix.org/postconf.5.html#virtual_mailbox_maps

virtual_mailbox_maps (default: empty)

In a lookup table, specify a left-hand side of "@domain.tld" to match any user in the specified domain that does not have a specific [hidden email] entry.

The remainder of this text is specific to the virtual(8) delivery agent. It does not apply when mail is delivered with a different mail delivery program.

What you are probably looking for is virtual_alias_maps

See also

www.postfix.org/VIRTUAL_README.html

John

Reply | Threaded
Open this post in threaded view
|

Re: LMTP and virtual users confusion

Bill Cole-3
In reply to this post by Joe Buck
On 9 Mar 2018, at 5:47, Joe Buck wrote:

> Hi fair folks. After years of using OS X servers I'm back on FreeBSD
> and
> well... owls have sure aged since then.
>
> So I'm trying to do a virtual domain+virtual users setup with Dovecot
> where
> I'd have several virtual domains and several users. Each user is
> supposed to
> be authenticated via the simple username both for SMTP and IMAP, not a
> full
> email address and each will have several email aliases on different
> domains.
> Pretty simple so far. However, I've set up the virtual_transport to be
> lmtp
> and that transport relays the entire recipient's email address to
> Dovecot.
>
> main.cf:
>
> virtual_transport = lmtp:unix:private/dovecot-lmtp
> virtual_mailbox_domains = aqq.is
> virtual_mailbox_maps = hash:/usr/local/etc/postfix/virtualmailboxes
>
> virtualmailboxes:
> [hidden email] testmail
> [hidden email] testmail
>
> And in the mail log:
>
> dovecot: lmtp(20405): Connect from local
> dovecot: auth-worker(20407): passwd([hidden email]): unknown user


There's so much missing information here that it is impossible to know
what's happening.

See http://www.postfix.org/DEBUG_README.html#mail for suggestions of
what information to provide to make it possible for others here to
assist you. Most important: the output of 'postconf -n' and all of the
possibly relevant log lines, intact.