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 “:

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 = "" 
$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.Subject = "Emails Summary" 
$msg.Body = "Attached is the email server mailbox report" 

Read More ...