better delivery mechanism to maildir?
As many of you probably are, I'm using Postfix together with Dovecot. Postfix delivers mail for my users by writing them directly to the filesystem (maildir).
I wonder is there a better alternative? I'd like to separate the two services on different physical machines, so a shared filesystem isn't trivial any more. (I'd also like to stay with maildir storage and rather not do SQL or similar.)
Can mail be delivered via IMAP for example? Or is there some other delivery protocol I don't know about that both Dovecot and Postfix support?
Thanks!
LDA/LMTP is used for this purpose
On 2/29/24 15:22, Andreas via dovecot wrote:
As many of you probably are, I'm using Postfix together with Dovecot. Postfix delivers mail for my users by writing them directly to the filesystem (maildir).
I wonder is there a better alternative? I'd like to separate the two services on different physical machines, so a shared filesystem isn't trivial any more. (I'd also like to stay with maildir storage and rather not do SQL or similar.)
Can mail be delivered via IMAP for example? Or is there some other delivery protocol I don't know about that both Dovecot and Postfix support?
Thanks!
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Thanks! Can you say where the mapping from the user part in "From" addresses to actual mail(sub)dir goes after switching to LMTP?
Currently, I've got a virtual_mailbox_maps
in Postfix main.cf for this
purpose. Is there something similar in Dovecot?
On 29/02/2024 16.27, dvuoud--- via dovecot wrote:
LDA/LMTP is used for this purpose
On 2/29/24 15:22, Andreas via dovecot wrote:
As many of you probably are, I'm using Postfix together with Dovecot. Postfix delivers mail for my users by writing them directly to the filesystem (maildir).
I wonder is there a better alternative? I'd like to separate the two services on different physical machines, so a shared filesystem isn't trivial any more. (I'd also like to stay with maildir storage and rather not do SQL or similar.)
Can mail be delivered via IMAP for example? Or is there some other delivery protocol I don't know about that both Dovecot and Postfix support?
Thanks!
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
On 2/29/24 15:54, Andreas via dovecot wrote:
Thanks! Can you say where the mapping from the user part in "From" addresses to actual mail(sub)dir goes after switching to LMTP?
Currently, I've got a
virtual_mailbox_maps
in Postfix main.cf for this purpose. Is there something similar in Dovecot?
It looks similar to this:
# If you don't have any user-specific settings, you can avoid the user_query # by using userdb static instead of userdb sql, for example: # <doc/wiki/UserDatabase.Static.txt> userdb { driver = static args = uid=vmail gid=vmail home=/var/vmail/%u }
And then:
mail_location = maildir:~/.maildir
Alternatively, SQL database can be used to resolve maildir on a per account basis:
user_query =
SELECT
'/var/vmail/%d/%n' as home,
'maildir:/var/vmail/%d/%n' as mail,
5000 AS uid, 5000 AS gid,
concat('dirsize:storage=', quota) AS quota
FROM mailbox
WHERE username = '%u' AND active = '1'
On 29/02/2024 17.08, Serg wrote:
On 2/29/24 15:54, Andreas via dovecot wrote:
Thanks! Can you say where the mapping from the user part in "From" addresses to actual mail(sub)dir goes after switching to LMTP?
Currently, I've got a
virtual_mailbox_maps
in Postfix main.cf for this purpose. Is there something similar in Dovecot?It looks similar to this:
# If you don't have any user-specific settings, you can avoid the user_query # by using userdb static instead of userdb sql, for example: # <doc/wiki/UserDatabase.Static.txt> userdb { driver = static args = uid=vmail gid=vmail home=/var/vmail/%u }
And then:
mail_location = maildir:~/.maildir
Thanks. I've had something like this already for the "shared filesystem" config. But how do I do an actual mapping from user@domain.tld to maildir names and possibly submaildirs?
Let me show an example virtual_mailbox_maps
:
joe@smith.name joe.smith/ # two normal users jane@smith.name jane.smith/ test@smith.name joe.smith/.test/ # submaildir of first user @smith.name joe.smith/.catchall/ # catchall goes to submaildir too
In this example, there are only two IMAP accounts:
joe.smith jane.smith
No IMAP account for "test" and none for the catchall.
How do I configure this in Dovecot? I assume the mapping can't stay with Postfix if I migrate to LMTP – is that correct?
Andreas via dovecot skrev den 2024-02-29 17:30:
How do I configure this in Dovecot? I assume the mapping can't stay with Postfix if I migrate to LMTP – is that correct?
all alias to same mailbox, then in dovecot move mails to subfolder on base of recipient with sieve rule :=)
for the lmtp only ensure alias to mailbox is many to one mailbox, rest is just sieve, in postfix do alias rewrite before lmtp stage
On 29/02/2024 19.08, Benny Pedersen wrote:
Andreas via dovecot skrev den 2024-02-29 17:30:
How do I configure this in Dovecot? I assume the mapping can't stay with Postfix if I migrate to LMTP – is that correct?
all alias to same mailbox, then in dovecot move mails to subfolder on base of recipient with sieve rule :=)
for the lmtp only ensure alias to mailbox is many to one mailbox, rest is just sieve, in postfix do alias rewrite before lmtp stage
So are you saying I should replace my example virtual_mailbox_maps
(see at bottom for reference) by a virtual_alias_maps
as follows?
joe@smith.name joe.smith # two normal users jane@smith.name jane.smith test@smith.name joe.smith # submaildir of first user @smith.name joe.smith # catchall goes to submaildir too
Both joe.smith
and jane.smith
are valid IMAP account in my Dovecot,
I assume they would be addressed via LMTP?
But I don't understand how I could use Sieve to access the original RCPT TO command from the SMTP protocol. That information is likely lost by the above mapping, isn't it?
For reference, here is my current virtual_mailbox_maps
again:
joe@smith.name joe.smith/ # two normal users jane@smith.name jane.smith/ test@smith.name joe.smith/.test/ # submaildir of first user @smith.name joe.smith/.catchall/ # catchall goes to submaildir too
Andreas via dovecot skrev den 2024-02-29 16:54:
Thanks! Can you say where the mapping from the user part in "From" addresses to actual mail(sub)dir goes after switching to LMTP?
Currently, I've got a
virtual_mailbox_maps
in Postfix main.cf for this purpose. Is there something similar in Dovecot?
if you do not use virtual_aliases in mta stage then all mailbox is 1:1 on dovecot, so if mta stage do the alias maps to mailbox it works
participants (4)
-
Benny Pedersen
-
dovecot.org@schildbach.de
-
dvuoud@at.encryp.ch
-
Serg