RE: Script to find unique addresses

2010-12-10 Thread Campbell, Rob
Thanks :)

-Original Message-
From: Michael B. Smith [mailto:mich...@smithcons.com] 
Sent: Thursday, December 09, 2010 12:44 PM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Nice.

Regards,

Michael B. Smith
Consultant and Exchange MVP
http://TheEssentialExchange.com


-Original Message-
From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net] 
Sent: Thursday, December 09, 2010 12:12 PM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Try this.  You'll need to edit the $hts with the names of your hub transport 
servers, and set the $start and $end, and edit the last line for the directory 
path for the csv (or just remove that line if you don't want to keep the .csv, 
but I expect you'll want that).


$hts = "",""
$start = "12/08/2010"
$end = "12/09/2010"
$recipients = @{}
$hts |
% {Get-MessageTrackingLog -server $_ -start $start -end $end -EventId 
receive -resultsize unlimited} |
%{if ($_.source -eq "smtp"){
$_.recipients |% {[int]$recipients[$_] += 1}
 }
 }

$stats = @()
$recipients.keys | sort |
% {
$stat = ""|select address,count
$stat.address = $_
$stat.count = $recipients[$_]
$stats += $stat
  }

$stats | ft -auto
$stats | export-csv c:\\address_stats.csv -notype

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Thursday, December 09, 2010 10:08 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Recipients.  

We're looking at an anti-spam system. A "user" (by their definition) is an 
email address that actually receives non-spam email. We've had a number of 
consolidations recently that have led to a lot of people having multiple 
addresses. We also have a lot of distribution groups. We're pretty unclear on 
which ones are actually being used, and therefore would count in the licensing.



Steve Hart

Network Administrator

503.491.4343 -Direct | 503.492.8160 - Fax


-Original Message-
From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net] 
Sent: Thursday, December 09, 2010 6:02 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Do you want the unique addresses of the senders, or the recipients, or both?

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Wednesday, December 08, 2010 2:49 PM
To: MS-Exchange Admin Issues
Subject: Script to find unique addresses



Does anyone have a shell script that they'd be willing to share that would list 
the unique email addresses on inbound mail for a given time range?



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage 

RE: Script to find unique addresses

2010-12-09 Thread Michael B. Smith
Nice.

Regards,

Michael B. Smith
Consultant and Exchange MVP
http://TheEssentialExchange.com


-Original Message-
From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net] 
Sent: Thursday, December 09, 2010 12:12 PM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Try this.  You'll need to edit the $hts with the names of your hub transport 
servers, and set the $start and $end, and edit the last line for the directory 
path for the csv (or just remove that line if you don't want to keep the .csv, 
but I expect you'll want that).


$hts = "",""
$start = "12/08/2010"
$end = "12/09/2010"
$recipients = @{}
$hts |
% {Get-MessageTrackingLog -server $_ -start $start -end $end -EventId 
receive -resultsize unlimited} |
%{if ($_.source -eq "smtp"){
$_.recipients |% {[int]$recipients[$_] += 1}
 }
 }

$stats = @()
$recipients.keys | sort |
% {
$stat = ""|select address,count
$stat.address = $_
$stat.count = $recipients[$_]
$stats += $stat
  }

$stats | ft -auto
$stats | export-csv c:\\address_stats.csv -notype

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Thursday, December 09, 2010 10:08 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Recipients.  

We're looking at an anti-spam system. A "user" (by their definition) is an 
email address that actually receives non-spam email. We've had a number of 
consolidations recently that have led to a lot of people having multiple 
addresses. We also have a lot of distribution groups. We're pretty unclear on 
which ones are actually being used, and therefore would count in the licensing.



Steve Hart

Network Administrator

503.491.4343 -Direct | 503.492.8160 - Fax


-Original Message-
From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net] 
Sent: Thursday, December 09, 2010 6:02 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Do you want the unique addresses of the senders, or the recipients, or both?

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Wednesday, December 08, 2010 2:49 PM
To: MS-Exchange Admin Issues
Subject: Script to find unique addresses



Does anyone have a shell script that they'd be willing to share that would list 
the unique email addresses on inbound mail for a given time range?



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist



RE: Script to find unique addresses

2010-12-09 Thread Campbell, Rob
Try this.  You'll need to edit the $hts with the names of your hub transport 
servers, and set the $start and $end, and edit the last line for the directory 
path for the csv (or just remove that line if you don't want to keep the .csv, 
but I expect you'll want that).


$hts = "",""
$start = "12/08/2010"
$end = "12/09/2010"
$recipients = @{}
$hts |
% {Get-MessageTrackingLog -server $_ -start $start -end $end -EventId 
receive -resultsize unlimited} |
%{if ($_.source -eq "smtp"){
$_.recipients |% {[int]$recipients[$_] += 1}
 }
 }

$stats = @()
$recipients.keys | sort |
% {
$stat = ""|select address,count
$stat.address = $_
$stat.count = $recipients[$_]
$stats += $stat
  }

$stats | ft -auto
$stats | export-csv c:\\address_stats.csv -notype

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Thursday, December 09, 2010 10:08 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Recipients.  

We're looking at an anti-spam system. A "user" (by their definition) is an 
email address that actually receives non-spam email. We've had a number of 
consolidations recently that have led to a lot of people having multiple 
addresses. We also have a lot of distribution groups. We're pretty unclear on 
which ones are actually being used, and therefore would count in the licensing.



Steve Hart

Network Administrator

503.491.4343 -Direct | 503.492.8160 - Fax


-Original Message-
From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net] 
Sent: Thursday, December 09, 2010 6:02 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Do you want the unique addresses of the senders, or the recipients, or both?

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Wednesday, December 08, 2010 2:49 PM
To: MS-Exchange Admin Issues
Subject: Script to find unique addresses



Does anyone have a shell script that they'd be willing to share that would list 
the unique email addresses on inbound mail for a given time range?



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist




RE: Script to find unique addresses

2010-12-09 Thread Steve Hart
Recipients.  

We're looking at an anti-spam system. A "user" (by their definition) is an 
email address that actually receives non-spam email. We've had a number of 
consolidations recently that have led to a lot of people having multiple 
addresses. We also have a lot of distribution groups. We're pretty unclear on 
which ones are actually being used, and therefore would count in the licensing.



Steve Hart

Network Administrator

503.491.4343 -Direct | 503.492.8160 - Fax


-Original Message-
From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net] 
Sent: Thursday, December 09, 2010 6:02 AM
To: MS-Exchange Admin Issues
Subject: RE: Script to find unique addresses

Do you want the unique addresses of the senders, or the recipients, or both?

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Wednesday, December 08, 2010 2:49 PM
To: MS-Exchange Admin Issues
Subject: Script to find unique addresses



Does anyone have a shell script that they'd be willing to share that would list 
the unique email addresses on inbound mail for a given time range?



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist



RE: Script to find unique addresses

2010-12-09 Thread Campbell, Rob
Do you want the unique addresses of the senders, or the recipients, or both?

-Original Message-
From: Steve Hart [mailto:sh...@wrightbg.com] 
Sent: Wednesday, December 08, 2010 2:49 PM
To: MS-Exchange Admin Issues
Subject: Script to find unique addresses



Does anyone have a shell script that they'd be willing to share that would list 
the unique email addresses on inbound mail for a given time range?



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


**
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist



Re: Script to find unique addresses

2010-12-08 Thread Kurt Buff
Shouldn't be too hard, using the 'uniq.exe' and 'cut.exe' utilities
from http://gnuwin32.sf.net set.

 cut foo.log -f1 -d, > sort | uniq > out.txt

or something close to that...

On Wed, Dec 8, 2010 at 12:49, Steve Hart  wrote:
>
>
> Does anyone have a shell script that they'd be willing to share that would 
> list the unique email addresses on inbound mail for a given time range?
>
>
>
> ---
> To manage subscriptions click here: 
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to listmana...@lyris.sunbeltsoftware.com
> with the body: unsubscribe exchangelist
>
>

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


Script to find unique addresses

2010-12-08 Thread Steve Hart


Does anyone have a shell script that they'd be willing to share that would list 
the unique email addresses on inbound mail for a given time range?



---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist