Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 30 Jul 2014, 03:22
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to remove attachments from kmail
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
fudgy


Joined: 07 Jun 2006
Posts: 86
Location: Berlin, Germany

PostPosted: Fri 23 Feb 2007, 18:16    Post subject:  How to remove attachments from kmail  

...yust set up a filter with the action 'pipe through' and the command:

egrep -v ^.[A-Za-z0-9=/+]{68}.*$

Thats it. Be shure to set the filter to 'manual' as this deletes data.
Have fun!

fudgy

ps.
please tell me if i forgot to include characters in the RegEx. This RegEx simply looks for strings with no spaces for a length of 68 characters minimum in one line. If these are found, they are excluded (-v option). The output is passed back to kmail - replacing the original message.

pps. The attachment will be 'visible' to kmail (with 2 bits length) so you know the name it had. You can use the %1, %2 etc. command to save attachments before deleting, like so (filter action 'execute command'):
cp %1 /initrd/mnt/dev_save/attach/`date --iso-8601 +%F-%H%S`-001

...but unfortunately one loses the name of the original attachment. So I prefer saving by hand before stripping it off my email folder.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0387s ][ Queries: 12 (0.0049s) ][ GZIP on ]