lmtp panic with 2.3.16 (runnung ubuntu) and larger mails

Friedhelm Buescher friedhelm.dovecot at buescher.cc
Sun Aug 29 18:27:21 EEST 2021


Hi,

when sending larger Mails (> 1MB, for example a jpg attachment), the 
lmtp crashes:

#########################################################################
syslog:
Aug 29 17:05:34 mail dovecot: 
lmtp(xxxx)<720677><5RuZHDCiK2El/woAkAJtwA>: Panic: Buffer write out of 
range (0 + 1)
Aug 29 17:05:34 mail dovecot: 
lmtp(xxxx)<720677><5RuZHDCiK2El/woAkAJtwA>: Error: Raw backtrace:
/usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x41) [0x7f10ae1fb151]
  -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x22) [0x7f10ae1fb272]
-> /usr/lib/dovecot/libdovecot.so.0(+0x1092eb) [0x7f10ae2082eb]
-> /usr/lib/dovecot/libdovecot.so.0(+0x109387) [0x7f10ae208387]
-> /usr/lib/dovecot/libdovecot.so.0(+0x5d018) [0x7f10ae15c018]
-> /usr/lib/dovecot/libdovecot.so.0(+0x5bee1) [0x7f10ae15aee1]
-> 
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_binary_emit_integer+0x6a) 
[0x7f10ad79dfea]
-> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_binary_save+0x1e3) 
[0x7f10ad79c553]
-> 
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_binary_file_update_resource_usage+0x128) 
[0x7f10ad79dcc8]
-> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_binary_close+0x7d) 
[0x7f10ad79ab4d]
-> /usr/lib/dovecot/modules/lib90_sieve_plugin.so(+0x3f65) [0x7f10ae0f3f65]
-> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x17a) 
[0x7f10ae4490ea]
-> dovecot/lmtp(lmtp_local_default_deliver+0x1d8) [0x557cc4da83c8]
-> dovecot/lmtp(lmtp_local_data+0x5ac) [0x557cc4da8b1c]
-> dovecot/lmtp(client_default_cmd_data+0x191) [0x557cc4da74a1]
-> dovecot/lmtp(cmd_data_continue+0x180) [0x557cc4da7230]
-> /usr/lib/dovecot/libdovecot.so.0(+0x7c286) [0x7f10ae17b286]
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x6d) [0x7f10ae21e67d]
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x145) 
[0x7f10ae21fd15]
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x54) 
[0x7f10ae21e724]
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) [0x7f10ae21e890]
-> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x17) 
[0x7f10ae1913a7]
-> dovecot/lmtp(main+0x22f) [0x557cc4da5edf]
-> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f10adf250b3]
-> dovecot/lmtp(_start+0x2e) [0x557cc4da5fee]
Aug 29 17:05:34 mail dovecot: 
lmtp(xxxx)<720677><5RuZHDCiK2El/woAkAJtwA>: Fatal: master: 
service(lmtp): child 720677 killed with signal 6 (core dumped)

#########################################################################
uname -a
Linux mail 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 
x86_64 x86_64 x86_64 GNU/Linux


Installed Packages:
dovecot-lmtpd=2:2.3.16-2+ubuntu20.04 
dovecot-mysql=2:2.3.16-2+ubuntu20.04 
dovecot-imapd=2:2.3.16-2+ubuntu20.04 
dovecot-sieve=2:2.3.16-2+ubuntu20.04 
dovecot-pop3d=2:2.3.16-2+ubuntu20.04 
dovecot-lucene=2:2.3.16-2+ubuntu20.04 
dovecot-core=2:2.3.16-2+ubuntu20.04 
dovecot-managesieved=2:2.3.16-2+ubuntu20.04 
dovecot-solr=2:2.3.16-2+ubuntu20.04 postfix=3.4.13-0ubuntu1.1

Tried to downgrade to
dovecot-lmtpd=2:2.3.15-1+ubuntu20.04 
dovecot-mysql=2:2.3.15-1+ubuntu20.04 
dovecot-imapd=2:2.3.15-1+ubuntu20.04 
dovecot-sieve=2:2.3.15-1+ubuntu20.04 
dovecot-pop3d=2:2.3.15-1+ubuntu20.04 
dovecot-lucene=2:2.3.15-1+ubuntu20.04 
dovecot-core=2:2.3.15-1+ubuntu20.04 
dovecot-managesieved=2:2.3.15-1+ubuntu20.04 
dovecot-solr=2:2.3.15-1+ubuntu20.04 postfix=3.4.10-1ubuntu1
, which does not solve the error.

#########################################################################
config:
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 5.4.0-81-generic x86_64 Ubuntu 20.04.3 LTS ext4
# Hostname: xxxx
auth_verbose_passwords = plain
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_location = maildir:/var/maildirs/%u
mail_plugins = " quota acl fts fts_solr"
mail_privileged_group = mail
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
namespace {
   list = children
   location = maildir:%%h:INDEX=%h/shared/%%u:CONTROL=%h/shared/%%u
   prefix = shared.%%u.
   separator = .
   subscriptions = no
   type = shared
}
namespace inbox {
   inbox = yes
   location =
   prefix =
   separator = .
   type = private
}
passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   acl = vfile
   fts = solr
   fts_autoindex = yes
   fts_solr = url=http://127.0.0.1:8983/solr/dovecot/
   recipient_delimiter = .
   sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = " imap lmtp sieve pop3"
recipient_delimiter = .
service auth-worker {
   user = $default_internal_user
}
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0660
     user = postfix
   }
   unix_listener auth-userdb {
     group = postfix
     user = postfix
   }
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0660
     user = postfix
   }
   vsz_limit = 1 G
}
ssl = required
ssl_cert = </etc/letsencrypt/live/xxx/fullchain.pem
ssl_cipher_list = 
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocol lmtp {
   mail_plugins = " quota acl fts fts_solr sieve notify push_notification"
   postmaster_address = postmaster at xxx
}
protocol lda {
   mail_plugins = " quota acl fts fts_solr sieve fts fts_solr notify 
push_notification"
}
protocol imap {
   mail_plugins = quota imap_quota fts fts_solr
}


#########################################################################
sieve-file involved:
# Sieve Filter
# Generated by Ingo (http://www.horde.org/apps/ingo/) (05/17/2019, 
06:17:18 PM)
require ["fileinto", "imap4flags", "mailbox", "subaddress", "envelope", 
"variables", "body", "regex", "copy"];

# PDFs nach attachments speichern, damit diese lokal gespeichert werden 
koennen ..
if body :raw :regex ["filename=.+\\.pdf"]
{
   fileinto :create :copy "INBOX.attachments";
}





More information about the dovecot mailing list