May 20May 20 Hello, latest updates to dovecot breaks imap and pop. File /etc/dovecot/dovecot-sql.conf.ext is oblolete and dovecot will mnot start any more. Config file: disable_plaintext_auth = no auth_mechanisms = plain login !include auth-sql.conf.ext mail_location = mbox:~/mail:INBOX=/var/mail/%u namespace inbox { inbox = yes } mail_privileged_group = mail service auth { # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix } # Exim4 smtp-auth unix_listener auth-client { mode = 0660 user = mail #group = Debian-exim } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl = yes ssl_cert = </etc/ssl/custom/system.com.pem ssl_key = </etc/ssl/custom/system.com.key ssl_dh = </usr/share/dovecot/dh.pem postmaster_address = postmaster@isp-template.system.com protocol imap { mail_plugins = $mail_plugins quota imap_quota } pop3_logout_format = in=%i out=%o top=%t/%p, retr=%r/%b, del=%d/%m, size=%s plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_dir = ~/sieve } plugin { quota = maildir:User quota } Are the any developments on debian trixie or available fixes for dovecot?
May 21May 21 Author Hello, Just take a look at this fix for additional config: auth_allow_cleartext = yes auth_mechanisms = plain login !include auth-sql.conf.ext mail_driver = mbox = mbox mail_inbox_path = /var/mail/%u namespace inbox { inbox = yes } mail_privileged_group = mail service auth { # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix } # Exim4 smtp-auth unix_listener auth-client { mode = 0660 user = mail #group = Debian-exim } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl = yes ssl_server_cert_file = /etc/ssl/lets-encrypt/mail/fullchain.cer ssl_server_key_file = /etc/ssl/lets-encrypt/mail/server.key ssl_server_dh_file = /usr/share/dovecot/dh.pem postmaster_address = postmaster@service.com protocol imap { mail_plugins { quota = yes imap_quota = yes } } pop3_logout_format = in=%i out=%o top=%t/%p, retr=%r/%b, del=%d/%m, size=%s ## Sieve mail_plugins { sieve = yes } sieve_script personal { driver = file path = ~/sieve active_path = ~/.dovecot.sieve } ## Quota mail_plugins { quota = yes } quota "User quota" { driver= Maildir++ quota } quota "User quota" { warning warn-95 { quota_storage_percentage = 95 execute quota-warning { args = 95 %{user} } } warning warn-80 { quota_storage_percentage = 80 execute quota-warning { args = 80 %{user} } } } Later I will check how to fix file /etc/dovecot/dovecot-sql.conf.ext.
May 21May 21 it would be more helpful to see a diff, the actual changes necessary or at least the error message dovecot throws
May 21May 21 Author Just look in the first post and use a diff tool to compare it. Most thins are renamings. I guess this will also affect debian bookworm with next release of dovecot.
May 21May 21 Wow thanks...little contribution hurts too much, got it....at least it's free right? ...
May 21May 21 Author Nope, I#m just in hurry and I haven't got time to write more. I will post the diffs after finish.
May 21May 21 Author Here is the config I thik it should work - with diffs: #disable_plaintext_auth = no auth_allow_cleartext = yes auth_mechanisms = plain login !include auth-sql.conf.ext #mail_location = mbox:~/mail:INBOX=/var/mail/%u mail_driver = mbox = mbox mail_inbox_path = /var/mail/%u namespace inbox { inbox = yes } mail_privileged_group = mail service auth { # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix } # Exim4 smtp-auth unix_listener auth-client { mode = 0660 user = mail #group = Debian-exim } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl = yes #ssl_cert = </etc/ssl/lets-encrypt/mail/fullchain.cer ssl_server_cert_file = /etc/ssl/lets-encrypt/mail/fullchain.cer #ssl_key = </etc/ssl/lets-encrypt/mail/server.key ssl_server_key_file = /etc/ssl/lets-encrypt/mail/server.key #ssl_dh = </usr/share/dovecot/dh.pem ssl_server_dh_file = /usr/share/dovecot/dh.pem postmaster_address = postmaster@service.com #protocol imap { # mail_plugins = $mail_plugins quota imap_quota #} protocol imap { mail_plugins { quota = yes imap_quota = yes } } pop3_logout_format = in=%i out=%o top=%t/%p, retr=%r/%b, del=%d/%m, size=%s ## LDA protocol lda { mail_plugins { sieve = yes } } ## Sieve mail_plugins { sieve = yes } #plugin { # sieve = file:~/sieve;active=~/.dovecot.sieve # sieve_dir = ~/sieve #} sieve_script personal { driver = file path = ~/sieve active_path = ~/.dovecot.sieve } mailbox Spam { ## From elsewhere to Spam folder sieve_script report-spam { type = before cause = copy path = /etc/dovecot/sieve/report-spam.sieve } } ## From Spam folder to elsewhere imapsieve_from Spam { sieve_script report-ham { type = before cause = copy path = /etc/dovecot/sieve/report-ham.sieve } } ## Quota mail_plugins { quota = yes } #plugin { # quota = maildir:User quota #} quota "User quota" { driver= Maildir++ quota } quota "User quota" { warning warn-95 { quota_storage_percentage = 95 execute quota-warning { args = 95 %{user} } } warning warn-80 { quota_storage_percentage = 80 execute quota-warning { args = 80 %{user} } } } ##Sql #driver = mysql #connect = "host=127.0.0.1 dbname=froxlor user=froxlor password=FROXLOR_MYSQL_PASSWORD" sql_driver = mysql mysql 127.0.0.1 { user = froxlor password = FROXLOR_DBPASSWORD dbname = froxlor } #password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve'))) iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)" passdb sql { default_password_scheme = CRYPT query = SELECT username AS user, password_enc AS password FROM mail_users WHERE (username = '%{user}' OR email = '%{user}') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)" } #user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') userdb sql { query = SELECT CONCAT(homedir, maildir) AS home, 'maildir' as mail_driver, CONCAT(homedir, maildir) AS mail_path, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%{user}' OR email = '%{user}') } For password query is it enough to retrieve only neccessary fields user and password? Old entries are comment out with # obove new statement.
May 21May 21 Author Dovecot 2.4 is only available as community edition with feature cut. I do not know exactly how this affects froxlor functionality. but it seems to be ok. The only thing i cannot find in new config ist sieve after.d config to move spam marked mails to junk folder. So are there any plans to use an alternative to dovecot for the future? Dovecot 2.4 is also available for debian bookworm with dovecot repo
May 21May 21 11 minutes ago, MeinerEiner said: So are there any plans to use an alternative to dovecot for the future? no We provide default configs for the system defaults, so for bookworm, it's dovecot 2.3, as of now, trixie will ship with dovecot 2.4 and as said in my first reply: On 5/20/2025 at 7:57 AM, d00p said: Trixie is not released yet. Possible issues will be addressed then.
August 14Aug 14 Hi, so.... Trixie is released.... and... Dovecot is broken (I was a bit reckless yesterday and after a successful desktop upgrade i did the server upgrade) However, .... I adjusted the configs according to @MeinerEiner´ s hints. Those helped a great deal. But it's still not working: quota throws da(59714): Fatal: Couldn't load required plugin /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: dlopen() failed: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so: undefined symbol: command_unregister so i disabled it - I don't care for the moment Login is not working. I adjusted the sql part to userdb sql { iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)" query = SELECT CONCAT(homedir, maildir) AS home, 'maildir' as mail_driver, CONCAT(homedir, maildir) AS mail_path, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%{user}' OR email = '%{user}') } #password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (> passdb sql { # default_password_scheme = CRYPT query = SELECT username AS user, password_enc AS password FROM mail_users WHERE (username = '%{user}' OR email = '%{user}') AND ((imap = 1 AND '%{protocol | lower}' = 'imap') OR (pop3 = 1 AND '%{protocol | lower}' = 'pop3') OR ((postfix = 'Y' AND '%{protocol | lower}' = 'smtp') OR (postfix = 'Y' AND '%{protocol | lower}' = 'sieve'))) } Now, seems to work, but not really completely. I still get dovecot: imap(mail@address.com)<60163><d5PoI088l/FbAjZ0>: Error: Mailbox INBOX: Failed to autocreate mailbox: Permission denied Any hint what's still missing? /Edit: Note: the mailboxes etc are already (or still) available on the filesystem. So, why the permissions problem and, more important, why the autocreate?
August 14Aug 14 we are already working on trixie-configuration templates, please don't be impatient, people have to work and we simply cannot work on froxlor 24/7 Here's what we got so far, use with caution (dovecot/conf.d/99-froxlor.conf): auth_allow_cleartext = yes auth_mechanisms = plain login sql_driver = mysql mysql <SQL_HOST> { user = <SQL_UNPRIVILEGED_USER> password = <SQL_UNPRIVILEGED_PASSWORD> dbname = <SQL_DB> } passdb sql { query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, "maildir" as userdb_mail_driver, CONCAT(homedir, maildir) AS userdb_mail_path, CONCAT(quota, 'M') as userdb_quota_storage_size FROM mail_users WHERE (username = '%{user}' OR email = '%{user}') AND ((imap = 1 AND '%{protocol | lower}' = 'imap') OR (pop3 = 1 AND '%{protocol | lower}' = 'pop3') OR ((postfix = 'Y' AND '%{protocol | lower}' = 'smtp') OR (postfix = 'Y' AND '%{protocol | lower}' = 'sieve'))) } userdb sql { query = SELECT CONCAT(homedir, maildir) AS home, "maildir" as mail_driver, CONCAT(homedir, maildir) AS mail_path, uid, gid, CONCAT(quota, 'M') as quota_storage_size FROM mail_users WHERE (username = '%{user}' OR email = '%{user}') } namespace inbox { inbox = yes } mail_privileged_group = mail service auth { # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix } # Exim4 smtp-auth unix_listener auth-client { mode = 0660 user = mail #group = Debian-exim } } service stats { unix_listener stats-reader { group = vmail mode = 0666 } unix_listener stats-writer { group = vmail mode = 0666 } } ssl = yes ssl_server_cert_file = <SSL_CERT_FILE> ssl_server_key_file = <SSL_KEY_FILE> ssl_server_dh_file = /usr/share/dovecot/dh.pem postmaster_address = postmaster@<SERVERNAME> protocol imap { mail_plugins { quota = yes imap_quota = yes } } pop3_logout_format = in=%i out=%o top=%t/%p, retr=%r/%b, del=%d/%m, size=%s mail_plugins { sieve = yes } sieve_script personal { driver = file path = ~/sieve active_path = ~/.dovecot.sieve } mail_plugins { quota = yes }
August 14Aug 14 I appreciate any feedback (and your and your teams work) and please, don't feel pressured. (And I don't blame your or your team for my mistakes/carelessness) I compared the settings but it still does not work. The error remains the same. I am thinking about backing up the whole current config in /etc and remove/reinstall the dovecot packages. Do you see any problems with that? Mails, MySQL-Data should all remain in place, right? Do I then just add the 99-froxlor.conf or do I have to move other config files away?
August 14Aug 14 as I don't know you system-state (e.g. upgraded from earlier versions etc.) there might be old config files all around, for dovecot, we basically only need the 99-froxlor.conf. Regarding your poermission issue, verify that all data in /var/customers/mail (default) is owned by vmail:vmail
August 14Aug 14 Ah I forgot to mention that: I upgraded over the last years from Buster (with Froxlor 1. or 0.x) via Bullseye and Bookworm (somewhere in between came Froxlor 2.x) now to Trixie. So the installation is running since a couple of years. The /var/customers/mail and its subfolders are (still) owned by vmail:vmail. I also suspect some too old configs or config/values. So now, I moved the exsting Dovecot configuration files away and reinstalled Dovecot apt-get -o DPkg::options::="--force-confmiss" install dovecot-core dovecot-imapd dovecot-managesieved dovecot-mysql dovecot-pop3d dovecot-sieve Then, I moved the new /etc/dovecot/conf.d -> /etc/dovecot/conf.d.frx and added the 99-froxlor.conf to a clean /etc/dovecot/conf.d folder. Still have to disable sieve, though: Error: Couldn't load required plugin /usr/lib/dovecot/modules/lib90_sieve_plugin.so: dlopen() failed: /usr/lib/dovecot/modules/lib90_sieve_plugin.so: undefined symbol: mail_deliver_ctx_get_log_var_expand_table -> This brought me one step (or two) ahaed: Login looks good, no error messages. -> I can send emails again to the outside world. -> I can receive emails originating from my server (either cronjobs or any other email from an emailadress configured on this server) BUT unfortunately, receiving from the outside world does still not work yet. Any idea where I can look next? A typical dialog looks like this: 2025-08-14T12:38:54.764069+02:00 v220240687080274156 postfix/smtpd[81709]: connect from anoubis.emsgrid.com[89.25.175.25] 2025-08-14T12:38:54.797207+02:00 v220240687080274156 postfix/smtpd[81709]: discarding EHLO keywords: CHUNKING 2025-08-14T12:38:54.931708+02:00 v220240687080274156 postfix/smtpd[81709]: discarding EHLO keywords: CHUNKING 2025-08-14T12:38:55.027763+02:00 v220240687080274156 policyd-spf[81711]: : prepend Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=89.25.175.25; helo=anoubis.emsgrid.com; envelope-from=sm.22324005868.ot0fgncnhj3ts44401-info=asdf.com@smgrid.com; receiver=myserver.com 2025-08-14T12:38:55.027941+02:00 v220240687080274156 postfix/smtpd[81709]: warning: connect to 127.0.0.1:12340: Connection refused 2025-08-14T12:38:55.028001+02:00 v220240687080274156 postfix/smtpd[81709]: warning: problem talking to server 127.0.0.1:12340: Connection refused 2025-08-14T12:38:56.028308+02:00 v220240687080274156 postfix/smtpd[81709]: warning: connect to 127.0.0.1:12340: Connection refused 2025-08-14T12:38:56.028570+02:00 v220240687080274156 postfix/smtpd[81709]: warning: problem talking to server 127.0.0.1:12340: Connection refused 2025-08-14T12:38:56.028623+02:00 v220240687080274156 postfix/smtpd[81709]: NOQUEUE: reject: RCPT from anoubis.emsgrid.com[89.25.175.25]: 451 4.3.5 <x.y@myserver.com>: Recipient address rejected: Server configuration problem; from=<sm.22324005868.ot0fgncnhj3ts44401-info=asdf.com@smgrid.com> to=<x.y@myserver.com> proto=ESMTP helo=<anoubis.emsgrid.com> 2025-08-14T12:38:56.028657+02:00 v220240687080274156 postfix/smtpd[81709]: using backwards-compatible default setting smtpd_relay_before_recipient_restrictions=no to reject recipient "x.y@myserver.com" from client "anoubis.emsgrid.com[89.25.175.25]" 2025-08-14T12:38:56.061914+02:00 v220240687080274156 postfix/smtpd[81709]: disconnect from anoubis.emsgrid.com[89.25.175.25] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=6/8 "server configuration problem" is not so helpful and just a "connection refused" also not. What should be running on 12340?
August 14Aug 14 Can't tell what's wrong, as said, we're not done integrating and testing the new configuration templates. No idea what service is integrated to your postfix that listens to 12340...maybe check the main.cf from postfix to see what's in there, it's definetly not part of our default configs
August 14Aug 14 The main.cf from Postfix and an internet search brought me back to an old topic of mine 🧐 -> quota... does not show any obvious errors, but still does not work again (as it shoudl) I removed it and that's good enough for now for me. I'll investigate about sieve and quote later. Thank you very much for your time and input!
August 14Aug 14 Regarding sieve: this works now on my server: Note the protocol wrapping around mail_plugins (and I am using the old path of the scripts) protocol lda { mail_plugins { sieve = yes } } sieve_script personal { driver = file # path = ~/sieve # active_path = ~/.dovecot.sieve path = /var/customers/mail/sieve/%{user | domain}/%{user | username} active_path = /var/customers/mail/sieve/%{user | domain}/%{user | username}/.dovecot.sieve }
August 14Aug 14 5 minutes ago, alex84 said: path = /var/customers/mail/sieve/%{user | domain}/%{user | username} active_path = /var/customers/mail/sieve/%{user | domain}/%{user | username}/.dovecot.sieve i would not do that as the homedir and maildir is read from the froxlor database and depending on how old your setup is, the path's may not always be in that exact format! path = ~/sieve uses the HOMEDIR of the email-account which should then be correct imho The `protocol lda { ... }` around the mail_plugins seems to be correct, yes, thanks
Create an account or sign in to comment