Koozali.org: home of the SME Server

Expire old emails - [SOLVED]

Offline jfarschman

  • *
  • 406
  • +0/-0
Expire old emails - [SOLVED]
« on: July 06, 2006, 10:43:15 PM »
Hello,

  Is there a way to expire email older than (say) 30 days from a mailbox on the SME server?

  On systems that use the old mbox method there is a perl script called expiremail that can do this.  Any ideas how to do this on SME?
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline byte

  • *
  • 2,183
  • +2/-0
Expire old emails - [SOLVED]
« Reply #1 on: July 06, 2006, 10:57:17 PM »
Hi,

Do you mean junkmail? here's what's in the FAQ...

How to set spamassassin for automatically deleting junkmail.
You can change the "days" that spamassassin sets to automatically delete junkmail, to do this just type at command line...

db configuration setprop spamassassin MessageRetentionTime 60Where 60 is the value you want, then do...

signal-event email-update
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline jfarschman

  • *
  • 406
  • +0/-0
Expire old emails - [SOLVED]
« Reply #2 on: July 06, 2006, 11:29:16 PM »
Byte,

  Actually I don't mean the junkmail folder.  I should have mentioned that.

  We want the inbox to not get overfilled even when a user neglects it.

  Does that make sense?
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline byte

  • *
  • 2,183
  • +2/-0
Expire old emails - [SOLVED]
« Reply #3 on: July 07, 2006, 12:04:50 AM »
Ok, how about looking at the settings for the Junkmail and see if you can modify something to work for your situation?

I've not got a machine in front of me to see where the templates/script are.

Does that make sense?

PS. You may want to raise a NFR, as I'm sure others would maybe need something like this.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline MSmith

  • *
  • 675
  • +0/-0
Expire old emails - [SOLVED]
« Reply #4 on: July 07, 2006, 05:03:26 AM »
Would it work to set a quota on each user?
...

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Expire old emails - [SOLVED]
« Reply #5 on: July 07, 2006, 05:30:51 AM »
I have setup a quota on each user ... that way it forces them to do a bit of maintenance ... does them good let me tell you.  :hammer:

Regards,

Tib

Offline jfarschman

  • *
  • 406
  • +0/-0
Expire old emails - [SOLVED]
« Reply #6 on: August 17, 2006, 05:48:18 PM »
Okay... it took me awhile, but you can create a job in /etc/cron.daily that will run daily against the email directory you choose.  Saw this on a CharlieBrady post.

Code: [Select]

### 6.x  where emails end in .mail
find /home/e-smith/files/users/maillog/Maildir -type f -mtime +21 -name \*mail\* | xargs rm -f

### 7.x where a capital "R" denotes a READ message
find /home/e-smith/files/users/maillog/Maildir -type f -mtime +21 -name \*R\* | xargs rm -f
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com