Hello,

I just tried to make this update to FAQ entry 4.3, which provides
explicit pathnames in a crontab entry. Apparently, not just anybody is
authorized to do this. :)

Here's my revised text and log entry:
#####
TMDA comes with a utility called `tmda-pending' which can be used to release, delete, 
view, and generally manipulate messages in your pending queue.  You can run it by 
hand, or periodically from cron.  Run ``tmda-pending -h'' to get a listing of 
available options and usage examples.  tmda-pending should be run by the user account 
that owns the pending queue, not by root (unless root is running TMDA).

Running tmda-pending, without any arguments, will interactively take you through every 
email in your pending queue and ask you what you want to do with it. However, you can 
also use it in "batch" mode so that you can write scripts which will manipulate your 
pending queue.

Using cron, you can set up a script which will run on a regular basis to scan the age 
of the files in the pending queue and delete any older than a certain date. I use two 
scripts in my crontab, that run daily during the middle of the night. The first script 
does this:

   /usr/local/bin/python /usr/local/bin/tmda-pending -Cbs -O 48h | /usr/bin/mail -s 
"TMDA new in pending" \
        [EMAIL PROTECTED] > /dev/null 2>&1

What this will do is print a summary of any emails that have been in pending for 48h. 
I like to see if an email has turned up in pending and if it hasn't been confirmed 
w/in 48h. That way I can followup with folks who are getting confused by TMDA. 
Additionally, because I use the "-C" option, each new email will only be shown to me 
once. So the emails that are shown to me today, will not be shown again tomorrow, even 
if nothing changes between then and now.

The other script that I have does this:

   /usr/local/bin/python /usr/local/bin/tmda-pending -sbdO 30d | /usr/bin/mail -s 
"TMDA deleted from pending" \
        [EMAIL PROTECTED] > /dev/null 2>&1

What this will do is print out a summary of all messages in pending that are older 
than 30days and delete them.  That summary then gets emailed to me.

########
On FreeBSD 4.5, this failed until I was explicit about my paths. This change
shouldn't hurt other environments (as long as the installation directory is the
same, which I think people should be smart enough to change)

########

Thanks!

  -mark

_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to