Coder Social home page Coder Social logo

computer-tsu / check-exchange-smtp-logs-to-get-unique-sender-ip-addresses Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r-milne/check-exchange-smtp-logs-to-get-unique-sender-ip-addresses

0.0 0.0 0.0 9 KB

Check Exchange SMTP Logs to Get List of Unique Sender IP Addresses

Home Page: https://blog.rmilne.ca/2019/01/25/checking-exchange-smtp-logs-to-determine-usage/

PowerShell 100.00%

check-exchange-smtp-logs-to-get-unique-sender-ip-addresses's Introduction

Check Exchange SMTP Logs To Get Unique Sender IP Addresses

Check Exchange SMTP Logs To Get Unique Sender IP Addresses

.SYNOPSIS Script is intended to help determine servers that are using an Exchange server to connect and send email.

This is especially pertinent in a decomission scenario, where the logs are to be checked to ensure that all SMTP traffic has been moved to the correct endpoint.

.DESCRIPTION Logs on an Exchange 2010 servers are here by default. C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive Note that the script can be easily modified for other versions, or to look at the SMTPSend logs instead.

An empty array is declared that will be used to hold the data gathered during each iteration. This allows for the additional information to be easily added on, and then either echo it to the screen or export to a CSV file

Sample Exchange 2010 SMTP Receive log #Software: Microsoft Exchange Server #Version: 14.0.0.0 #Log-type: SMTP Receive Protocol Log #Date: 2019-01-25T00:03:58.478Z #Fields: date-time,connector-id,session-id,sequence-number,local-endpoint,remote-endpoint,event,data,context 2019-01-25T00:03:58.478Z,TAIL-EXCH-1\Internet Mail,08D675E58CA1DA38,0,10.0.0.6:25,185.234.217.220:61061,+,, 2019-01-25T00:03:58.494Z,TAIL-EXCH-1\Internet Mail,08D675E58CA1DA38,1,10.0.0.6:25,185.234.217.220:61061,*,SMTPSubmit SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions

.ASSUMPTIONS Logging was enabled to generate the required log files. Logging was enabled previously, and time was allowed to colled the data in the logs Not all activity will be present on a given server. Will have to check multiple in most deployments. Not all activity will be present in the logs. For example, Exchange maintains 30 days of logs by default.
This will not catch connections for processes which send email once a quarter or once a fiscal year. Assuption is that something will likely be negatively impacted.
Application ownsers should have been told to update their config, so we can say "unlucky" to them...

You can live with the Write-Host cmdlets :)
You can add your error handling if you need it. 

.VERSION 1.0 25-1-2019 -- Initial script released to the scripting gallery

check-exchange-smtp-logs-to-get-unique-sender-ip-addresses's People

Contributors

r-milne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.