|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
18 Aug 2017, 05:15 PM | #1 |
Junior Member
Join Date: Mar 2003
Location: Hong Kong
Posts: 23
|
How to direct copies of the same incoming email into multiple folders?
Is there some way of writing a rule so that copies of an incoming email are filtered into multiple folders? Perhaps in sieve? (although I'm not really very familiar with sieve) I've spent ages puzzling over this, but haven't figured out a way of doing this so far?
My wife and kids share the same (enhanced) account with me. We all have our own aliases, with rules directing emails addressed to those aliases into different folders which serve as Inboxes for each of us. The problem comes when someone sends the same email to more than one of us (e.g. both my wife and me), as it only ends up in one folder and so the other person misses it (of course, we could check each other inboxes but rarely have the time to do so). I know I could sign up for a family account. But that's much more expensive now, and I don't need the extra functionality. Just some way of directing incoming emails that are addressed to more than one of us into more than one folder/inbox? Any suggestions gratefully appreciated. |
18 Aug 2017, 06:11 PM | #2 |
Essential Contributor
Join Date: Jul 2013
Location: Germany
Posts: 251
|
Hi dgittings!
An easy approach would be a simple forwarding rule. As FastMail supports plus addressing and folder matching, you could forward your mails to [username]+[foldername]@fastmail.com. Here you can find out more about this here: www.fastmail.com/help/receive/addressing.html Cheers, Michael |
18 Aug 2017, 06:35 PM | #3 |
Junior Member
Join Date: Mar 2003
Location: Hong Kong
Posts: 23
|
Many thanks, I will give that a go
|
19 Aug 2017, 06:15 AM | #4 |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
If you are going to do this you may want to turn-off conversations.
I turned it off years ago because if it's turned-on and you delete an email from webmail all of the copies of that email are deleted. |
20 Aug 2017, 01:03 AM | #5 | |
Member
Join Date: Mar 2014
Posts: 34
|
Quote:
On one email list I get a copy of what I posted. I select the Sent version and delete it. This way the conversation does not have duplicate emails. DS |
|
21 Aug 2017, 10:58 PM | #6 | |
Essential Contributor
Join Date: Apr 2008
Posts: 371
|
Quote:
It is possible to do this via Sieve, but you have to do it at least semi-manually. The key is that the "fileinto" directive in Sieve can have a ":copy" parameter added after it to copy the message to a folder, preserving the original. Sieve code to do this would look something like this: Code:
if address :is "From" "somewhere@somedomain.com" { fileinto :copy "INBOX.FirstFolder"; fileinto "INBOX.Final-Destination"; } If you're not comfortable crafting Sieve by hand, you can also build the basic rule from the standard "Rules" settings and then just copy and paste it into your own section — all standard rules that you create are displayed in the advanced Sieve editing screen, in the greyed-out blocks between those sections you can edit yourself. So in that case, you would create a normal rule to move a message to another folder. You'd then go into the "Edit Custom Sieve" code section and find that rule, which should be under "7. Sieve generated for organise rules". You can then just copy and paste it to the editable section below that, add the ":copy" parameter after the "fileinto" and add any other "fileinto" directives you want for copying it to additional folders. Just be sure to go and delete the original "move" rule once you've done this, otherwise that will still take precedence. |
|
22 Aug 2017, 05:59 AM | #7 | |
Essential Contributor
Join Date: Dec 2003
Location: Dover, NH, USA
Posts: 315
|
Quote:
|
|
23 Aug 2017, 11:52 AM | #8 | |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
Quote:
"Implicit keep" means that an email goes to the Inbox (or alternate default folder) if no other action is defined. |
|
23 Aug 2017, 10:17 PM | #9 | |
Essential Contributor
Join Date: Apr 2008
Posts: 371
|
Quote:
That said, now that I think about it, you're right that the ":copy" is redundant in this particular case — the two "fileinto" directives would have the same effect without ":copy" so there's technically no need to include it. That said, it does help make the logic of the Sieve construct more clear visually, however, since most people expect "fileinto" to be a move rather than a copy (as evidenced by the fact that, despite a decade of experience with Sieve, I automatically assumed it was necessary until your response actually made me take a step back and think it through again and have a "lightbulb" moment ). |
|
23 Aug 2017, 11:03 PM | #10 |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
If anything I think it confuses things because neither fileinto nor keep are moving or copying, they are both deliveries.
The implicit keep addresses a problem that existed in procmail where mail gets lost if you don't specify what to do with it, sieve avoids this by keeping by default. The copy extension was added because sometimes you want to do something like redirecting everthing to another account which would have the side-effect of removing that safety-net. From RFC 3894: "Adding ":copy" to an action suppresses cancellation of the default "inbox" save. It allows users to add commands to an existing script without changing the meaning of the rest of the script." |
23 Aug 2017, 11:17 PM | #11 | |
Essential Contributor
Join Date: Apr 2008
Posts: 371
|
Quote:
Let's face it, most users are probably just using very simple constructs with a single "fileinto" directive, and ergo, it's going to be perceived as a "move" in those cases. This is only emphasized further by the fact that FastMail (and other ManageSieve type extensions) often display these as "move" rules in their user interface as well (although ironically, it's only because FastMail constructs if/elsif blocks for multiple "organize" rules that they run in isolation of each other ). So again, it's really an issue of perception, but I'll definitely agree that if somebody is writing Sieve scripts by hand, they should understand the ramifications of what they're doing when using directives like "fileinto" — I've seen more than a few people hurt themselves (myself included back in the day ), by failing to put a "stop" at the end of a "fileinto" block |
|
25 Aug 2017, 10:41 PM | #12 |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
:copy is something that's very useful and deserves to be properly understood. Using it gratuitously as bogus syntactic sugar benefits no-one.
I say bogus because it falls apart even in trivial examples, e.g. what do you do with this: Code:
if <test1>{ fileinto <folder1> } if <test2>{ fileinto <folder2> } |
25 Aug 2017, 10:53 PM | #13 |
Essential Contributor
Join Date: Apr 2008
Posts: 371
|
Exactly, and that's a classic example of a situation where somebody might hurt themselves by incorrectly assuming that "fileinto" equals a "move" and therefore not putting a "stop" in the appropriate place.
Semantically, it really doesn't help that the word "copy" is used, either, which just adds to the confusion. To be clear, I agree with you completely — please don't think I was trying to defend my approach as correct so much as I was trying to explain why I made the mistake in the first place, and why it may (incorrectly) seem like a more logical construct to the Sieve novice — hence all the more reason it needs to be explained, and your jumping in to clarify is much appreciated. |