Tag Archives: logs

Exchange 2010 Anti-Spam logs?

To check the Anti-Spam logs on a Exchange 2010 server, you can do this:

  • The default logs files for the antispam agents are on: %exchangeinstallpath%TransportRoles\Logs\AgentLog
  • At this location you can see a lot of files (see the image)
  • logs1
  • on this files there are each email processed
  • for example in my domain “domain.com “:
Facebooktwitterredditpinterestlinkedinmail

Read More ...

Export Exchange Audit logs

One of the most powerfull feature of Exchange logs is the possibility to audit for example all emails send from the source domain: domain.com every day and send a mail to some user, this is one sample scrit that colects information and sends a mail:

$file= "c:\prova.csv" 
$mailboxdata= Get-MessageTrackingLog -Start "10/14/2013 00:00:00"| Where-Object {$_.sender -like "*@domain.com"} | Select-Object eventid,sender,timestamp,@{Name="Recipients";Expression={$_.recipients}},@{Name="RecipientStatus";Expression={$_.recipientstatus}},messagesubject $mailboxdata | export-csv "$file" 
$smtpServer = "127.0.0.1" 
$att = new-object Net.Mail.Attachment($file) 
$msg = new-object Net.Mail.MailMessage 
$smtp = new-object Net.Mail.SmtpClient($smtpServer) 
$msg.From = "sender@domain.com" 
$msg.To.Add("dest1@domain.com") 
$msg.To.Add("dest2@domain.com")
$msg.Subject = "Emails Summary" 
$msg.Body = "Attached is the email server mailbox report" 
$msg.Attachments.Add($att) 
$smtp.Send($msg) 
$att.Dispose()
Facebooktwitterredditpinterestlinkedinmail

Read More ...

Categories

Subscribe to my Newsletter




By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close