Need help on mail rule for blank subject line

I have recently started getting junk mail from addresses I don't know without a subject line. When I opened the first two or three there was no content, just the sender's email address and no subject. I tried making a mail rule but you can't leave a field a field blank, so I don't know how to do this. Does anyone know how to do this?

Thanks!

Mac Pro, 15" MacBook Pro, Mac OS X (10.5.3)

Posted on Jun 11, 2008 11:51 AM

Reply
19 replies

Jun 12, 2008 8:39 AM in response to V.K.

I have solved the problem as suggested at http://forums.techguy.org/web-email/289274-solved-blank-subject-line.html , by adding conditions to the junk filter and requiring ALL conditions to apply:

Subject ______ does not contain __________ a
Subject ______ does not contain __________ e
Subject ______ does not contain __________ i
Subject ______ does not contain __________ o
Subject ______ does not contain __________ u
Subject ______ does not contain __________ y
Subject ______ does not contain __________ 0
Subject ______ does not contain __________ 1

and so on until 9. It is not a pretty solution but it worked for me.

This way if you get a message with blank subject (or only with consonants which is rather unsual) it goes straight to the junk folder. It also prevents it from showing in the Blackberry which is always a nuisance.

On the negative side Mail will probably have some issues discerning other more common types of messages including those that are tagged as Junk Mail.

Jun 11, 2008 12:17 PM in response to katierose

Had the same problem, within the past week, and figured it out. When you are in the Add Rule box, choose Subject in the pull down menu, then choose Contains, then in the empty box type unknownsubjectmessage. All one word. And then, of course, have the "action" to move message to your junk mail folder.

I had 10 messages in my inbox that were obvious junk with no subject, I added this rule, clicked on Apply now (when prompted) and they all were transferred to my junk mail folder.

Jun 11, 2008 4:29 PM in response to Chad Krukowski

I first meant to type unknownmessagesubject

It sent all junk that was in my inbox, at the time, to my junk mail folder. Of course, I then received some more emails that had no subject so my rule didn't work for future emails. I chose unknownmessagesubject b/c I checked my email using the web at Mac.com, clicked on the message that was obvious junk, and it shows that in the subject line. Nothing shows up in the subject line using Mac Mail.

I'm trying to play around with the Raw Source to see if there is something in common with these emails with no subject. I'll let you know what I find.

You have had success with your rule? for future emails too?

Jun 11, 2008 7:20 PM in response to katierose

paste the following into Script Editor and save it as a script.

<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
using terms from application "Mail"
on perform mail action with messages theSelectedMessages for rule theRule
repeat with msg in theSelectedMessages
-- Process the current message
tell application "Mail"

if subject of msg is "" then
move msg to junk mailbox
end if

end tell
end repeat
end perform mail action with messages
end using terms from</pre>


create a rule with the condition that message type is "Mail" and as the action have it run the script that you've saved. this rule will move every incoming message with empty subject line to the junk mailbox.

Message was edited by: V.K.

Jun 12, 2008 8:39 AM in response to katierose

the rule moves messages to junk not trash. If you want them to be moved to trash change the line

"move msg to junk mailbox" to "move msg to tash mailbox" in the script and save the script. The rule should be working already. try selecting the message and clicking "apply rules" from the message menu. I tested the rule and it works ok here.

Jun 12, 2008 9:02 AM in response to V.K.

I feel like I'm getting a handle on this...sort of. I changed the script from Junk to Trash, as I don't have a Junk folder and am using the most recent version of Mail. When the subjectless message appears, do I have to apply to rules to each message? It works if I do this but it would be just as easy to simply delete them. What am I doing wrong?

Jun 12, 2008 9:07 AM in response to katierose

katierose wrote:
I feel like I'm getting a handle on this...sort of. I changed the script from Junk to Trash, as I don't have a Junk folder and am using the most recent version of Mail. When the subjectless message appears, do I have to apply to rules to each message?


No, of course not. mail should do this automatically. It does for me.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Need help on mail rule for blank subject line

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.