Commands to select emails dropped by AD filter.

Unanswered Question
Oct 9th, 2007
User Badges:

Hi,
Yesterday I used this commands to choose some emails to populate the SPAMTRAPS.

I would like to share with ALL.

You need a linux box to use this commands.

I will start from the beginning to new users.


#----------------Commands start here


mkdir ironport

cd ironport


#Transfering logs from ironport


ftp ip_ironport

hash

bin

prompt

cd mail_logs

mget *

bye

#Filtering log files


cd ..


cat ironport/*|grep LDAPACCEPT>email


cat email|awk '{print $12 ; }'|sed 's/</g>//g'|tr '[A-Z]' '[a-z]'|sort|uniq -c|sort -rn>final


#To compact final file

bzip2 -zkv final

#---------------------------------


Then you can transfer final.bz2 file using Winscp.exe


The final file will look like this:


200 [email protected]

147 [email protected]

139 [email protected]

132 [email protected]

105 [email protected]

95 [email protected]

85 [email protected]

74 [email protected]

72 [email protected]

68 [email protected]

67 [email protected]

67 [email protected]

65 [email protected]

65 [email protected]

65 [email protected]

64 [email protected]

63 [email protected]

63 [email protected]

60 [email protected]

56 [email protected]

56 [email protected]

56 [email protected]

55 [email protected]

Please let me now your comments.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
mychrislo_ironport Wed, 10/10/2007 - 04:40
User Badges:

I have turned on Anti-spam archiving

Currently configured logs:
1. "antispam" Type: "Anti-Spam Logs" Retrieval: FTP Poll
2. "antivirus" Type: "Anti-Virus Logs" Retrieval: FTP Poll
3. "asarchive" Type: "Anti-Spam Archive" Retrieval: FTP Poll <-----

So can also retrieve those marked spam and be sent to spamcop for processing. But I did not use any script to automate it.

So everytime I need to get the asarchive files and use some perl script to split it into a single mail and forward to spamcop.


Thank you for sharing.

Actions

This Discussion