Upgrade 2.3 to 2.4 - virtual mail - dovecot-lda flags ignored
When running v2.3, Dovecot correctly identifies both recipient and domain when receiving mail from Debian exim4 via dovecot-lda, with no flags set.
With v2.4, whether the flags are set or not, Dovecot throws error 75. If lda_mailbox_autocreate is set to yes, it creates the mailuser vmail and delivers to /var/vmail/vmail/INBOX.
Users are able to log in and read email as before.
doveadm user admin@example.ca output is:
field value uid 5000 gid 5000 home /var/vmail/admin mail_path /var/vmail/admin/Maildir
Here is the full printout of doveconf -n.
2.4.1-4 (7d8c0e5759): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.1-4 (0a86619f)
OS: Linux 6.1.0-20-rt-686-pae i686 Debian 13.0 ext4
Hostname: football.scasl.ca
4 default setting changes since version 2.4.0
dovecot_config_version = 2.4.0 auth_debug = yes auth_debug_passwords = yes auth_mechanisms = plain login base_dir = /var/run/dovecot/ dovecot_storage_version = 2.4.0 first_valid_gid = 5000 first_valid_uid = 5000 fts_autoindex = yes fts_autoindex_max_recent_msgs = 999 fts_search_add_missing = yes hostname = scasl.ca listen = * :: login_trusted_networks = 209.121.143.10/32 mail_debug = yes mail_driver = maildir mail_gid = 5000 mail_home = /var/vmail/%{user|username} mail_inbox_path = /var/vmail/%{user|username}/Maildir/INBOX mail_path = /var/vmail/%{user|username}/Maildir mail_privileged_group = vmail mail_uid = 5000 postmaster_address = postmaster@scasl.ca protocols { imap = yes } sql_driver = mysql mysql scasl.ca { dbname = scasl host = localhost password = # port = 3306 user = scasl } userdb sql { iterate_query = SELECT email_username AS username, domain FROM league query = SELECT CONCAT('/var/vmail/',email_username) AS home, 5000 AS uid, 5000 AS gid FROM league WHERE email_username = '%{user|username}' } passdb sql { default_password_scheme = BLF-CRYPT query = SELECT password FROM login WHERE ID IN (SELECT ID FROM league WHERE email_username='%{user|username}') } maildir { very_dirty_syncs = yes } namespace inbox { mail_driver = maildir mail_home = /var/vmail/%{user|username} mail_inbox_path = /var/vmail/%{user|username}/Maildir/INBOX mail_path = /var/vmail/%{user|username}/Maildir inbox = yes separator = / type = private mailbox Drafts { auto = subscribe special_use = "\\Drafts" } mailbox Junk { special_use = "\\Junk" } mailbox Trash { special_use = "\\Trash" } mailbox Sent { special_use = "\\Sent" } mailbox "Sent Messages" { special_use = "\\Sent" } } service imap-login { inet_listener imap { } inet_listener imaps { } } service submission-login { inet_listener submission { } } service lmtp { unix_listener lmtp { mode = 0666 } } service imap { } service pop3 { } service submission { } service auth { unix_listener auth-userdb { mode = 0666 } unix_listener auth-client { mode = 0666 } } service auth-worker { } service dict { unix_listener dict { } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl_server { cert_file = /etc/letsencrypt/live/scasl.ca/fullchain.pem key_file = /etc/letsencrypt/live/scasl.ca/privkey.pem } protocol lda { mail_plugins = $mail_plugins }
I assume I am missing a parameter that needs setting. Is it that, do I have something set incorrectly, or is it really a bug?
Cheers
Cam
When running v2.3, Dovecot correctly identifies both recipient and domain when receiving mail from Debian exim4 via dovecot-lda, with no flags set. With v2.4, whether the flags are set or not, Dovecot throws error 75. If lda_mailbox_autocreate is set to yes, it creates the mailuser vmail and delivers to /var/vmail/vmail/INBOX. Users are able to log in and read email as before. doveadm user admin@example.ca output is: field value uid 5000 gid 5000 home /var/vmail/admin mail_path /var/vmail/admin/Maildir Here is the full printout of doveconf -n.
2.4.1-4 (7d8c0e5759): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.1-4 (0a86619f)
OS: Linux 6.1.0-20-rt-686-pae i686 Debian 13.0 ext4
Hostname: football.scasl.ca
4 default setting changes since version 2.4.0
dovecot_config_version = 2.4.0 auth_debug = yes auth_debug_passwords = yes auth_mechanisms = plain login base_dir = /var/run/dovecot/ dovecot_storage_version = 2.4.0 first_valid_gid = 5000 first_valid_uid = 5000 fts_autoindex = yes fts_autoindex_max_recent_msgs = 999 fts_search_add_missing = yes hostname = scasl.ca listen = * :: login_trusted_networks = 209.121.143.10/32 mail_debug = yes mail_driver = maildir mail_gid = 5000 mail_home = /var/vmail/%{user|username} mail_inbox_path = /var/vmail/%{user|username}/Maildir/INBOX mail_path = /var/vmail/%{user|username}/Maildir mail_privileged_group = vmail mail_uid = 5000 postmaster_address = postmaster@scasl.ca protocols { imap = yes } sql_driver = mysql mysql scasl.ca { dbname = scasl host = localhost password = # port = 3306 user = scasl } userdb sql { iterate_query = SELECT email_username AS username, domain FROM league query = SELECT CONCAT('/var/vmail/',email_username) AS home, 5000 AS uid, 5000 AS gid FROM league WHERE email_username = '%{user|username}' } passdb sql { default_password_scheme = BLF-CRYPT query = SELECT password FROM login WHERE ID IN (SELECT ID FROM league WHERE email_username='%{user|username}') } maildir { very_dirty_syncs = yes } namespace inbox { mail_driver = maildir mail_home = /var/vmail/%{user|username} mail_inbox_path = /var/vmail/%{user|username}/Maildir/INBOX mail_path = /var/vmail/%{user|username}/Maildir inbox = yes separator = / type = private mailbox Drafts { auto = subscribe special_use = "\\Drafts" } mailbox Junk { special_use = "\\Junk" } mailbox Trash { special_use = "\\Trash" } mailbox Sent { special_use = "\\Sent" } mailbox "Sent Messages" { special_use = "\\Sent" } } service imap-login { inet_listener imap { } inet_listener imaps { } } service submission-login { inet_listener submission { } } service lmtp { unix_listener lmtp { mode = 0666 } } service imap { } service pop3 { } service submission { } service auth { unix_listener auth-userdb { mode = 0666 } unix_listener auth-client { mode = 0666 } } service auth-worker { } service dict { unix_listener dict { } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl_server { cert_file = /etc/letsencrypt/live/scasl.ca/fullchain.pem key_file = /etc/letsencrypt/live/scasl.ca/privkey.pem } protocol lda { mail_plugins = $mail_plugins }
I assume I am missing a parameter that needs setting. Is it that, do I have something set incorrectly, or is it really a bug? Cheers Cam
On 21/05/2025 22:34 EEST Cam Ellison via dovecot <dovecot@dovecot.org> wrote:
When running v2.3, Dovecot correctly identifies both recipient and domain when receiving mail from Debian exim4 via dovecot-lda, with no flags set.
With v2.4, whether the flags are set or not, Dovecot throws error 75. If lda_mailbox_autocreate is set to yes, it creates the mailuser vmail and delivers to /var/vmail/vmail/INBOX.
Users are able to log in and read email as before.
doveadm user admin@example.ca output is:
field value uid 5000 gid 5000 home /var/vmail/admin mail_path /var/vmail/admin/Maildir
Here is the full printout of doveconf -n.
2.4.1-4 (7d8c0e5759): /etc/dovecot/dovecot.conf
Pigeonhole version 2.4.1-4 (0a86619f)
OS: Linux 6.1.0-20-rt-686-pae i686 Debian 13.0 ext4
Hostname: football.scasl.ca
4 default setting changes since version 2.4.0
dovecot_config_version = 2.4.0 auth_debug = yes auth_debug_passwords = yes auth_mechanisms = plain login base_dir = /var/run/dovecot/ dovecot_storage_version = 2.4.0 first_valid_gid = 5000 first_valid_uid = 5000 fts_autoindex = yes fts_autoindex_max_recent_msgs = 999 fts_search_add_missing = yes hostname = scasl.ca listen = * :: login_trusted_networks = 209.121.143.10/32 mail_debug = yes mail_driver = maildir mail_gid = 5000 mail_home = /var/vmail/%{user|username} mail_inbox_path = /var/vmail/%{user|username}/Maildir/INBOX mail_path = /var/vmail/%{user|username}/Maildir mail_privileged_group = vmail mail_uid = 5000 postmaster_address = postmaster@scasl.ca protocols { imap = yes } sql_driver = mysql mysql scasl.ca { dbname = scasl host = localhost password = # port = 3306 user = scasl } userdb sql { iterate_query = SELECT email_username AS username, domain FROM league query = SELECT CONCAT('/var/vmail/',email_username) AS home, 5000 AS uid, 5000 AS gid FROM league WHERE email_username = '%{user|username}' } passdb sql { default_password_scheme = BLF-CRYPT query = SELECT password FROM login WHERE ID IN (SELECT ID FROM league WHERE email_username='%{user|username}') } maildir { very_dirty_syncs = yes } namespace inbox { mail_driver = maildir mail_home = /var/vmail/%{user|username} mail_inbox_path = /var/vmail/%{user|username}/Maildir/INBOX mail_path = /var/vmail/%{user|username}/Maildir inbox = yes separator = / type = private mailbox Drafts { auto = subscribe special_use = "\\Drafts" } mailbox Junk { special_use = "\\Junk" } mailbox Trash { special_use = "\\Trash" } mailbox Sent { special_use = "\\Sent" } mailbox "Sent Messages" { special_use = "\\Sent" } } service imap-login { inet_listener imap { } inet_listener imaps { } } service submission-login { inet_listener submission { } } service lmtp { unix_listener lmtp { mode = 0666 } } service imap { } service pop3 { } service submission { } service auth { unix_listener auth-userdb { mode = 0666 } unix_listener auth-client { mode = 0666 } } service auth-worker { } service dict { unix_listener dict { } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl_server { cert_file = /etc/letsencrypt/live/scasl.ca/fullchain.pem key_file = /etc/letsencrypt/live/scasl.ca/privkey.pem } protocol lda { mail_plugins = $mail_plugins }
I assume I am missing a parameter that needs setting. Is it that, do I have something set incorrectly, or is it really a bug?
Cheers
Cam
When running v2.3, Dovecot correctly identifies both recipient and domain when receiving mail from Debian exim4 via dovecot-lda, with no flags set. With v2.4, whether the flags are set or not, Dovecot throws error 75. If lda_mailbox_autocreate is set to yes, it creates the mailuser vmail and delivers to /var/vmail/vmail/INBOX. Users are able to log in and read email as before. doveadm user admin@example.ca output is: field value uid 5000 gid 5000 home /var/vmail/admin mail_path /var/vmail/admin/Maildir Here is the full printout of doveconf -n.
Can you add
log_debug=category=mail or category=auth
and try again, maybe the logs reveal something useful? My guess is that the parameters provided to lda are now somehow mixed and exim is using physical user as target user for dovecot, instead of the target email.
Aki
On 2025-05-21 21:41, Aki Tuomi via dovecot wrote:
Can you add
log_debug=category=mail or category=auth
and try again, maybe the logs reveal something useful? My guess is that the parameters provided to lda are now somehow mixed and exim is using physical user as target user for dovecot, instead of the target email.
Aki
Interesting idea. As noted in another response, I managed to solve the problem. I think the solution points at the problem - it looked as though Exim was supplying nothing, but it may have been providing it in a variable that Dovecot no longer receives.
I'll have a go.
Thank you
Cam
participants (2)
-
Aki Tuomi
-
Cam Ellison