Dear Carlos, it looks like you are using mdbox. Those files only get a marker for deletion of mails. The actual deletion needs to be done by purging the mailboxes…
See Timos writing: http://www.dovecot.org/list/dovecot/2010-July/050778.html And the wiki here: http://wiki2.dovecot.org/Tools/Doveadm/Purge This will rewrite the mdbox file without the deleted emails. Thus only then the emails are actually deleted. Philon > Am 05.10.2015 um 21:22 schrieb Carlos Baptista <[email protected]>: > > Hi, > > I have a dovecot installation with a strange problem: all the mails stays > in storage after deleted from users mailbox. If user logon after the mails > are deleted, they don't receive them any more, but the m.## files aren’t > deleted. This happens with pop3 (default for this installation) and/or imap. > > The dovecot is installed along postfix with mysql and multi-domains support > > Here's the dovecot conf > ######################## > > > dovecot -n > # 2.1.7: /etc/dovecot/dovecot.conf > # OS: Linux 2.6.32-042stab111.11 x86_64 Debian 7.9 > auth_mechanisms = plain login > first_valid_uid = 111 > last_valid_uid = 111 > lda_mailbox_autocreate = yes > mail_debug = yes > mail_gid = vmail > mail_plugins = " quota" > mail_privileged_group = vmail > mail_uid = vmail > namespace inbox { > inbox = yes > location = > mailbox Drafts { > special_use = \Drafts > } > mailbox Junk { > special_use = \Junk > } > mailbox Sent { > special_use = \Sent > } > mailbox "Sent Messages" { > special_use = \Sent > } > mailbox Trash { > special_use = \Trash > } > prefix = > } > passdb { > args = /etc/dovecot/dovecot-sql.conf > driver = sql > } > plugin { > mail_log_events = delete undelete expunge copy mailbox_delete > mailbox_rename > mail_log_fields = uid box msgid size > quota = dict:User quota::file:%h/mail/dovecot-quota > quota_rule = *:storage=500MB > } > postmaster_address = [email protected] > protocols = " imap pop3" > service auth { > unix_listener /var/spool/postfix/private/auth { > group = postfix > mode = 0660 > user = postfix > } > } > service lmtp { > unix_listener /var/spool/postfix/private/dovecot-lmtp { > group = postfix > mode = 0660 > user = postfix > } > } > ssl_cert = </etc/dovecot/dovecot.pem > ssl_key = </etc/dovecot/private/dovecot.pem > userdb { > driver = prefetch > } > userdb { > args = /etc/dovecot/dovecot-sql.conf > driver = sql > } > protocol lmtp { > mail_plugins = " quota sieve" > } > protocol lda { > mail_plugins = " quota" > } > protocol imap { > mail_plugins = " quota imap_quota" > } > > ############################### > > Here is an example of log file with debug > > Oct 02 17:50:38 auth: Debug: auth client connected (pid=11621) > Oct 02 17:50:38 auth: Debug: client in: AUTH 1 PLAIN > service=pop3 secured session=Xiif9iEhmgBV80+u > lip=xxx.xxx.xxx.xxx rip=xxx.xxx.xxx.xxx lport=995 > rport=53914 resp=<hidden> > Oct 02 17:50:38 auth-worker(11561): Debug: > sql([email protected],xxx.xxx.xxx.xxx): > query: /* dovecot-sql.conf password_query */ SELECT > '/var/vmail/xxxxxx.xx/carla.franjoso' AS userdb_home, 'mdbox:~/mail' AS > userdb_mail, 111 AS userdb_uid, 114 AS userdb_gid, CONCAT('*:bytes=', > CAST(m.quota AS CHAR)) AS userdb_quota_rule, CONCAT(m.local_part, '@', > d.name) AS user, m.password AS password FROM mailboxes AS m LEFT JOIN > domains AS d ON m.domain_id = d.id WHERE m.local_part = 'carla.franjoso' > AND d.name = 'xxxxxxx.xx' AND m.is_active AND d.is_active > Oct 02 17:50:38 auth: Debug: client out: OK 1 > [email protected] > Oct 02 17:50:38 auth: Debug: master in: REQUEST 3537633281 11621 1 > 41ef179d4a37a603ce38c43fab768f78 > Oct 02 17:50:38 auth: Debug: > prefetch([email protected],xxx.xxx.xxx.xxx,<Xiif9iEhmgBV80+u>): > success > Oct 02 17:50:38 auth: Debug: master out: USER 3537633281 > [email protected] home=/var/vmail/xxxxxxxx/carla.franjoso > mail=mdbox:~/mail uid=1 > 11 gid=114 quota_rule=*:bytes=104857600 > Oct 02 17:50:38 pop3: Debug: Loading modules from directory: > /usr/lib/dovecot/modules > Oct 02 17:50:38 pop3: Debug: Module loaded: > /usr/lib/dovecot/modules/lib10_quota_plugin.so > Oct 02 17:50:38 pop3: Debug: Added userdb setting: mail=mdbox:~/mail > Oct 02 17:50:38 pop3: Debug: Added userdb setting: > plugin/quota_rule=*:bytes=104857600 > Oct 02 17:50:38 pop3([email protected]): Debug: Effective uid=111, > gid=114, home=/var/vmail/xxxxxxxx.xx/carla.franjoso > Oct 02 17:50:38 pop3([email protected]): Debug: Quota root: name=User > quota backend=dict > args=:file:/var/vmail/xxxxxxxxx.xx/carla.franjoso/mail/dovecot-quota > Oct 02 17:50:38 pop3([email protected]): Debug: Quota rule: root=User > quota mailbox=* bytes=104857600 messages=0 > Oct 02 17:50:38 pop3([email protected]): Debug: dict quota: > [email protected], > uri=file:/var/vmail/xxxxxx,xx/carla.franjoso/mail/dovecot-quot > a, noenforcing=0 > Oct 02 17:50:38 pop3([email protected]): Debug: Namespace inbox: > type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, > subscriptions=yes locatio > n=mdbox:~/mail > Oct 02 17:50:38 pop3([email protected]): Debug: fs: root=/var/vmail/ > assis.pt/carla.franjoso/mail, index=, control=, inbox=, alt= > Oct 02 17:50:38 pop3([email protected]): Debug: Namespace : Using > permissions from /var/vmail/xxxxxxx.xx/carla.franjoso/mail: mode=0700 > gid=-1 > > > What is "gid=-1" at the end of the log? > > Can anyone help? > > Thanks > Carlos Baptista
