Archiving attached mail files
I want to archive files that came attached to emails, separate from the email itself: it can save a fair amount of space, and at least, reduce the size of the mbox files, speeding mail browsing. This can be done with Pine: the attachments can be marked for deletion, and when the email is moved from one folder to another, the attachment is deleted and replaced with a text like: |> [ Part 2: "Attached Text" ] |> |> [ The following attachments were DELETED when this message was saved: ] |> [ A Application/MSWORD segment of about 238,567 bytes. ] But, you see, the file name is not saved, so the original file, which I keep separate, is very difficult to locate. Do you know of some application that does this? -- Cheers, Carlos Robinson
* Carlos E. R.
I want to archive files that came attached to emails, separate from the email itself: it can save a fair amount of space, and at least, reduce the size of the mbox files, speeding mail browsing.
If pine will do macros (haven't used pine for many years), you could initiate a script to pipe the particular emails with formail thru procmail and do this. formail -s procmail -m .procmailrc.archive < msg.txt Idea mine, macro, script and rc yours. -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org Linux, a continuous *learning* experience
The 03.05.05 at 07:28, Patrick Shanahan wrote:
If pine will do macros (haven't used pine for many years),
It has filtering, which is used for pgp signature handling, for example.
you could initiate a script to pipe the particular emails with formail thru procmail and do this.
formail -s procmail -m .procmailrc.archive < msg.txt
Well, yes, ok, I can pass the email to formail, yes. But the, how do I tell that formail to separate the email into one email without the attachements, and the attachement be saved outside as files, ein? That's the big problem. Once I wrote a program to do that, but I didn't finish nor fully test it - nor do I remember where is it. I was wondering if it does exist, if somebody else has done it before.
Idea mine, macro, script and rc yours.
X-) Yea, but it gets me nowhere! :-) -- Cheers, Carlos Robinson
* Carlos E. R.
The 03.05.05 at 07:28, Patrick Shanahan wrote:
you could initiate a script to pipe the particular emails with formail thru procmail and do this.
formail -s procmail -m .procmailrc.archive < msg.txt
Well, yes, ok, I can pass the email to formail, yes. But the, how do I tell that formail to separate the email into one email without the attachements, and the attachement be saved outside as files, ein?
Search the procmail@lists.RWTH-Aachen.DE list archives. There are examples there for removing/saving attachments, etc, with procmail.
Idea mine, macro, script and rc yours.
X-)
Yea, but it gets me nowhere! :-)
all work and no play...... -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org Linux, a continuous *learning* experience
participants (3)
-
Carlos E. R.
-
Patrick Shanahan
-
Patrick Shanahan