KMail Power Tools

KMail Power Tools is meant to be a suite of enhancements to KMail and may be other mail user agents.

It is currently composed of only one (perl) script that acts as a filter (take input from stdin, outputs the modified mail to stdout), adds dialog boxes to kmail, and allows the user to:

* remove all attachments from an email (no user interaction),
* remove selectively attachments, after asking the user,
* detach (i.e. save then remove) any attachment to a directory chosen by the user,

hence reducing the size of your mailbox, while allowing you to backup important attached files.

All these actions are logged within a sentence in the mail body, like:
[Attachment saved by jice (04/03/2007 17:30:23) to file:///tmp/test.pdf]
or (with the new -s option):
[Attachment saved by jice (04/03/2007 17:30:23) to file:///tmp/test.pdf (121728 bytes)]

Note: kmailpt is also able to remove/detach attachments from gpg encrypted emails, and to store these emails decrypted.


9 years ago

28/5/2007 v0.3

  • New features
    - New icons thanks to Rüdiger Härtel
    - Handle gpg encrypted emails:
    . Now able to remove/detach attachments within a gpg
    encrypted email
    . New command line option -g to tell kmailpt to leave
    the resulting email decrypted
    . Command line option -p tells KmailPT to use gpg-agent instead of asking the passphrase
    - option -d now takes an optional argument to tell it from the command line where to store the detached files.
    When this argument is present, every file is detached
    to the given destination.

  • Bug corrections
    - The disclaimer was added even to text/plain and text/html attached files. This is fixed.

  • 20/3/2007 v0.2
  • New features:
    - Add options -a (remove all attachments),
    -m (md5sum in the disclaimer),
    -s (size in the disclaimer),
    -n (multiline disclaimer).
    (md5, size and multiline disclaimer are based on an idea by ZJ Laczik)
    - When the destination file already exists, rename it with a dash
    and a number before the file extension (instead of replacing
    the destination!).
    - If no option is given on the command line: do nothing & exit.
    (use the -a option to get the old behaviour)
    - Replaced ~/tmp by ~/.kmailpt for temporary files.

  • Bug corrections:
    - Corrected a bug in the Makefile to make kmailpt executable.
    - Source file name is now obtained correctly (thanks to ZJ Laczik).
    - The tarball now contains a root directory kmailpt-0.1.2/

  • 4/3/2007 v0.1
  • First public release
  • 6 years ago


    -d option (the only one I am interested in) does not work on a Centos 4 install. Upon running, by clicking icon, first the displayed email moves to the _next_ email. Then up pops a directory selection and afterward an attachment selection screen (with the correct attachment name from the _first_ email). But clicking OK does not remove or save the attachment! All permissions look good. A waste of an hour of my time for me.


    6 years ago



    at first, thank you for this good addition to the Kmail too.

    There are two small problems with significant effects by using you tool.

    1. special characters
    When the attachement contains special characters (like umlauts etc.) in filename, these attachments won't take deleted from mail and it's impossible to open or rename this attachment in filesystem if I saved this with option "-d"

    2. space characters
    When the attachement contains space characters it's not possible to open this hyperlink directly from disclaimer of the mail, because the hyperlink brokes directly after the first space character.

    My suggestion: Is it possible to eleminate all special and space characters when you get attachment name from kmail? Sure! Then the filename looks strange. But I think it works and it's not a roundabout way to solve this problem.



    9 years ago


    at first, thank you for this good addition to the Kmail.

    I have a request and I think it would improve usability of this tool.

    Is is possible to rename the attachment when saving to the hard-disk so that we can track the attachment back to the email from which it is extracted?! It may be good idea to add some info-tag before or after the name of the attachment while saving!!

    Thank you.



    Recent Donations

    Be the first to donate
    Filename Version Description Filetype Packagetype License Downloads Date Filesize Install
    Score 78%
    22 Dislikes

    0 Supporters for KMail Power Tools:

    Recent Donations:

    Be the first to donate
    show all
    updated May 28 2007
    added Mar 04 2007
    page views 388
    support jice
    For The Product
    KMail Power Tools
    5 - 10 - 25 - 50 - 100 - 200 - 500