And I don't understand the PENDING_CLEANUP_ODDS option, there's a pratic example?
** Warning: Long-winded **
For example let's assume that PENDING_LIFETIME is the default "14d".
If you set PENDING_CLEANUP_ODDS to 1.0, then every time TMDA receives an email it will delete every message in the pending queue which is older than 14 days.
If you set PENDING_CLEANUP_ODDS to 0.0, then TMDA will never ever clean up the pending queue.
If you set PENDING_CLEANUP_ODDS to 0.5, every time TMDA receives an email, there is a 50% chance that it will delete every message in the pending queue which is older than 14 days. In other words, the cleanup will happen roughly once every 2 emails.
If you leave PENDING_CLEANUP_ODDS at the default 0.01, then there is a 1% chance of TMDA cleaning up the queue for every incoming email, which means it will cleanup theh queue roughly every 100 emails.
If it helps you to think of what TMDA does, I think of it doing this: Every time an TMDA processes an email message, a random number is generated between 0 and 1. If this number is less than PENDING_CLEANUP_ODDS, then the pending queue gets cleaned.
If it helps you to think in percentages, multiply the PENDING_CLEANUP_ODDS by 100, then put a % sign after it. This means that roughly (PENDING_CLEANUP_ODDS * 100)% of the time TMDA processes a message, the queue gets cleaned.
If it helps you to think in "number of messages between cleanups", take the inverse. This means that roughly every (1 / PENDING_CLEANUP_ODDS) messages that TMDA processes, the queue is cleaned up.
In conclusion, the practical meaning is this:
If you set it too high (1.0) there will be a lot of extra processing every time TMDA gets a message, but you will NEVER have anything in your queue older than 14 days. If you set it too low (0.0) your pending queue will NEVER be cleaned.
The default of 0.01 is pretty good for most people, who probably get 100's of emails per day to TMDA, since it will cleanup every 100 emails or so, or approximately once a day.
If you get only 3 emails a day, this setting is probably still good, since your pending queue won't fill up that fast anyway.
If you get 1000's of messages per day, you may want to make the number even smaller to reduce the number of times per day TMDA is trying to clean the queue. If you decrease it to 0.001, this would be about one cleanup per 1000 messages.
-- Jim Ramsay "Me fail English? That's unpossible!"
_____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
