Re: way to change default permissions of saved attachments?
In article <slrnbmu2th.tnk.mark@xxxxxxxxxxxxxxxxxxxxxxx>, Mark Stosberg wrote:
> In article <20030922141918.GB8446@xxxxxxxx>, René Clerc wrote:
>>
>>> Here's a question I didn't find an answer to in the docs. I would like
>>> to change the permissions created on the attachments that are saved to
>>> disk from mutt. Is there a way to do that?
>>
>> Did you search the archives?
>
> Now I have. :) Here's an old post which includes a helpful script:
>
> http://groups.yahoo.com/group/mutt-users/message/33294?source=1
Here's another alternative I found on the web, in French:
macro index \cx "<pipe-message>munpack -fC ~/public_html/bordel/ | \
~/bin/rename_munpacked.sh; rm ~/public_html/bordel/*.desc\n"
The renaming script is given below. It looks like it prints out a
list of URLS for each attachment it processes:
###
#!/bin/bash
if [ "$?" == "1" ]
then
echo Erreur au moment du munpack !
exit
else
REP="/home/michoux/public_html/bordel/"
echo Fichiers sauvegardés :
while read FILE
do
FILE=`echo $FILE|cut -f1 -d" "`
NEW=`echo $FILE|sed "y/X/ /;s/= [Ii][Ss][Oo]-8859-1 Q //g;
s/=E./e/g;
s/=F./u/g;
s/=2E/./g;
s/=2C/_/g;
s/ \=$//;"`
if [ "$FILE" != "$NEW" ]
then
mv "$REP$FILE" "$REP$NEW"
fi
chmod o+r "$REP$NEW"
NEW=`echo $NEW|sed "s/ /%20/g"`
echo ° http://michoux.born2frag.org/bordel/$NEW
done
fi
##########
Those were from:
http://michoux.born2frag.org/config/mutt/muttrc.html
Mark
--
http://mark.stosberg.com/