{"id":62,"date":"2015-04-17T20:17:02","date_gmt":"2015-04-17T17:17:02","guid":{"rendered":"http:\/\/melic.com\/wp1\/?p=62"},"modified":"2016-12-23T11:00:00","modified_gmt":"2016-12-23T08:00:00","slug":"exchange-yonetimi-spam-monitoring-ornekler-1","status":"publish","type":"post","link":"https:\/\/melic.com\/wp1\/exchange-yonetimi-spam-monitoring-ornekler-1\/","title":{"rendered":"Exchange Y\u00f6netimi &#8211; Spam Monitoring \u00d6rnekler -1"},"content":{"rendered":"<p><strong>\u00d6rnekler ile Exchage anti-spam loglama ve Raporlama<\/strong><\/p>\n<p><strong><em>\u00d6rnek -1<\/em><\/strong><br \/>\nKullan\u0131c\u0131 tan\u0131mlayarak Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.recipients -like &#8220;kullanici@domain.com&#8221;}<\/span><\/p>\n<p><em><strong>\u00d6rnek -2<\/strong><\/em><br \/>\nG\u00f6nderici tan\u0131mlayarak Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.P1FromAddress -like &#8220;kullan\u0131c\u0131@sirket.com&#8221; -or $_.P2FromAddresses -like &#8220;kullan\u0131c\u0131@firma.com&#8221;}<\/span><\/p>\n<p>P1FromAddress ile P2FromAddresses aras\u0131ndaki fark nedir?<br \/>\nTelnet ba\u011flant\u0131s\u0131 ile \u00f6rnekleyelim :<br \/>\n&#8220;helo me<br \/>\nehlo me<br \/>\nmail from:P1FromAddress<br \/>\nrcpt to:kullan\u0131c\u0131@domain.com<br \/>\ndata<br \/>\nmail from:P2FromAddresses<br \/>\nsubject:test1<br \/>\n.<br \/>\nquit&#8221;<\/p>\n<p>Burada MX kay\u0131tlar\u0131nda baska bir sunucudan ba\u015fka bir domain ile mail gelmesi olarak d\u00fc\u015f\u00fcnebilirsiniz.<\/p>\n<p><strong>\u00d6rnek -3<\/strong><br \/>\nG\u00f6nderinin domain bilgisini girerek Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.P1FromAddress -like &#8220;*contoso.com&#8221; -or $_.P2FromAddress -like &#8220;*corp.com&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -4<\/strong><br \/>\nG\u00f6nderinin IP bilgisini girerek Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.IPAddress -eq &#8220;7.7.7.7&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -5a<\/strong><br \/>\nBLP &#8211; Sebep ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Reason -eq &#8220;BlockListProvider&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -5b<\/strong><br \/>\nSAQT &#8211; Sebep ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Reason -eq &#8220;SclAtOrAboveQuarantineThreshold&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -6a<\/strong><br \/>\nCFA &#8211; Agent bilgisi ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Agent -eq &#8220;Connection Filtering Agent&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -6b<\/strong><br \/>\nSenderID &#8211; Agent bilgisi ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Agent -eq &#8220;SenderID Agent&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -6c<\/strong><br \/>\nSFA &#8211; Agent bilgisi ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Agent -eq &#8220;Sender Filter Agent&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -6\u00e7<\/strong><br \/>\nRFA &#8211; Agent bilgisi ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Agent -eq &#8220;Recipient Filter Agent&#8221;}<\/span><\/p>\n<p><strong>\u00d6rnek -6d<\/strong><br \/>\nERA &#8211; Agent bilgisi ile Exchange Anti-spam logunu tarama\/raporlama:<br \/>\n<span style=\"color: #ff0000;\">Get-AgentLog | where {$_.Agent -eq &#8220;Edge Rules Agent&#8221;}<\/span><\/p>\n<p>Ve geldik fasulyenin faydalar\u0131na :D<br \/>\nBir tane powershell script yazaca\u011f\u0131z ve bu script ile g\u00fcnl\u00fck ve haftal\u0131k istatistikleri kendimize mail ile g\u00f6nderece\u011fiz. Bir notepad al\u0131p a\u015fa\u011f\u0131daki scripti IstatistikselRapor.ps1 olarak script klas\u00f6r\u00fcne kaydedin. Sonra istedi\u011finiz zaman manuel yada cron ile \u00e7a\u011f\u0131rabilirsiniz.<\/p>\n<pre><span style=\"color: blue; font-weight: bold;\">Add-PSSnapIn<\/span><span style=\"color: black;\"> Microsoft.Exchange.Management.PowerShell.E2010\r\n<\/span><span style=\"color: darkred;\">$HTMLReport<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: red;\">\".\\report.html\"<\/span>\r\n<span style=\"color: darkred;\">$MailTo<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: red;\">\"kullanici@domain.com\"<\/span>\r\n<span style=\"color: darkred;\">$MailServer<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: red;\">\"Exchange Sunucusu i\u00e7  IP adresi\"<\/span>\r\n<span style=\"color: darkred;\">$MailFrom<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: red;\">\"ExchangeAdmin@domain.com\"<\/span>\r\n\r\n<span style=\"color: darkred;\">$a1<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: dimgrey;\">Get-AgentLog<\/span> <span style=\"color: blue;\">-<\/span><span style=\"color: black;\">StartDate (<\/span><span style=\"color: blue; font-weight: bold;\">Get-Date<\/span><span style=\"color: black;\">).AddDays(<\/span><span style=\"color: blue;\">-<\/span><span style=\"color: black;\">1<\/span><span style=\"color: black;\">) <\/span><span style=\"color: blue;\">-<\/span><span style=\"color: black;\">EndDate (<\/span><span style=\"color: blue; font-weight: bold;\">Get-Date<\/span><span style=\"color: black;\">)\r\n<\/span><span style=\"color: darkred;\">$a2<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: darkred;\">$a1<\/span> <span style=\"color: blue;\">|<\/span> <span style=\"color: #c00000; font-weight: bold;\">where<\/span><span style=\"color: black;\"> { <\/span><span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"RejectMessage\"<\/span> <span style=\"color: blue;\">-or<\/span> <span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"RejectCommand\"<\/span> <span style=\"color: blue;\">-or<\/span> <span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"QuarantineMessage\"<\/span><span style=\"color: black;\"> }\r\n<\/span><span style=\"color: darkred;\">$a3<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: darkred;\">$a1<\/span> <span style=\"color: blue;\">|<\/span> <span style=\"color: #c00000; font-weight: bold;\">where<\/span><span style=\"color: black;\"> { <\/span><span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"AcceptMessage\"<\/span><span style=\"color: black;\"> }\r\n\r\n<\/span><span style=\"color: darkred;\">$b1<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: dimgrey;\">Get-AgentLog<\/span> <span style=\"color: blue;\">-<\/span><span style=\"color: black;\">StartDate (<\/span><span style=\"color: blue; font-weight: bold;\">Get-Date<\/span><span style=\"color: black;\">).AddDays(<\/span><span style=\"color: blue;\">-<\/span><span style=\"color: black;\">7<\/span><span style=\"color: black;\">) <\/span><span style=\"color: blue;\">-<\/span><span style=\"color: black;\">EndDate (<\/span><span style=\"color: blue; font-weight: bold;\">Get-Date<\/span><span style=\"color: black;\">)\r\n<\/span><span style=\"color: darkred;\">$b2<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: darkred;\">$b1<\/span> <span style=\"color: blue;\">|<\/span> <span style=\"color: #c00000; font-weight: bold;\">where<\/span><span style=\"color: black;\"> { <\/span><span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"RejectMessage\"<\/span> <span style=\"color: blue;\">-or<\/span> <span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"RejectCommand\"<\/span> <span style=\"color: blue;\">-or<\/span> <span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"QuarantineMessage\"<\/span><span style=\"color: black;\"> }\r\n<\/span><span style=\"color: darkred;\">$b3<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: darkred;\">$b1<\/span> <span style=\"color: blue;\">|<\/span> <span style=\"color: #c00000; font-weight: bold;\">where<\/span><span style=\"color: black;\"> { <\/span><span style=\"color: darkred;\">$_<\/span><span style=\"color: black;\">.Action <\/span><span style=\"color: blue;\">-like<\/span> <span style=\"color: red;\">\"AcceptMessage\"<\/span><span style=\"color: black;\"> }\r\n\r\n<\/span><span style=\"color: darkred;\">$Output<\/span> <span style=\"color: blue;\">=<\/span> <span style=\"color: red;\">\"&lt;html&gt; \r\n&lt;body&gt; \r\n&lt;font size=\"\"1\"\" face=\"\"Arial,sans-serif\"\"&gt; \r\n&lt;h3 align=\"\"center\"\"&gt;Exchange Antispam Report&lt;\/h3&gt; \r\n&lt;h5 align=\"\"center\"\"&gt;Generated $((Get-Date).ToString())&lt;\/h5&gt; \r\n&lt;\/font&gt; \r\n&lt;table border=\"\"0\"\" cellpadding=\"\"3\"\" style=\"\"font-size:8pt;font-family:Arial,sans-serif\"\"&gt; \r\n&lt;tr bgcolor=\"\"#009900\"\"&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;Recieved Messages per day:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;Rejected Messages per day:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;% Rejected Messages per day:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;Accepted Messages per day:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;% Accepted Messages per day:&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;\r\n&lt;tr bgcolor=\"\"#dddddd\"\"&gt;&lt;th&gt;$($a1.count)&lt;\/th&gt;\r\n&lt;th&gt;$($a2.count)&lt;\/th&gt;\r\n&lt;th&gt;$([math]::Round(($a2.count\/$a1.count)*100))&lt;\/th&gt;\r\n&lt;th&gt;$($a3.count)&lt;\/th&gt;\r\n&lt;th&gt;$([math]::Round(($a3.count\/$a1.count)*100))&lt;\/th&gt;\r\n&lt;\/tr&gt;&lt;\/table&gt;\r\n&lt;table border=\"\"0\"\" cellpadding=\"\"3\"\" style=\"\"font-size:8pt;font-family:Arial,sans-serif\"\"&gt; \r\n&lt;tr bgcolor=\"\"#009900\"\"&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;Recieved Messages per week:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;Rejected Messages per week:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;% Rejected Messages per week:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;Accepted Messages per week:&lt;\/font&gt;&lt;\/th&gt; \r\n&lt;th&gt;&lt;font color=\"\"#ffffff\"\"&gt;% Accepted Messages per week:&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;\r\n&lt;tr bgcolor=\"\"#dddddd\"\"&gt;&lt;th&gt;$($b1.count)&lt;\/th&gt;\r\n&lt;th&gt;$($b2.count)&lt;\/th&gt;\r\n&lt;th&gt;$([math]::Round(($b2.count\/$b1.count)*100))&lt;\/th&gt;\r\n&lt;th&gt;$($b3.count)&lt;\/th&gt;\r\n&lt;th&gt;$([math]::Round(($b3.count\/$b1.count)*100))&lt;\/th&gt;\r\n&lt;\/tr&gt;&lt;\/table&gt;\r\n&lt;\/body&gt;&lt;\/html&gt;\"<\/span><span style=\"color: black;\">;\r\n\r\n<\/span><span style=\"color: darkred;\">$Output<\/span> <span style=\"color: blue;\">|<\/span> <span style=\"color: blue; font-weight: bold;\">Out-File<\/span> <span style=\"color: darkred;\">$HTMLReport<\/span>\r\n\r\n<span style=\"color: blue; font-weight: bold;\">Send-MailMessage<\/span> <span style=\"color: #3399ff;\">-Attachments<\/span> <span style=\"color: darkred;\">$HTMLReport<\/span> <span style=\"color: #3399ff;\">-To<\/span> <span style=\"color: darkred;\">$MailTo<\/span> <span style=\"color: #3399ff;\">-From<\/span> <span style=\"color: darkred;\">$MailFrom<\/span> <span style=\"color: #3399ff;\">-Subject<\/span> <span style=\"color: red;\">\"Exchange Antispam Report\"<\/span> <span style=\"color: #3399ff;\">-BodyAsHtml<\/span> <span style=\"color: darkred;\">$Output<\/span> <span style=\"color: #3399ff;\">-SmtpServer<\/span> <span style=\"color: darkred;\">$MailServer<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u00d6rnekler ile Exchage anti-spam loglama ve Raporlama \u00d6rnek -1 Kullan\u0131c\u0131 tan\u0131mlayarak Exchange Anti-spam logunu tarama\/raporlama: Get-AgentLog | where {$_.recipients -like &#8220;kullanici@domain.com&#8221;} \u00d6rnek -2 G\u00f6nderici tan\u0131mlayarak Exchange Anti-spam logunu tarama\/raporlama: Get-AgentLog | where {$_.P1FromAddress -like &#8220;kullan\u0131c\u0131@sirket.com&#8221; -or $_.P2FromAddresses -like &#8220;kullan\u0131c\u0131@firma.com&#8221;} P1FromAddress ile P2FromAddresses aras\u0131ndaki fark nedir? Telnet ba\u011flant\u0131s\u0131 ile \u00f6rnekleyelim :&#8230;<\/p>\n","protected":false},"author":1,"featured_media":155,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange","category-teknoloji"],"_links":{"self":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":3,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts\/62\/revisions\/65"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/media\/155"}],"wp:attachment":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}