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 Mon 22 Dec 2014, 01:01
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 Posts_count_1  
Author Message

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!


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:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot attach files in this forum
You can download files in this forum

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