Dovecot authenticates vm-pop3d style virtual domains

assuming Maildir here

Requirements

create a configuration directory for passwords and aliases

mkdir -p /etc/virtual/nethence.com/

note email storage was covered over here.

create a few virtual user accounts e.g.

cd /etc/virtual/nethence.com/
imap_passwd pbraun PASSWORD-HERE >> /etc/virtual/nethence.com/passwd
cat /etc/virtual/nethence.com/passwd

Dovecot setup

see dovecot for a casual configuration example. here’s what specific for virtual domains

mail_location = maildir:/var/spool/virtual/%d/%n
mbox_very_dirty_syncs = yes
imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags

passdb {
    driver = passwd-file
    args = scheme=SHA256-CRYPT username_format=%n /etc/virtual/%d/passwd
}

userdb {
    driver = static
    args = uid=vmail gid=vmail home=/var/spool/virtual/%d/%n
}

first_valid_uid = 500
last_valid_uid = 500

Troubleshooting

That didn’t work so well, we had to use Maildir instead

mail_location = mbox:/var/spool/virtual/%d/%n-home:INBOX:/var/spool/virtual/%d/%n

TODO

Not sure what this is for

allow_all_users=yes

Resources

tools

Password files http://www.reedmedia.net/software/virtualmail-pop3d/#passwords

Virtual domain tools http://www.tsfr.org/~orc/Code/post/

virtual domains @doc

Simple Virtual User Installation¶ https://doc.dovecot.org/configuration_manual/howto/simple_virtual_install/

Static User Database¶ https://doc.dovecot.org/configuration_manual/authentication/static_user_database/

Mail Location Settings¶ https://doc.dovecot.org/configuration_manual/mail_location/

Password Schemes¶ https://doc.dovecot.org/configuration_manual/authentication/password_schemes/

Passwd-file¶ https://doc.dovecot.org/configuration_manual/authentication/passwd_file/

virtual domains @wiki2 & mailing-lists

Virtual Users https://wiki.dovecot.org/VirtualUsers

[Dovecot] local AND virtual mail locations ? https://dovecot.org/pipermail/dovecot/2013-August/092295.html

virtual domain https://dovecot.dovecot.narkive.com/Ba6oGk7c/virtual-domain

more

Dovecot Virtual Users Cannot Send/Receive Mail https://serverfault.com/questions/797563/dovecot-virtual-users-cannot-send-receive-mail

Dovecot mail location issue https://stackoverflow.com/questions/32812893/dovecot-mail-location-issue

dovecot mail storage auto detection failed [closed] https://serverfault.com/questions/854520/dovecot-mail-storage-auto-detection-failed

Dovecot auto folder creation “Unknown setting: mailbox” https://unix.stackexchange.com/questions/245661/dovecot-auto-folder-creation-unknown-setting-mailbox


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun