12 Replies Latest reply: Sep 26, 2009 11:30 AM by BDAqua
invenio Level 1 Level 1 (5 points)
It seems to be an often discussed problem, but I can't really seem to find an answer to my problem. If I have overlooked a supplied solution, please point me to the thread.

I have a rule set that says:
If (any) of the following conditions are met:
(From) (Contains) abc@def.com
(To) (Contains) abc@def.com
Perform the following actions:
(Move Message) to mailbox: (abc)

This seems to work for incoming messages, but not for the outgoing mails. I always have to go to the Sent mail folder and hit option-command-L (Apply Rules) to sort the message into the correct mailbox/folder. What can I do here?

OS X 10.4.11, Mail 2.1.3 (753.1)

PowerMacs DC 2.3 PPC G5 + .4 G4 (Gigab.Ethernet);iPod Touch+nano 1 Gen;iPhone 3G, Mac OS X (10.4.11), Standard config w. 1GB RAM + Bluetooth module, 23" Cinema HD Display
  • 1. Re: Mail rules not working as expected
    sitspotsit Level 3 Level 3 (780 points)
    Mail rules apply to Incoming mail, not Sent mail, so you can't do anything about that.
  • 2. Re: Mail rules not working as expected
    invenio Level 1 Level 1 (5 points)
    Thanks. Just wonder then why hitting Apply Rules (option-command-L) on those mails in Sent sorts them into the correct mailbox/folder...
  • 3. Re: Mail rules not working as expected
    sitspotsit Level 3 Level 3 (780 points)
    You can apply rules after the fact to other mailboxes such as Sent, but they only run automatically on Incoming mail. That's the way rules work on most (every?) email system; it's called procmail in Unix Land.
  • 4. Re: Mail rules not working as expected
    invenio Level 1 Level 1 (5 points)
    That might be the fact, but I don't think it's good app behaviour. Most of all it's not apparent to the user and there's no mention of this in the rules section of the preferences.
  • 5. Re: Mail rules not working as expected
    sitspotsit Level 3 Level 3 (780 points)
    It's been that way since email was invented, well more than 30 years ago. It may not be apparent to the user, but if you look in Mail Help, it's clearly mentioned.
  • 6. Re: Mail rules not working as expected
    kramerd1 Level 1 Level 1 (0 points)
    I have set up a rule as follows:

    If from contains MYSQLbackup then move message to dbBackup

    This rule works fine. I have a MySQL database hosted externally and a cron job that automatically emails me a copy of the database each night as an added measure of backing up the database. The from addresss contains MYSQLbackup in it. The "dbBackup" is a local mailbox folder.

    I have a second rule as follows:

    If date received is greater than 30 days old then delete message

    This rule does not seem to work on the local mailbox/folder "dbBackup"

    Do rules only apply to the incoming mailboxes and not the local mailboxes? Is there a way to get it to apply to the local mailboxes?

    What I would like to do is have the MySQL database emailed to me daily so if my hosting provider's backup fails and things crash on their end (not that this has ever happened, but just being safe) I have a copy of the data for the last 30 days. Ideally, I want to do a daily backup going back 30 days, archive a snapshot of it on the 1st of every month. So at the end of a year I should have a mail message on my local folder that has backups of Jan 1, Feb 1, Mar 1,... Nov 1, Dec 1, and all of December. On Jan 31th of next year I would have the first of every month of this year, plus all of January.

    I know, email is not the best solution for secondary backups, I have thought of scheduling the cron job to ftp the data somewhere. But it is not a lot of data and initially thought I could do this quickly just using email and rules knowing that I have it locally with me and easily accessible at all times and is being backed up regularly in more than one location. Call me paranoid!

    Any suggestions or if the rule is: rules don't apply to local mailboxes in this manner, please let me know. Thanks in advance.
  • 7. Re: Mail rules not working as expected
    Solar Core Level 1 Level 1 (0 points)
    FWIW - MS Entourage allows you to set up rules on outgoing messages.

    Side Note on Entourage:
    Unfortunately I just lost all of my email Yesterday because of a database corruption problem in Entourage (it stores all the emails in a massive database). Thanks to a Time Machine backup and Apple Mail's import feature, I was able to save most of the mail. I'm going to miss some of Entourage's flexibility when it comes to rules though (rules on outgoing messages and the ability to apply just one rule of the set without first disabling the others).
  • 8. Re: Mail rules not working as expected
    Jim Sky Level 1 Level 1 (0 points)
    This is just *totally amazing* - I used Eudora for years, then went to Entourage (and like others my database was getting corrupted every couple of days and I had to spend hours waiting for Entourage to rebuild it each time, only to have it get corrupted again with a couple more days), but last week I switched to Apple Mail.app. I LOVE IT (SO FAST!) - except for this inability to filter outbound mail. Like others, I go to the -sent- folder and select everything and then apply filters to them, and bingo they fly into the correct folders for me because I've built rules that look at the -recipients- that I'm sending to. But what a pain that I can't apply rules to outbound mail!

    And there's no way to apply an action based on an address book -group- to outbound mail rules, you have to specify every recipient explicitly in the rule. Whereas -groups- work fine for filtering inbound mail.

    Are y'all sure that nobody has invented some plug-in that will solve this problem? Every other emailer that I've used since 1986 (AOL) has had the ability to apply rules to outbound mail, as does gmail and other webmail services - this is the first program I've encountered that ignores it as if it's an oddball thing to do.

    [Yeah, the rules work -as expected- based on the documentation, but this feature is just so basic it's astounding that it's not there. I must be missing something really simple? Like it's so easy I just don't see it right in front of my face?]
  • 9. Re: Mail rules not working as expected
    anarchistic Level 1 Level 1 (0 points)
    Jim Sky wrote:
    Like it's so easy I just don't see it right in front of my face?

    Ha! You have to think in one-button mode (that is, two buttons is too tricky, so we'll make you press a key on the keyboard AND click at the same time):

    1. Mail Prefs > Composing > "Automatically Bcc: myself"
    2. Apply rule 'From' 'Is equal to' your.email@address.com
    3. Move/copy/whatever.

    And there you have it - Apple's backward-arse way of filtering on "outbound" email.

    Except you don't seem to be able to 'copy' then 'delete' in the same rule - that is, delete the original, not the copy. I ended up losing all my mail for one afternoon because of this stupid behaviour. Why would I want to do this? Because 'move' annihilates any trace in your Exchange mailbox, I was hoping the 'delete' would merely mark it to be deleted later.
  • 10. Re: Mail rules not working as expected
    Gsteinb Level 1 Level 1 (0 points)
    How odd. My entourage database just went south as well. What version are we discussing? I'm on 2004.

    My issue was the calendar developed a sync issue with ical, and even deselecting the entourage preferences wouldn't undo the communications weirdness between the iphone, ical, and entourage. This even survived a reinstall of the OS. It wasn't until I removed entourage from the system that the problem went away. Thankfully I was able to import my mail to mac mail first.

    Found this thread looking for why my outgoing mail rules weren't working. Seems a pretty obviously necessary thing. I'm amazed it doesn't work.
  • 11. Re: Mail rules not working as expected
    noafe Level 1 Level 1 (0 points)
    There's a 3rd party Mail plugin called Mail Act-On that enables outgoing Mail rules as well as a bunch of other time saving features like applying rules via keyboard shortcuts to selected messages and keyboard shortcuts for moving messages to folders, etc.

    It works fantastically. It's $25, totally worth it if you ask me.

  • 12. Re: Mail rules not working as expected
    BDAqua Level 10 Level 10 (116,470 points)
    Hi noafe, thanks for the tip/pointer, and a warm welcome to the forums!