image
image

Go Back   macosx.com > Content & Information > Apple News, Rumors & Discussion

Reply
 
Thread Tools
  #1  
Old March 11th, 2002, 01:45 PM
GadgetLover's Avatar
Senior Member & Tech Guru
 
Join Date: Sep 2001
Location: Planet Earth (last I checked).
Posts: 413
Thanks: 0
Thanked 0 Times in 0 Posts
GadgetLover is on a distinguished road
HOW TO STOP SPAM -- join the fight!

First, join SpamCop.net!! It is awesome! I use it DAILY. They offer a "free" spam reporting service that has basic functionality and "pay" services for more robust spam handling and reporting.

Second, in conjunction with SpamCop -- in fact, to use SpamCop (once you've registered) -- create a "Report Spam" script (call it 'Report Spam\cS') [I will provide the code for you below -- thanks to the author that created the script!]

Third, create a "Bounce Spam\cB" Script [I will provide the code for you below -- thanks to the author that created the script!]

Fourth, make sure that your SpamCop email address is part of your Report Spam script. Also, add your ISP's spam abuse email address to your Report Spam script. And, it may be helpful to add the Federal Trade Commissions spam abuse email address too (uce@ftc.gov).

Fifth ... there is no fifth!

=====

Microsoft Entourage includes a script Script menu symbol menu that enables you to quickly run a compiled AppleScript script for Entourage and, among other things, use these scripts in the battle against Spam!

By default, this menu includes several scripts that you can use to create a task, note, or other type of item from a message that you select. To run a script from the script menu, click the script.
If you have written additional scripts for Entourage, you can add menu items for them to the script menu. To do so, save the script as a compiled script by using a script editor program, such as Apple Script Editor. Then move or copy the compiled script file to the Entourage Script Menu Items folder in your Documents/Microsoft User Data folder. The script menu updates automatically when a file is added to this folder and the file is a compiled script file with an "osas" file type.
If you add a menu item for a script, you can also define a keyboard shortcut for running it from Entourage. To define a keyboard shortcut, open Finder and then append a backslash (\) followed by the appropriate modifiers to the script file name. The modifiers are:
• s for SHIFT
• o for OPTION
• m for z
• c for CONTROL
For example, \cf corresponds to the keyboard shortcut CONTROL+f. Similarly, \msf corresponds to z+SHIFT+F. If you do not specify a modifier, z is assumed. For example, \f corresponds to z+f.
It's important to note that Entourage does not check for conflicts between keyboard shortcuts that you define and keyboard shortcuts that are defined by Entourage. Therefore, if a conflict exists, the result of using the shortcut is undefined.
Note You cannot add menu items for AppleScript applets to the script menu. You can add menu items only for compiled scripts.
I use control-S for my Spam Report Script and control-B for my Bounce Spam Script!

Tips
• To help yourself organize your scripts, you can add submenus to the script menu. To do so, open Finder, add a subfolder to the Entourage Script Menu Items folder, and then add one or more compiled script files to the subfolder.
• To quickly open a script for editing in the program the script was created in, hold down OPTION and click the script on the script menu.

FOR AWESOME APPLESCRIPTS, PLEASE VISIT http://www.applescriptcentral.com/

=====

SEE NEXT THREAD POST FOR SAMPLE SCRIPTS!
__________________
PowerBook G4 667MHz | 768 MB RAM | CD-RW | 60GB IBM TravelStar | 100GB FireWire Drive (7,200 RPM, Oxford 911) | Canon Printer & UMAX Scanner | OS X 10.3

"AirPort" (n): 1. Cleared, leveled hard-surfaced area where aircraft take off & land; has control tower, hangars, passenger terminals, & cargo area. 2. Kick-ass, cutting-edge wireless networking technology allowing anyone with a brain to surf the Internet from anywhere in one's home, school, office, local café, pub, or prison cell.

Last edited by GadgetLover; March 11th, 2002 at 02:28 PM.
Reply With Quote
  #2  
Old March 11th, 2002, 01:49 PM
GadgetLover's Avatar
Senior Member & Tech Guru
 
Join Date: Sep 2001
Location: Planet Earth (last I checked).
Posts: 413
Thanks: 0
Thanked 0 Times in 0 Posts
GadgetLover is on a distinguished road
Report Spam Script

Thanks to Allen Watson for providing the following AppleScript (http://homepage.mac.com/allenwatson/FileSharing.html)

Report Spam Script:

tell application "Microsoft Entourage"

-- get the currently selected message or messages
set selectedMessages to current messages

-- if there are no messages selected, warn the user and then quit

if selectedMessages is {} then
display dialog "Please select a message first and then run this script." with icon 1
return

end if

repeat with theMessage in selectedMessages

-- get the information from the message, and store it in variables

set theName to subject of theMessage

--This grabs the headers and content of the spam message

set msgSource to source of theMessage

--"spam" is a contact with addresses to forward spam to, such as uce@ftc.gov

--But you can type in any email address here, it doesn't have to be a contact.

--Change "spam" to your own email address for testing.

--I slightly modified the author's set spamreportaddress line by adding commas between multiple email address to permit multiple reports to be sent; just place a comma between each address.

set spamReportAddress to "uce@ftc.gov, submit.[your spamcop ID here]@spam.spamcop.net, abuse-junkmail@[your ISP]"

set newM to forward theMessage to spamReportAddress without opening window and html text

set spamReportNote to "This SPAM message was sent to me:


"
set the content of newM to (spamReportNote & msgSource)

set the subject of newM to ("FWD SPAM: " & theName)

--Don't forward the attachments
delete the attachments of newM

--Optional, if you want to see the SPAM report first before sending it
open newM

--Optional, Go Ahead and Send the SPAM report (uncomment this and comment out above line)
--send newM

--Or send it later instead of immediately:
--send newM with sending later

--Optional, Delete the original SPAM message(uncomment)
--delete theMessage
end repeat

end tell
__________________
PowerBook G4 667MHz | 768 MB RAM | CD-RW | 60GB IBM TravelStar | 100GB FireWire Drive (7,200 RPM, Oxford 911) | Canon Printer & UMAX Scanner | OS X 10.3

"AirPort" (n): 1. Cleared, leveled hard-surfaced area where aircraft take off & land; has control tower, hangars, passenger terminals, & cargo area. 2. Kick-ass, cutting-edge wireless networking technology allowing anyone with a brain to surf the Internet from anywhere in one's home, school, office, local café, pub, or prison cell.

Last edited by GadgetLover; March 11th, 2002 at 02:32 PM.
Reply With Quote
  #3  
Old March 11th, 2002, 01:52 PM
GadgetLover's Avatar
Senior Member & Tech Guru
 
Join Date: Sep 2001
Location: Planet Earth (last I checked).
Posts: 413
Thanks: 0
Thanked 0 Times in 0 Posts
GadgetLover is on a distinguished road
Bounce Spam Script (bounce, baby, bounce!)

Bounce Spam Script:

(*
Bouncer
Copyright 2001, Glenn L. Austin
All rights reserved worldwide.

Bounces mail to the sender in the following format:

>Subject: Returned mail: see transcript for details
>
> The original message was received at «smtpReceivedDate»
> from [«smtpHost»]
>
> ----- The following addresses had permanent fatal errors -----
> <«email address»>
> (reason: 550 5.1.1 <«email address»>... User unknown)
>
> ----- Transcript of session follows -----
> ... while talking to «smtpHost».:
>>>> RCPT To:<«email address»>
> <<< 550 5.1.1 <«email address»>... User unknown
> 550 5.1.1 <«email address»>... User unknown

Version History
--------------
1.0 Initial release
1.1 Add the ability to bounce messages to a specific domain with a specific account.
1.1.1 Fixed a location where I forgot to change gSendingAccount
1.1.2 Fixed some other stupid remaining bugs

*)

property gSendingAccounts : {}

on run
tell application "Microsoft Entourage" to set messageList to the current messages
set bounceList to {}
if the (count of messageList) is not 0 then
repeat with i from 1 to the number of items in the messageList
set bounceList to bounceList & {ProcessMessage(item i of messageList)}
end repeat
else
display dialog "Please select messages for processing." buttons {"OK"} default button 1
end if
if bounceList is not {} then
tell application "Microsoft Entourage"
try
display dialog "Send bounce messages now?"
if button returned of result is "OK" then
try
send bounceList
repeat until connection in progress is false
delay 1
end repeat
on error the error_message
display dialog the error_message
end try

set sendCount to 0
repeat with j from 1 to the number of items in bounceList
if delivery status of item j of bounceList is sent then
set sendCount to sendCount + 1
end if
end repeat

if sendCount is equal to number of items in bounceList then
display dialog "Move original and bounce messages to Trash?"
if button returned of result is "OK" then
set deleteNow to ((button returned of (display dialog "Empty Deleted Items?")) is "OK")
repeat with k from 1 to the number of items in messageList
delete item k of messageList
if deleteNow then
delete item k of messageList
end if
end repeat

repeat with l from 1 to the number of items in bounceList
delete item l of bounceList
if deleteNow then
delete item l of bounceList
end if
end repeat
end if
else
display dialog "Sorry, only " & sendCount & " of " & number of items in bounceList & ¬
" bounce messages were sent." & return & return & ¬
"Please reconnect to the Internet and resend the bounce messages manually." buttons {"OK"} default button 1
end if
end if

on error the error_message
--display dialog the error_message
end try
end tell
end if
end run

on ProcessMessage(aMessage)
tell application "Microsoft Entourage" to set {msgSender, msgAccount, msgHeader} ¬
to {address of sender, account, headers} of aMessage

-- parse the headers into an array of entries
set msgHeaders to {}
repeat while msgHeader is not ""
if first character of msgHeader <= " " then
set lastItem to number of items in msgHeaders
repeat while first character of msgHeader <= " "
set msgHeader to characters 2 through -1 of msgHeader as string
end repeat
set eolOffset to offset of "
" in msgHeader
if (eolOffset > 1) then
set entryValue to characters 1 through (eolOffset - 1) of msgHeader as string
else
set entryValue to ""
end if
if length of msgHeader > eolOffset + 1 then
set msgHeader to characters (eolOffset + 1) through -1 of msgHeader as string
else
set msgHeader to ""
end if
set «class CGIv» of item lastItem of msgHeaders to («class CGIv» of item lastItem of msgHeaders) & " " & entryValue
else
set colonOffset to offset of ":" in msgHeader
set entryName to characters 1 through (colonOffset - 1) of msgHeader as string
set msgHeader to characters (colonOffset + 1) through -1 of msgHeader as string
repeat while msgHeader is not "" and first character of msgHeader is " "
set msgHeader to characters 2 through -1 of msgHeader as string
end repeat
set eolOffset to offset of "
" in msgHeader
if (eolOffset > 1) then
set entryValue to characters 1 through (eolOffset - 1) of msgHeader as string
else
set entryValue to ""
end if
if length of msgHeader > eolOffset + 1 then
set msgHeader to characters (eolOffset + 1) through -1 of msgHeader as string
else
set msgHeader to ""
end if
set msgHeaders to msgHeaders & {{name:entryName, «class CGIv»:entryValue}}
end if
end repeat

set msgDate to ""
set msgAddress to ""
repeat with i from 1 to number of items in msgHeaders
name of item i of msgHeaders
if name of item i of msgHeaders is "Received" then
set receivedLine to «class CGIv» of item i of msgHeaders
-- get the last date from the first "Received" line
if msgDate is "" then
set msgDateOffset to offset of ";" in receivedLine
if msgDateOffset is not 0 then
set msgDate to characters (msgDateOffset + 1) through -1 of receivedLine as string
repeat while first character of msgDate is " "
set msgDate to characters 2 through -1 of msgDate as string
end repeat
end if
end if

-- look for actual user in Received lines
set userOffset to offset of " for " in receivedLine
if userOffset is not 0 then
set userAddress to characters (userOffset + 5) through -1 of receivedLine as string
if first character of userAddress is "<" then
set userAddress to characters 2 through -1 of userAddress as string
set userOffset to offset of ">" in userAddress
else
repeat with userOffset from 1 to the number of characters in userAddress
if character userOffset of userAddress <= " " then
exit repeat
end if
end repeat
end if
set userAddress to characters 1 through (userOffset - 1) of userAddress as string

if not (userAddress contains "@localhost") then
set msgAddress to userAddress
end if
end if
end if

if msgDate is not "" and msgAddress is not "" then
exit repeat
end if
end repeat

if msgAddress is "" then
tell application "Microsoft Entourage" to set msgAddress to email address of account of aMessage
end if

if (msgDate is not "" and msgAddress is not "") then
set serverOffset to offset of "@" in msgAddress
set msgServer to characters (serverOffset + 1) through -1 of msgAddress as string
set msgSendAccount to GetSendingAccount(msgServer)
set msgContent to ¬
"The original message was received at " & msgDate & " from " & msgServer & "

THE REST OF THE SCRIPT IS CONTINUED IN THE NEXT POST
__________________
PowerBook G4 667MHz | 768 MB RAM | CD-RW | 60GB IBM TravelStar | 100GB FireWire Drive (7,200 RPM, Oxford 911) | Canon Printer & UMAX Scanner | OS X 10.3

"AirPort" (n): 1. Cleared, leveled hard-surfaced area where aircraft take off & land; has control tower, hangars, passenger terminals, & cargo area. 2. Kick-ass, cutting-edge wireless networking technology allowing anyone with a brain to surf the Internet from anywhere in one's home, school, office, local café, pub, or prison cell.
Reply With Quote
  #4  
Old March 11th, 2002, 01:55 PM
GadgetLover's Avatar
Senior Member & Tech Guru
 
Join Date: Sep 2001
Location: Planet Earth (last I checked).
Posts: 413
Thanks: 0
Thanked 0 Times in 0 Posts
GadgetLover is on a distinguished road
Bounce Spam Script (cont.)

Bounce Spam Script (cont.):

----- The following addresses had permanent fatal errors -----
<" & msgAddress & ">
(reason: 550 5.1.1 <" & msgAddress & ">... User unknown)

----- Transcript of session follows -----
... while talking to " & msgServer & ".:
>>> RCPT To:<" & msgAddress & ">
<<< 550 5.1.1 <" & msgAddress & ">... User unknown
550 5.1.1 <" & msgAddress & ">... User unknown"
set msgSubject to "Returned mail: see transcript for details"
tell application "Microsoft Entourage"
set bounceMsg to make outgoing message with properties ¬
{recipient:msgSender, subject:msgSubject, account:msgSendAccount, content:msgContent}
send bounceMsg with sending later
end tell
end if
return bounceMsg
end ProcessMessage

on GetSendingAccount(inServer)
set sendingAccount to {}

repeat with i from 1 to number of items in gSendingAccounts
if sendName of item i of gSendingAccounts is inServer then
tell application "Microsoft Entourage" to set sendingAccount to {sendAccount of item i of gSendingAccounts}
exit repeat
end if
end repeat

if sendingAccount is not {} then
try
tell application "Microsoft Entourage" to ID of (item 1 of sendingAccount)
on error
set sendingAccount to {}
end try
end if

if sendingAccount is {} then
set accounts to {}
set accountStrings to {}
try
tell application "Microsoft Entourage" to set popAccountNames to name of POP accounts
on error
set popAccountNames to {}
end try
try
tell application "Microsoft Entourage" to set imapAccountNames to name of IMAP accounts
on error
set imapAccountNames to {}
end try
try
tell application "Microsoft Entourage" to set hotmailAccountNames to name of Hotmail accounts
on error
set hotmailAccountNames to {}
end try
tell application "Microsoft Entourage"
repeat with i from 1 to number of items in popAccountNames
set accounts to accounts & {POP account (item i of popAccountNames)}
set accountStrings to accountStrings & {item i of popAccountNames & " (POP)"}
end repeat
repeat with i from 1 to number of items in imapAccountNames
set accounts to accounts & {IMAP account (item i of imapAccountNames)}
set accountStrings to accountStrings & {item i of imapAccountNames & " (IMAP)"}
end repeat
repeat with i from 1 to number of items in hotmailAccountNames
set accounts to accounts & {Hotmail account (item i of hotmailAccountNames)}
set accountStrings to accountStrings & {item i of hotmailAccountNames & " (Hotmail)"}
end repeat
set accountSelectedString to choose from list accountStrings with prompt ¬
"Send bounces for " & inServer & " from which account:" without multiple selections allowed and empty selection allowed
try
set accountSelectedString to item 1 of accountSelectedString
on error
error number -128 -- user cancelled
end try
repeat with i from 1 to number of items in accountStrings
if accountSelectedString is item i of accountStrings then
set sendingAccount to {item i of accounts}
set gSendingAccounts to gSendingAccounts & {{sendName:inServer, sendAccountitem i of accounts)}}
exit repeat
end if
end repeat
end tell
end if

return item 1 of sendingAccount
end GetSendingAccount

PLEASE RETAIN ALL COPYRIGHT NOTICES WITH YOUR SCRIPT TO HONOR THE AUTHOR. IF YOU FORWARD YOUR SCRIPT TO ANYONE ELSE PLEASE MAKE SURE THAT IT HAS THE FULL COPYRIGHT NOTICE ON IT PRECISELY AS DISPLAYED HEREIN. THANK YOU.
__________________
PowerBook G4 667MHz | 768 MB RAM | CD-RW | 60GB IBM TravelStar | 100GB FireWire Drive (7,200 RPM, Oxford 911) | Canon Printer & UMAX Scanner | OS X 10.3

"AirPort" (n): 1. Cleared, leveled hard-surfaced area where aircraft take off & land; has control tower, hangars, passenger terminals, & cargo area. 2. Kick-ass, cutting-edge wireless networking technology allowing anyone with a brain to surf the Internet from anywhere in one's home, school, office, local café, pub, or prison cell.
Reply With Quote
  #5  
Old March 11th, 2002, 02:58 PM
Alexandert's Avatar
gonneawaycameback
 
Join Date: Sep 2001
Location: /dev/null
Posts: 791
Thanks: 0
Thanked 0 Times in 0 Posts
Alexandert is on a distinguished road
YOU DEFINATELY HAVE TOO MUCH.................SPAM!
__________________
Best wishes,
Alex

Athlon XP 1900+, Ge-Force 4 Ti 4400, 512MB DDR RAM, 80GB HD (ATA 133), ZIP 100MB, TEAK CD-RW 40/12/48, USB 2.0/FireWire PCI, USB 2.0 onboard, BlueTooth onboard, DSL-Router, Ethernet Hub, 768kb/s DSL, Philips DVD-ROM;

beige G3 500MHz, 768MB RAM, 30GB + 10GB + 60GB HD, USB/FireWire UpgradeCard,
ATA 100 Card, ZIP, Jaz, TDK Cyclone CDRW 24/10/40, DVD, Radeon PCI,
LaserWriter; 6 other macs;
Reply With Quote
  #6  
Old March 11th, 2002, 03:25 PM
-
 
Join Date: Jun 2001
Posts: 502
Thanks: 0
Thanked 0 Times in 0 Posts
apb3 is on a distinguished road
as relates to Bouncing

from macintouch:

http://www.macintouch.com/spambounce.html
Reply With Quote
  #7  
Old March 11th, 2002, 04:24 PM
GadgetLover's Avatar
Senior Member & Tech Guru
 
Join Date: Sep 2001
Location: Planet Earth (last I checked).
Posts: 413
Thanks: 0
Thanked 0 Times in 0 Posts
GadgetLover is on a distinguished road
Useful info.

That link provides useful information BUT it is not dispositive. Not all Spammers use successful avoidance methodology; some are spammers but not fraudulent -- in other words, it is still unsolicited junk mail fitting the definition of SPAM but is not false header info, etc. Thus, these semi-legitimate emails THAT ARE STILL UNSOLICITED AND UNDESIRED COMMERCIAL SPAM (Get Rich Schemes, etc.) can still be fooled by the bounce command.

Also, many of these idiots provide REAL info because they HAVE TO -- if they are trying to sell you something then they have to provide you with real contact info ... how else do you contact them??

It is the XXX Porno Illegal Sites that typically use non-functioning and/or illigitimate email headers that cannot be bounced. But you can STILL report this SPAM to SpamCop.net and to the FTC.

The point is not to give up. Simply deleting the crap alone is not enough. If your local ISP (or the sender's true ISP) gathers enough complaints then they can file a Federal Cause of Action against the Spammers. It is not economical for a user to do so but it IS economical for an ISP because SPAM takes up resources and bandwidth on their pipline and servers for thousands (if not millions) of users!

FIGHT SPAM. If you are a Spammer you are a corrupt, amoral individual! Do not believe your self-talk that it is "just business" or "everyone is doing it." You are a leech on society and are no better than a petty thief!

Karma will eventually catch up to you!
__________________
PowerBook G4 667MHz | 768 MB RAM | CD-RW | 60GB IBM TravelStar | 100GB FireWire Drive (7,200 RPM, Oxford 911) | Canon Printer & UMAX Scanner | OS X 10.3

"AirPort" (n): 1. Cleared, leveled hard-surfaced area where aircraft take off & land; has control tower, hangars, passenger terminals, & cargo area. 2. Kick-ass, cutting-edge wireless networking technology allowing anyone with a brain to surf the Internet from anywhere in one's home, school, office, local café, pub, or prison cell.
Reply With Quote
  #8  
Old March 11th, 2002, 04:54 PM
-
 
Join Date: Jun 2001
Posts: 502
Thanks: 0
Thanked 0 Times in 0 Posts
apb3 is on a distinguished road
I too hate spam. It typically takes an hour (give or take) for me to go through my email everyday ( I have to make sure it is spam before I delete it due to the fact that I get email from individuals I do not know often and many of these emails are from foreign, and often spam-ridden, corners of the world - scripts are problematic for me). Sure my rules usually catch the "I want to xxxxxxx your xxxxxxx with a xxxxxx" or "watch these teen babes xxxxxxxx", you get the idea, but my main problem is those get rich quick schemes/sales pitches that mimic real business or legal correspondence. It seems they target me specifically! Ugh.

The main reason for posting that link was the time issue he raises. Anyone with half a brain and the inclination can see that your message was bounced 3 or 4 hours after it should have been and that the actual message (data) was sent successfully. Getting your ISP or mailhost to bounce automatically is key. It always ticks me off that Earthlink (my ISP) touts its "Spaminator," yet at least 25-30% of my spam was forwarded from that account before I set my rules to del all mail from there.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop the MySQL server? vikingshelmut Unix & X11 2 February 12th, 2003 10:18 AM
Protect yourself from spam! (theory) twister Mac OS X System & Mac Software 16 February 11th, 2003 07:55 AM
does 'Mail' have a spam filter? DooBall Apple News, Rumors & Discussion 5 June 20th, 2001 10:11 AM


All times are GMT -5. The time now is 04:07 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.