[Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Robert Schetterer
robert at schetterer.org
Mon Aug 3 10:52:08 EEST 2009
Timo Sirainen schrieb:
> On Aug 3, 2009, at 3:26 AM, Robert Schetterer wrote:
>
>> Timo Sirainen schrieb:
>>> On Fri, 2009-07-31 at 17:21 +0200, Robert Schetterer wrote:
>>>> Hi Timo,
>>>> so now its clear, the mail
>>>> did not got deleted if i now do
>>>>
>>>> Info: robert at schetterer.com/Trash: no messages left
>>>
>>> So, it worked? "no messages left" means if you didn't give --test it
>>> would have deleted all messages from the mailbox.
>>>
>> Hi Timo, no it didnt work
>> i repeated the test since then twice
>> the mail was not deleted
>
> Well, that message says that at the time there was no messages left in
> the Trash. Do you mean that there were? Show me now what it says with:
>
> - expire-tool --test
> - FETCH 1 X-SAVEDATE shows in a mailbox that should have expired messages
> - SELECT * FROM .. showing the database row for the mailbox that should
> have expired messages
>
Ok Timo, i start a new test to make sure
mysql> select mailbox, from_unixtime(expire_stamp), username from
expireplugin;
+---------+-----------------------------+-----------------------+
| mailbox | from_unixtime(expire_stamp) | username |
+---------+-----------------------------+-----------------------+
| Trash | 2009-08-04 09:40:21 | robert at schetterer.com |
+---------+-----------------------------+-----------------------+
1 row in set (0.00 sec)
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH
ESORT SEARCHRES WITHIN CONTEXT=SEARCH ACL RIGHTS=texk QUOTA] Logged in
2 select Trash
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk
Junk \*)] Flags permitted.
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1240758078] UIDs valid
* OK [UIDNEXT 89] Predicted next UID
* OK [HIGHESTMODSEQ 123]
2 OK [READ-WRITE] Select completed.
3 fetch 1:* (internaldate x-savedate)
* 1 FETCH (INTERNALDATE "03-Aug-2009 09:40:16 +0200" X-SAVEDATE
"03-Aug-2009 09:40:21 +0200")
3 OK Fetch completed.
/usr/lib/dovecot/expire-tool.sh
#!/bin/bash
MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/}
MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/}
MAIL_PLUGINS=${MAIL_PLUGINS//imap_acl/}
exec ${0%.sh} "$@
/usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext
/usr/lib/dovecot/expire-tool.sh --test
Info: Loading modules from directory: /usr/lib/dovecot/modules/imap
Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so
Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Info: Module loaded:
/usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so
Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so
Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so
Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so
Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so
Info: Quota root: name= backend=dict args=:proxy::quotadict
Info: Quota warning: bytes=0 (95%) messages=0
command=/usr/local/bin/quota-warning.sh 95
Info: Quota warning: bytes=0 (80%) messages=0
command=/usr/local/bin/quota-warning.sh 80
Info: expire: pattern=Trash type=expunge secs=86400
Info: robert at schetterer.com/Trash: stop, expire time in future: Tue Aug
4 09:40:21 2009
/etc/crontab
45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
--exec-mail ext /usr/lib/dovecot/expire-tool.sh
so lets see what happens tommorow
and repeat the --test
as well as the mysql test and internal savedate test
after deletion time
--
Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
More information about the dovecot
mailing list