New filterrule to copy mail in some folder



19 years ago
2 years ago


(Reporter: W.Sobotta, Assigned: sspitzer)


Dependency tree / graph

Firefox Tracking Flags

(Not tracked)




19 years ago
I will write an enhancement that copys mails automagically by a rule into some
The idea is, that I can leave the mails in my Inbox and delete them regulary by
date. Some mails from the mailinglists(or friends - however) stay in the
assigned directory. So I can delete my Inbox complete without loosing some
important mail.

I will write it by myself, but I dont know where to start - the mailnews-part
isnt the smallest ;-) part of mozilla.

I've downloaded mozilla already via cvs and compiled it - the question is:
Where to start hacking?


19 years ago
QA Contact: esther → laurel

Comment 1

19 years ago
I will try to write this enhancement by myself. I have looked at the code and I
know I must start with the IDL-File
(mailnews/base/search/public/nsMsgFilterCore.idl) . But where I have to
implement this interface (eg. CopyToFolder)?
Assignee: gayatrib → W.Sobotta

Comment 2

19 years ago
Ok, accepted.

Comment 3

19 years ago
you need to look at mailnews/local/src/nsParseMailbox.cpp,
nsParseNewMailState::ApplyFilterHit() and
mailnews/imap/src/nsImapMailFolder.cpp, nsImapMailFolder::ApplyFilterHit() to
apply the copy filter action.
Just thinking, would something like this be better implemented as a virtual
filters implementation?  That is, a virtual folder that shows messages also in
other folder(s) according to specific criteria.

Comment 5

19 years ago
no, that's a much much much bigger and harder problem. This is fairly easy to

Comment 6

19 years ago
Adding RFE to summary and marking NEW. Yes I know someone is working on it but
we need this off our Unconfirmed and this helps people identify it.
Ever confirmed: true
Summary: New filterrule to copy mail in some folder → [RFE] New filterrule to copy mail in some folder

Comment 7

18 years ago
Isn't Matthew Tuck's suggestion already possible using some of the smartfind
query code from bookmarks?

Comment 8

18 years ago
Is there any movement on this bug?

Comment 9

17 years ago
*** Bug 141223 has been marked as a duplicate of this bug. ***

Comment 10

17 years ago
I vote for implementation of this bug as a simple copy operation.
Skip the "virtual" **** - the user should be able to delete
the original without affecting the archived copy.

I also suggestion adding the option of forwarding messages by

I think both of these filter options will have a lot of 
utility in situations where messages need to be archived
for legal or administrative reasons. 

Comment 11

17 years ago
*** Bug 167185 has been marked as a duplicate of this bug. ***

Comment 12

17 years ago
*** Bug 174562 has been marked as a duplicate of this bug. ***
Summary: [RFE] New filterrule to copy mail in some folder → New filterrule to copy mail in some folder

Comment 13

17 years ago
Note that as we now have filtering "after the fact" (Tools->Run Filters on
Selected Folder), this would be the first filter action that, when run multiple
times, always does something, if you know what I mean. IOW, I suggest that there
should be some way to ensure that the message doesn't get copied if it already
is in the target folder.


17 years ago
Depends on: 13145

Comment 14

17 years ago
Today "post-action" filters have to run manualy. 
Maybe, will be better to build different filter structure - one hook to one
folder? Then filter run on enter new mail into box... for example, mail can be
entered by another user on imap server, or mail can automaticaly move to another
folder, or change status, of forward to another address.

Comment 15

16 years ago
I'd like to work on this bug but I've not contributed to Mozilla before.  Can
someone point me to some of the relevant parts of the code?  This will save me
some time.

Comment 16

16 years ago
*** Bug 231806 has been marked as a duplicate of this bug. ***
-> default owner (Wolfram Sobotta have no time for this)
Assignee: W.Sobotta → sspitzer
*** Bug 247020 has been marked as a duplicate of this bug. ***


15 years ago
Blocks: 66425
*** Bug 257966 has been marked as a duplicate of this bug. ***
Is there any reason the code from the main messages window (right-click -> Copy
To) cannot simply be used for this operation? 

Comment 21

15 years ago
I would like to see this copy capability apply to news and RSS feeds as well as
mail folders.  Will adding it to mail also add it to the others, or should I
write another bug to handle those cases?

I've requested the ability to have Thunderbird run certain "post-action" filters
automatically at startup (as Dvorak and Velkov talked about).  That is bug 262738.
Product: MailNews → Core

Comment 22

15 years ago
is there any progress in this long running issue to solve this.

Comment 23

15 years ago
dup of bug 262184 which is fixed on the 1.0 branch but not the trunk yet.

*** This bug has been marked as a duplicate of 262184 ***
Closed: 15 years ago
Resolution: --- → DUPLICATE
That is a Thunderbird bug, while this is a core bug which was originally filed
for Mailnews, and this bug is part of a META bug, has 20 votes, and a much
longer CC list. 
Depends on: 262184
Resolution: DUPLICATE → ---

Comment 25

15 years ago
the code is the same. That bug has the patch in it, so it wins...I can fix the
component of that bug...

*** This bug has been marked as a duplicate of 262184 ***
Closed: 15 years ago15 years ago
Resolution: --- → DUPLICATE
No longer depends on: 262184
ok, but we'll need to update the META bug.
No longer blocks: 66425
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.