Bug with lmtp_save_to_detail_mailbox

Aki Tuomi aki.tuomi at open-xchange.com
Wed Mar 15 14:07:52 UTC 2023


Documentation at https://doc.dovecot.org/configuration_manual/mail_location/

provides solution(s) for you:

SUBSCRIPTIONS
	
Specifies the filename used for storing subscriptions. The default is subscriptions. If you’re trying to avoid name collisions with a mailbox named subscriptions, then also consider setting MAILBOXDIR.

MAILBOXDIR

Specifies directory name under which all mailbox directories are stored. The default is empty unless otherwise described in the mailbox format pages.

Would either one be something you can consider? If you set MAILBOXDIR=mbox then your mailboxes go into ~/Maildir/mbox/

Aki

> On 15/03/2023 15:00 EET Dejan <me at dejanstrbac.com> wrote:
> 
>  
> Config below.
> 
> I assumed the same at first, but deliveries for other "details" work 
> without issues. Dovecot's 'subscriptions' file is present in the maildir 
> which seems to conflict with the mailbox lookup.
> 
> Dejan
> 
> -----
> 
> 
> # 2.3.18 (9dd8408c18): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.18 (0bc28b32)
> # OS: FreeBSD 13.0-RELEASE-p13 amd64  zfs
> auth_cache_negative_ttl = 0
> auth_cache_ttl = 0
> auth_failure_delay = 8 secs
> auth_master_user_separator = *
> auth_mechanisms = plain login
> default_client_limit = 10000
> default_process_limit = 1000
> default_vsz_limit = 2 G
> first_valid_gid = 500
> imap_idle_notify_interval = 5 mins
> last_valid_gid = 10000
> last_valid_uid = 10000
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> listen = ::
> lmtp_save_to_detail_mailbox = yes
> log_path = /var/log/dovecot
> mail_attribute_dict = file:%h/Maildir/dovecot-attributes
> mail_gid = 10000
> mail_location = 
> maildir:/var/mails/%Ld/%Ln/Maildir:LAYOUT=fs:INDEX=/var/mails/%Ld/%Ln/flatcurve_index
> mail_plugins = " zlib quota quota_clone welcome fts fts_flatcurve"
> mail_save_crlf = yes
> mail_uid = 10000
> mail_vsize_bg_after_count = 100
> mailbox_list_index_very_dirty_syncs = yes
> maildir_empty_new = yes
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope 
> encoded-character vacation subaddress comparator-i;ascii-numeric 
> relational regex imap4flags copy include variables body enotify 
> environment mailbox date index ihave duplicate mime foreverypart 
> extracttext imapsieve vnd.dovecot.imapsieve
> metric auth_failures {
>    filter = event=auth_request_finished AND NOT success=yes
> }
> metric auth_success {
>    filter = event=auth_request_finished AND success=yes
> }
> metric imap_command {
>    filter = event=imap_command_finished
>    group_by = cmd_name tagged_reply_state
> }
> metric mail_delivery {
>    filter = event=mail_delivery_finished
>    group_by = duration:exponential:1:5:10
> }
> metric smtp_command {
>    filter = event=smtp_server_command_finished
>    group_by = cmd_name status_code duration:exponential:1:5:10
> }
> namespace inbox {
>    inbox = yes
>    location =
>    mailbox Archive {
>      auto = create
>      special_use = \Archive
>    }
>    mailbox Drafts {
>      auto = subscribe
>      special_use = \Drafts
>    }
>    mailbox Junk {
>      auto = subscribe
>      autoexpunge = 30 days
>      special_use = \Junk
>    }
>    mailbox Sent {
>      auto = subscribe
>      special_use = \Sent
>    }
>    mailbox "Sent Messages" {
>      special_use = \Sent
>    }
>    mailbox Trash {
>      auto = subscribe
>      autoexpunge = 60 days
>      special_use = \Trash
>    }
>    prefix =
>    separator = /
> }
> passdb {
>    args = /usr/local/etc/dovecot/deny.%s
>    deny = yes
>    driver = passwd-file
> }
> passdb {
>    args = /usr/local/etc/dovecot/master-users
>    driver = passwd-file
>    master = yes
>    pass = yes
> }
> passdb {
>    args = scheme=SHA512-CRYPT username_format=%u 
> /usr/local/etc/dovecot/passwd
>    default_fields = ssl=any-cert userdb_home=/var/mails/%Ld/%Ln 
> userdb_uid=10000 userdb_gid=10000
>    driver = passwd-file
> }
> passdb {
>    args = scheme=SHA512-CRYPT username_format=%u 
> /usr/local/etc/dovecot/passwd-tmp
>    default_fields = ssl=any-cert userdb_home=/var/mails/%Ld/%Ln 
> userdb_uid=10000 userdb_gid=10000
>    driver = passwd-file
> }
> plugin {
>    fts = flatcurve
>    fts_flatcurve_commit_limit = 500
>    fts_flatcurve_max_term_size = 30
>    fts_flatcurve_min_term_size = 2
>    fts_flatcurve_optimize_limit = 10
>    fts_flatcurve_rotate_size = 5000
>    fts_flatcurve_rotate_time = 5000
>    fts_flatcurve_substring_search = no
>    fts_languages = en es de da fi fr it nl no pt ro ru sv tr
>    fts_tokenizer_generic = algorithm=simple
>    fts_tokenizers = generic email-address
>    imapsieve_mailbox1_before = 
> file:/usr/local/etc/dovecot/sieve/report-spam.sieve
>    imapsieve_mailbox1_causes = COPY APPEND
>    imapsieve_mailbox1_name = Junk
>    imapsieve_mailbox2_before = 
> file:/usr/local/etc/dovecot/sieve/report-ham.sieve
>    imapsieve_mailbox2_causes = COPY
>    imapsieve_mailbox2_from = Junk
>    imapsieve_mailbox2_name = *
>    last_login_dict = redis:host=127.0.0.1:port=6379:db=1
>    quota = count:Mailbox quota
>    quota_clone_dict = redis:host=127.0.0.1:port=6379:db=1
>    quota_max_mail_size = 800M
>    quota_vsizes = yes
>    recipient_delimiter = +
>    sieve = file:~/sieve;active=~/.dovecot.sieve
>    sieve_before = /usr/local/etc/dovecot/sieve/global.sieve
>    sieve_before2 = /var/mails/%Ld/%Ln/sieve-before
>    sieve_default_name = Master Script
>    sieve_duplicate_default_period = 1h
>    sieve_duplicate_max_period = 1d
>    sieve_editheader_max_header_size = 1k
>    sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment 
> +editheader
>    sieve_max_redirects = 25
>    sieve_pipe_bin_dir = /usr/local/etc/dovecot/sieve
>    sieve_plugins = sieve_imapsieve sieve_extprograms
>    sieve_quota_max_scripts = 20
>    sieve_redirect_envelope_from = recipient
>    sieve_vacation_default_period = 7d
>    sieve_vacation_dont_check_recipient = no
>    sieve_vacation_max_period = 0
>    sieve_vacation_min_period = 1d
>    sieve_vacation_send_from_recipient = yes
>    welcome_script = welcome %d %n
> }
> protocols = imap pop3 lmtp sieve
> service auth-worker {
>    client_limit = 1
>    process_limit = 50
>    service_count = 1
>    user = $default_internal_user
> }
> service auth {
>    client_limit = 25000
>    process_limit = 1
>    unix_listener auth-userdb {
>      group = $default_internal_user
>      mode = 0666
>      user = $default_internal_user
>    }
>    user = $default_internal_user
> }
> service dict {
>    process_limit = 6
>    user = $default_internal_user
> }
> service doveadm {
>    inet_listener {
>      port = 9999
>      ssl = yes
>    }
>    inet_listener http {
>      port = 9010
>      ssl = yes
>    }
>    vsz_limit = 2 G
> }
> service imap-login {
>    inet_listener imap {
>      port = 0
>    }
>    inet_listener imaps {
>      port = 993
>      ssl = yes
>    }
>    process_min_avail = 12
>    service_count = 0
>    vsz_limit = 1 G
> }
> service imap {
>    client_limit = 1
>    idle_kill = 5 mins
>    process_limit = 10000
>    service_count = 1
>    vsz_limit = 2 G
> }
> service indexer-worker {
>    process_limit = 25
>    vsz_limit = 2 G
> }
> service lmtp {
>    inet_listener lmtp {
>      port = 24
>      ssl = yes
>    }
>    process_limit = 500
>    process_min_avail = 10
>    vsz_limit = 2 G
> }
> service managesieve-login {
>    client_limit = 1000
>    inet_listener sieve {
>      port = 4190
>      ssl = yes
>    }
>    process_min_avail = 6
>    service_count = 0
>    vsz_limit = 512 M
> }
> service managesieve {
>    process_limit = 1024
> }
> service pop3-login {
>    inet_listener pop3 {
>      port = 0
>    }
>    inet_listener pop3s {
>      port = 995
>      ssl = yes
>    }
>    process_min_avail = 12
>    service_count = 0
>    vsz_limit = 1 G
> }
> service pop3 {
>    client_limit = 1
>    idle_kill = 5 mins
>    process_limit = 10000
>    service_count = 200
>    vsz_limit = 2 G
> }
> service stats {
>    inet_listener http {
>      port = 9900
>    }
> }
> service submission-login {
>    inet_listener submission {
>      port = 0
>    }
> }
> service welcome {
>    executable = script /usr/local/etc/dovecot/welcome/welcome.sh
>    unix_listener welcome {
>      user = vmail
>    }
>    user = vmail
> }
> ssl = required
> ssl_cipher_list = 
> ALL:!DH:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW at STRENGTH
> ssl_client_ca_file = /usr/local/etc/dovecot/ca-chain.cert.pem
> ssl_prefer_server_ciphers = yes
> submission_host = [::1]:9125
> userdb {
>    args = username_format=%u /usr/local/etc/dovecot/passwd
>    default_fields = home=/var/mails/%Ld/%Ln uid=10000 gid=10000
>    driver = passwd-file
> }
> userdb {
>    args = username_format=%u /usr/local/etc/dovecot/passwd-tmp
>    default_fields = home=/var/mails/%Ld/%Ln uid=10000 gid=10000
>    driver = passwd-file
> }
> verbose_proctitle = yes
> protocol lmtp {
>    mail_fsync = optimized
>    mail_plugins = " zlib quota quota_clone welcome fts fts_flatcurve 
> sieve last_login"
>    plugin {
>      last_login_dict = redis:host=127.0.0.1:port=6379:db=1
>    }
> }
> protocol !indexer-worker {
>    mail_vsize_bg_after_count = 0
> }
> protocol imap {
>    imap_metadata = yes
>    mail_max_userip_connections = 50
>    mail_plugins = " zlib quota quota_clone welcome fts fts_flatcurve 
> imap_sieve last_login"
> }
> protocol sieve {
>    mail_max_userip_connections = 20
> }
> protocol pop3 {
>    mail_plugins = " zlib quota quota_clone welcome fts fts_flatcurve 
> last_login"
> }
> 
> On 15.03.23 12:47, Aki Tuomi wrote:
> > 
> >> On 15/03/2023 13:12 EET Dejan <me at dejanstrbac.com> wrote:
> >>
> >>   
> >>> lmtp_save_to_detail_mailbox = yes
> >>
> >> Plus-delivery conflicts with existing, reserved files such as
> >> "subscriptions":
> >>
> >> Message for kim+subscriptions@ results in:
> >>
> >> lmtp(kim@***.com)<14493><SK7sEvaHEWSdOAAAvAYmHA>: Error:
> >> ....stat(/var/mails/***/kim/Maildir/subscriptions/tmp) failed: Not a
> >> directory
> >>
> >> Version: 2.3.18
> > 
> > Hi!
> > 
> > Can you provide your doveconf -n output, I think this might be a misconfiguration.
> > 
> > Aki


More information about the dovecot mailing list