From: SourceForge.net <no...@so...> - 2011-07-13 22:45:12
|
Feature Requests item #3365625, was opened at 2011-07-13 07:00 Message generated for change (Comment added) made by nikosch 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: Closed Priority: 5 Private: No Submitted By: apptaro (apptaro) >Assigned to: Nikolaus Schulz (nikosch) 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: Nikolaus Schulz (nikosch) Date: 2011-07-14 00:45 Message: Yes, basically, in your case you are required to write some sort of a script. Not that convenient, but it puts you in control, and it's much better than such a setuid feature, which existed in archivemail up to v0.8.0, and was removed for a reason. ---------------------------------------------------------------------- Comment By: apptaro (apptaro) Date: 2011-07-13 08: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 |