Creating a OSX Mail Rule
Hello. I have created a Rule for mail. I get quite a few spam emails with the "Mail Attachment" attached. Its not working:
Description: Mail Attachment
If ANY of the following conditions are met:
Any attachment name / contains / Mail attachment
Perfomr the following actions:
Move message / to mailbox / Trash these
What am I missing?
Thanks.
(v10.7.2)
create a new service for your sorry server.
Then under the content rule defined for http traffic, you add the following line:
primarySorryServer
Regarding the config you provided, what you show is a 'show service ' and we can clearly see that even if your 2 services have different name, they are identical.
I believe you would want to configure different keepalive.
ie: for HTTP
keepalive port 80
keepalive type http
keepalive uri "/"
for rtsp
keepalive port 554
keepaliave type tcp
Regards,
Gilles.
Similar Messages
-
Creating truly custom mail rule - Subject line word length?
hey, first post... i am noting tons of spam where the subject line is one long mess consisting of junk words. There is no custom rule category allowing me to set something similar to:
if SubjectLine has word with length >20 Junk It..
Until Apple catches up to spammers and gives that to us, can anyone help me perhaps do this sort of thing? thanks, drew..i solved this myself and can be contacted privately for the answer..
-
Mail rules on Mac OS X 10.6 Server
Hi,
can some body help me.
I wold like to create some server mail rules, that should work for all people that have an mail account on server, but i can only create for each member separatly.
I would like to create new folder for junk mail and move there all emails that are marked as junk mail from server.
I'm using an imap mail acounts on my mac os x 10.6.2 server.You may have more luck with back-end matters if you ask in the Mac OS X Server area.
I presume you've read the information starting on page 36 of the Mail Services Administration guide in the Mac OS X 10.6 Server documentation, and the notes in the appendix in that guide, yes?
Regards. -
Deleted mail rules and they are still being applied
I created a few mail rules to change the colour of certain emails from different senders. I then deleted the rules and the emails are still colour coded differently and I can't seem to reset it.
Anyone run into this before on 10.6.2?Hi,
Try restarting your Mac. If that doesn't help...
Go to the Mail Menu Bar, click Mail/Preferences. Make note of all the preferences under each tab.
Quit Mac Mail.
Go to ~/Library/Preferences and move this file com.apple.mail.plist to the Desktop.
Relaunch Mail.
Carolyn -
Applescript: creating mail rules
Hi Community,
I can't find the syntax for creating a mail rule in applescript anywhere on the web. If someone could just post all the different options in one snippet (Move Message, Play Sound, Set Color, Delete Message, and run applescript) that would be awesome. Thanks!I agree with twtwtw. Most of the rules I use simply organize the inbox into separate mailboxes. So with a list of 150 or so students each semester, it would be great to have this script work..it creates the rules, one for each student number, but then the rule won't move the incoming messages. Hmm...
So if anyone figues out why, it would be great to let us know!
tell application "Microsoft Excel"
set hpath to "Macintosh-HD:Users:bg:20f11:Hmwk:graded:"
set theGrades to open workbook workbook file name "Macintosh-HD:Users:bg:20f11:20f11_grades.xlsx" update links do not update links
set email_list to value of every cell of range "e_mail"
set theMailbox to "20f11"
activate
set sn to value of every cell of range "sn" --sn is student number
end tell
tell application "Mail"
repeat with j from 1 to length of sn
set newRule to make new rule at end of rules with properties {name:item j of sn), enabled:false}
tell newRule
make new rule condition at end of rule conditions with properties {rule type:from header, expression:item j of email_list), qualifier:does contain value, move message:mailbox theMailbox}
end tell
end repeat
end tell -
How to creat Mail Rule with a script
i can writ a script and runing is ok, but can't applied to mail rule !?
Strangely, Mountain Lion requires that all Mail scripts reside in this location:
~/Library/Application Scripts/com.apple.mail/
Put it there. -
Getting a script to work in Mail rules
I have a script that works fine in Script Editor or as a stand alone script. I would like to get it to work from within Mail rules but for some reason it doesn't want to. I have tried placing hte script within the brackets of
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
and
end perform mail action with messages
end using terms from
which I was thought to believe enabled script to work with Mail rules. If aynone has any ideas how to resolve this I would love to hear from them.
My script is as follows.
tell application "Mail"
set the_message to item 1 of (get selection)
set theSubject to the subject of the_message
if theSubject is "Nouvelle Réservation" then
set the_message to item 1 of (get selection)
set message_text to content of the_message as string
set nom to paragraph 8 of message_text
set prenom_script to paragraph 9 of message_text
set spectacle_script to paragraph 2 of message_text
set date_script to paragraph 3 of message_text
set node_placesscript to paragraph 5 of message_text
end if
end tell
tell application "FileMaker Pro Advanced"
activate
open file "xxx:Users:yyy:Documents:zzz:fichiers fp7:Import reservations script.fp7"
try
delete every record
end try
set newRecord to create record -- store the result as 'newRecord'
tell newRecord -- now target that new record
set cell "nom_script" to nom
set cell "prenom_script" to prenom_script
set cell "spectacle_script" to spectacle_script
set cell "date_script" to date_script
set cell "node_placesscript" to node_placesscript
do script "whole import process into «•_reservations»"
end tell
end tellHello
You need to tell application "Mail" to do its tasks. Also your original if clause is closed too soon.
So a possible fix would be as follows :
--SCRIPT1
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
my initFilemaker()
tell application "Mail" -- # required
repeat with oneMessage in theMessages
set theSubject to the subject of oneMessage
if theSubject is "Nouvelle Réservation" then -- # should enclose the rest of this iteration
set message_text to content of oneMessage
set nom to paragraph 8 of message_text
set prenom_script to paragraph 9 of message_text
set spectacle_script to paragraph 2 of message_text
set date_script to paragraph 3 of message_text
set node_placesscript to paragraph 5 of message_text
tell application "FileMaker Pro Advanced"
set newRecord to create record -- store the result as 'newRecord'
tell newRecord -- now target that new record
set cell "nom_script" to nom
set cell "prenom_script" to prenom_script
set cell "spectacle_script" to spectacle_script
set cell "date_script" to date_script
set cell "node_placesscript" to node_placesscript
do script "whole import process into «•_reservations»"
end tell
end tell
end if
end repeat
end tell
end perform mail action with messages
end using terms from
on initFilemaker()
tell application "FileMaker Pro Advanced"
open file "xxx:Users:yyy:Documents:zzz:fichiers fp7:Import reservations script.fp7"
try
delete every record
end try
end tell
end initFilemaker
--END OF SCRIPT1
Or, since I'm not comfortable with nested tell structure (tell FMP in tell Mail), I'd write something like this (with other minor changes to my preferences) :
--SCRIPT1a
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
my fmpclearrecords()
tell application "Mail"
repeat with m in theMessages
set m to m's contents
if m's subject = "Nouvelle Réservation" then
my fmpnewrecord(m's content)
end if
end repeat
end tell
end perform mail action with messages
end using terms from
on fmpclearrecords()
set a to "xxx:Users:yyy:Documents:zzz:fichiers fp7:Import reservations script.fp7" as alias
tell application "FileMaker Pro Advanced"
open a
try
delete records
end try
end tell
end fmpclearrecords
on fmpnewrecord(t)
tell application "FileMaker Pro Advanced"
tell (create new record)
set cell "nom_script" to t's paragraph 8
set cell "prenom_script" to t's paragraph 9
set cell "spectacle_script" to t's paragraph 2
set cell "date_script" to t's paragraph 3
set cell "node_placesscript" to t's paragraph 5
end tell
do script "whole import process into «•_reservations»"
end tell
end fmpnewrecord
--END OF SCRIPT1a
Not tested, for I don't have FMP for OSX.
But I see no specific reason for the above to fail except for the case that certain threading issue of script run via Mail rule interferes.
*If it still fails, check console log for specific errors.
Good luck,
H
EDIT: The object referencing in FMP seems incomplete though it might work in current form.
It would be better to specifiy complete reference such as :
-- delete records
tell application "FMP"
tell document 1
tell database 1
tell current layout
delete records
end tell
end tell
end tell
end tell
-- create new record
tell application "FMP"
tell document 1
tell database 1
tell current layout
tell (create new record)
-- omitted
end tell
end tell
end tell
end tell
end tell
--etc
Message was edited by: Hiroto -
Transfering mail rules from Lion to Yosemite.
Help please, how do you transfer mail rules from Apple Mail 5.3 in Lion to 8.0 in Yosemite. Thanks
The file in question that you are looking for is SyncedRules.plist in the MailData folder. I tried re-naming a MessageRules.plist file and it didn't work. It would be an arduous task, but the best suggestion that I have, other than to re-create your rules, is to use a texteditor like SubEthaEdit to make the format of MessageRules comply with the format of SyncedRules.plist. I haven't tried it myself, but it might work. Best of luck!!!
-
Mail rules -- apply only to inbox or all mailboxes?
I've done a major revamp of my Mail application. I used to have a dozen or so mailboxes, and some had rules that would move newly arrived messages from my inbox to a designated mailbox.
I've now opted instead to use a dozen or so 'smart mailboxes.' I've moved all my messages back to my inbox and deleted the dozen or so mailboxes. The smart mailboxes nicely filter the messages as I've constructed the smart mailbox rules. However, I still have two mailboxes whose content isn't easily filtered via smart mailboxes.
Now, back to my inbox .... It's got a few thousand messages. My goal is to create a mail rule in preferences that would move anything older than 30 days into secondary mailbox. If I write this rule and run it, does it apply ONLY to my inbox? Or to the inbox and any other mailboxes?I played around with it and found out that my rule to move older docs to a separate folder only runs on my inbox, as I had hoped.
-
Mail rules accidentally deleted all of my emails. How to restore?
Alright, here goes.
I tried to set up af number of rules in my Mail application (just the standard one), that would delete some "subscribtion emails" that I never read anyways. And no, it's not spam.
BUT, I accidentally forgot to set the "any" criteria to "all", which means it all of a sudden deleted all mails with my email address as recipent. How can I restore them? They do NOT appear in my "Deleted messages"!
Also, is it really true that such a simple user mistake, can cause the user to lose highly important emails? I mean... It's like one click away from utter and permanent removal of the emails. If that's the case, I am really disappointed in Apple. I know I made a mistake, but forgetting to set "any" to "all" is something I feel anyone can do on accident, since it's on "any" as default. And it just applies the rule to the whole mailbox! I had no chance to stop it, and now my mails are gone. Important ones from the government, tax-mails, receipts... all just gone.
And no... I do not have a backup of those mails. I am without a time machine harddisk, and I honestly thought that deleted mails would appear in the "deleted mails" folder on iCloud, but they do not. The rules must have deleted those two, even though I have no idea why and how that should be possible.
And yes, the emails are gone from ALL of my devices, and not just the Mac... even iCloud.com does not have any trace that they even existed.
Please help, I know I haven't been smart about it, but permanently deleting such a large amount of emails, without warning or recovery method, simply should not be possible!
Any support is highly appreciated. I am looking at a world of s*** if I can't recover some of these important emails. Thank you in advance!
And here's a smiley, so you know that I am normally a very happy guy, and so you also know that I will be immensely joyful and appreciative of your helpGeeken wrote:
Also, is it really true that such a simple user mistake, can cause the user to lose highly important emails? I mean... It's like one click away from utter and permanent removal of the emails. If that's the case, I am really disappointed in Apple. I know I made a mistake, but forgetting to set "any" to "all" is something I feel anyone can do on accident, since it's on "any" as default. And it just applies the rule to the whole mailbox! I had no chance to stop it, and now my mails are gone. Important ones from the government, tax-mails, receipts... all just gone.
And no... I do not have a backup of those mails. I am without a time machine harddisk, and I honestly thought that deleted mails would appear in the "deleted mails" folder on iCloud, but they do not. The rules must have deleted those two, even though I have no idea why and how that should be possible.
Yeah, I don't think you should be disappointed with Apple. It's definitely not their fault. Only yours. Sorry to be frank, but "Any" and "All" conditionals are very obvious, and I have never made this mistake. I am not sure what you would want Apple to do to prevent this -- make an alert box come up saying "You are choosing Any which means when you do this your rule will apple to Any of the conditions you set". That would just annoy us other users that already understand what All and Any mean.
My point is that you should study the manuals and very good knowledge before you attempt at anything with your mac especially creating Mail Rules that will automatically delete emails.
You don't do backups which is also very strange and you should learn how to do them, as this is very important if anything happens to your computer at a later date, as you've just experienced. -
Can i use Boolean Expressions in Mail Rules?
Can i use Boolean Expressions in Mail Rules?
I need to create a rule to check whether a message contains BOTH a first and last name of EITHER of two people.
For example, the rule im looking to create goes something like this:
If ANY of the following conditions are met:
message content - contains - john & doe
message content - contains - jane & doe
ive tried and cant seem to get it to work...
Message was edited by: mysteriosoAFAIK Mail rules do not support boolean expressions.
to do what you want you'd have to create two rules
rule 1
if ALL of the following conditions are met
message content - contains - john
message content - contains - jdoe
and similarly for rule 2. -
Mail rules work for some users, don't work for others
Ready to pull my hair out over this one:
Leopard to Snow Leopard upgrade went uneventfully, except for the fact that server-side mail rules (accessed via browser at FQDN -> Mail Rules) work for several users (two, to be exact) and don't for the rest (about 15 or so).
The usual culprits have been reviewed: 'Enable Server-Side Mail Rules' is checked in Mail -> Settings -> Filters, 'Allow users to configure server-side mail rules' is checked in Web -> Sites -> Web Services, users can create vacation notices and email rules without issue via browser, permissions look fine on the contents of /Library/Email Rules and /var/spool/imap/dovecot/sieve-scripts, logs give no indication of any foul play (at least the Email Rules -> debug.log generates the same entries for both functional and non-functional users), etc.
I have noticed that /var/spool/imap/dovecot/sieve-scripts contains only two items, which - you guessed it - line up with the GUIDs of the two functional users. Theoretically every user with a rule should be represented here.
As suggested in this thread:
http://discussions.apple.com/thread.jspa?messageID=11171395�
I created both a vacation notice and an email rule for several users, thinking that may force the folder creation for those users, but no dice. I even manually created folders for a few users with their GUIDs as the folder names and assigned each user ownership and read/write access. Still nothing. Created a few new test user accounts just to rule out any legacy account weirdness (although it's worth noting that I completely redid the OD and recreated user accounts after the upgrade) and replicated the problem with these, as well. Lastly, used Inspector to compare OD attributes between functional and non-functional accounts, with no glaring differences.
Help!Did you find an answer? I encounter the same problem on my new MiniServer. Deleted and created all users several times, but just for some accounts mail is working.
Do you have the answer?
(new to this site, read a lot already, but not found) -
Modifying existing mail rules now even worse with Mavericks 10.9.1
Mail nightmares continue with Mavericks update 10.9.1 installed. In fact, the nightmare gets bigger. The story goes like this.
Prior to Mavericks, I created a stack of rules to move Mail messages from the Inbox to designated Mailboxes, e.g. messages from Friends would be moved to a Friends mailbox. Everything worked fine.
Along comes Mavericks, and when I Edit a rule to add a new recipient, and Apply that rule change to Move existing messages to another mailbox, messages would be Copied instead of being Moved, even though Move was the only action selected.
Now with Mavericks 10.9.1, nothing happens when I Edit an existing rule and then Apply the rule change to an existing message. The messae just sits in the Inbox and does not appear at all in the Mailbox I want to move it to.
How do I modify mail rules to move a message to another mailbox, then apply that rule modification to existing messages?Hi BG 29,
Unfortunatelly you are not the only one with this problem. I am in the same situation with the exception that once I create the rule the new incoming messages will go to the designated mailbox. If you want to create a new rule, the message will just copy, not move to the mailbox. I contacted Apple support and a representative called me back and asked me to do all kind of stuff, but no luck. I was hopping that the update to 10.9.1 will solve this, but again no luck. I gave up in trying....I am waiting for the next update and hope for the best. -
Applescript and mail rules:
I'm trying to do something with rules that I can't easily do in preferences.
I want to create a rule that does does the following:
If from equals [email protected] OR [email protected]
AND
message contains "lawn" or "Lawn" or "LAWN" or "XYZ" or "xyz" or "ABC"
move message to mailbox M
Or, do I just have to create a ton of rules?
Also, assuming the answer to the above is true, I guess I could write a single apple script that did all my mail processing.
I've searched and searched for such a script. Can anyone point me to something?
I'm an applescript beginer. I just ordered a book, but not here until next week.
Thanks!
Davedo it this way with an applescript (attach this to a rule action that checks all messages - will probably need some tweaking):
set senderList to {"[email protected]", "[email protected]"}
set keywordList to {"lawn", "Lawn", "LAWN", "XYZ", "xyz", "ABC"}
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with thisMessage in theMessages
if sender of thisMessage is in senderList then
repeat with thisKey in keywordList
if thisKey is in content of thisMessage then
move thisMessage to mailbox "M"
end if
end repeat
end if
end repeat
end tell
end perform mail action with messages
end using terms from -
How do I print a list of my mail rules
How can I print a paper copy of my mail rules. I have 100 or so.
Thanks, SquillioI actually began this process by creating a new calendar called "Medical" and then each event was assogned to this calendar but the program still wants to print out every day of the month for even those days that have no events. The list view gives me the look I want and I have even tried deselecting all of the options and then reselecting them one at a time to no avail.
Maybe you are looking for
-
Pages 4.3 dosen't detect pages 4.3 documents.
ages 4.3 dosen't detect pages 4.3 documents. I use two macbooks with iwork. one macbook with 10.7.5 an the other with 10.8.4. At both machines runs pages 4.3. If i try to open under 10.7.5 a document stored in icloud (under 10.8.4) i get an error me
-
LOM type tool for V210 in Solaris 10?
Is there a tool similar to LOM 2.0 that can pull daignostic information from the ALOM on server such as the V210 in Solaris 10? I tried installing LOM 2.0 from the Solaris 9 supplemental CD but of course it didn't work. Specifically I would be intere
-
Domain Controller Upgrade 2008R2 to 2012R2
Hi One of my customers has an environment with 3 domain controllers. Primary DC resides on premise as well as the secondary. One more Additional DC's resides on DR site and are all running Windows Server 2008 R2. We have now decided to upgrade all of
-
Errors installing SOA Suite 11g
Good morning This is an odd error. I am installing a brand new environment for SOA-SUITE 11g on a test database before going through the pain to complete this in our development environment. I am using RCU to build the environment as instructed and a
-
FRM-92101 when calling forms.
Hello Everybody!! I'm trying to call a form from another using: web.show_document('http://tierra.cantv.net:7778/forms90/f90servlet?config=webutil&form=ADJUNTAR_ARCHIVO&id_caso=' || :id_caso); inside a push button. My first form (the caller) run fine,