1

Topic: Removing spam/mail from the Junk folder after so many days

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version:   Linux Squeeze
- iRedMail version and backend (LDAP/MySQL):  0.7.4 & mysql , mysql admin 1.3.1
- Any related log? Log is helpful for troubleshooting.
====

I have seen in other posts how to move mail to the junk folder, via the dovecot changes.

My question, once the mail gets to the junk folder, is their a way to get it removed after so many days?

I don't want to have the user login via  web every week, and manually delete everything.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Removing spam/mail from the Junk folder after so many days

It looks like the dovecot expire-tool will do what I want


/usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool

I am having an error when trying to run the tool

Error: dlopen(/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so: undefined symbol: capability_string
Fatal: Couldn't load required plugins


what do I need to get this working?

3

Re: Removing spam/mail from the Junk folder after so many days

Looks like this is a bug in Debian

anyone know a workaround

I am Trying to implement workaround by using the expire-tool.sh

dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh

Not currently working

4

Re: Removing spam/mail from the Junk folder after so many days

You should enable Dovecot plugin 'expire' first.
Reference: http://wiki.dovecot.org/Plugins/Expire

5

Re: Removing spam/mail from the Junk folder after so many days

Did you ever get this working?  I'm trying to get expire-tool working on iRedMail 0.7.3, Dovecot 1.2, MySQL, CentOS 5.6, and I'm stuck.  It appears I have everything configured correctly, but no records are being written to the "expire" table which I created in the "vmail" db (I assume that's where it's supposed to be, the online docs are pretty sketchy).  No errors... just no records being created, so obviously running expire-tool.sh just executes but doesn't actually do anything since there's no records for it to look at.  I'm guessing it's either a permissions issue or a path issue, but I haven't found it yet.

6

Re: Removing spam/mail from the Junk folder after so many days

Expire plugin is buggy in Dovecot-1.x. sad
Try Dovecot-2.0.x if possible.