From: SourceForge.net <no...@so...> - 2011-07-13 06:14:56
|
Feature Requests item #3365625, was opened at 2011-07-13 14:00 Message generated for change (Comment added) made by apptaro You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456913&aid=3365625&group_id=49630 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: apptaro (apptaro) Assigned to: Nobody/Anonymous (nobody) Summary: Support for automatic setuid Initial Comment: As described in the bug #3063535 (is owned by someone else!) archivemail version 0.7.2+ does not do setuid when archivemail is run by root and the target mailbox is owned by someone else. I need this functionality. My mail server is configured so that spam messages are automatically moved to a spam folder for each users. I want to use archivemail to delete old messages from each user's spam folder like this: archivemail --days=30 --delete --include-flagged /home/*/Mail/Spam but I get "/home/username/Mail/Spam is owned by someone else!" error. ---------------------------------------------------------------------- >Comment By: apptaro (apptaro) Date: 2011-07-13 15:14 Message: For now, I created a script such as below to do the job. Maybe this is enough. #!/bin/sh ls /home | while read line ARCMAIL="/usr/bin/archivemail --delete --include-flagged --quiet" do USER="$line" MAILBOX="/home/$USER/Mail/Spam" if [ -f $MAILBOX ] ; then sudo -u $USER $ARCMAIL $MAILBOX fi done ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456913&aid=3365625&group_id=49630 |