email

Find List Members

We are making a move from Reddfish Listserver (horrible - don't even Google it) to Mailman. Reddfish "integrated" with Exchange by working with AD groups and contact types. During this migration, I have to get the current lists into mailman which means I have to get a nice clean list of line seperated email addresses to feed into Mailman. Here is the code I use to get this to work. Very simple, but I hope it still proves useful.

 

Find Email Address in Exchange Org

Have you ever had a tough time finding where an email address exists in your Exchange Org. Often times this comes from have a forward on a mailbox or a contact set to an external address. If you run the following in your Exchange Management Shell, you should be able to find almost any address or portion of address in your org. I like to format the output too, so you can change the | format-table part to however you would like the output to read.


get-recipient -filter {emailaddresses -like "Pattern goes here"}|format-table name,recipienttype,emailaddresses

How Many Exchange Mailboxes

Have you ever wondered how many mailboxes you have in your Exchange org? Well, if you have Exchange 2007 installed (not even any mailboxes migrated yet) you can fire up the Exchange Management Shell and throw down the following.

get-mailbox|measure-object

That simple!

Exchange 2007 Mailbox Move Script

If you read my earlier post about how I divided up my users in preparation for a mailbox migration to Exchange 2007, then you may be interested in the scripts attached. These are the scripts that I use to run batches of user migrations. It asks a couple of questions and away you go. Warning, use at your own risk.

Outbound Sender Ratelimit

Here are the University, we are victims of phishing attacks geared at getting our users' account information so that the phishers can then use the credentials to launch spam attacks using our servers. The often leads to our domain getting on blacklists.

Multiple Primary SMTP Addresses

Happy 2009 Everyone!

Here at work we have an automated system to create accounts based on data from our ERP system. We noticed after migrated many users to Exchange 2007 from Exchange 2003, that the newly migrated users could not send to users who had forwarded their accounts using UI to our account management system. The error complained of the contact having multiple primary SMTP addresses. Here's the little Powershell code snippet I ran to fix the issue.


foreach ($contact in get-mailcontact -resultsize unlimited){

Update Rollup Madness.

For the past couple of months, one Exchange Server 2007 problem has plagued me. I had tried to install update rollup 3 in our organization. It worked fine on the front end servers, but certain services failed to start on the back ends. The Mail Submission, Mailbox Assistants, Replication Service, Search Indexer, and Service Host services all failed to "start in a timely manner." At that point, I punted and uninstalled the update.

Tracking Log Monitoring

In my previous post, I mentioned I would post the source code for the script that I use to monitor the Exchange message tracking logs in an attempt to find hacked accounts. Attached to this post is the source code. In our environment I look for when the file grows to beyond a GB. At that point, the script will email me. This is run as a scheduled task (sorry, my coding skills don't allow me to make something that runs as a service) every 10 minutes. Enjoy!

LogParser for Finding Spam Senders

I am the email administrator where I work and over the summer there has been an onslaught of phishing email specifically targeting our Windows Domain credentials. It's probably not a shock when I say that people fall for this and as such we run into times when compromised accounts are used to send spam out through our servers.

Exchange 2007 User Prep

I have been working on figuring out how to move our 20,000 mailboxes to an Exchange 2007 environment. The following script is one of the first steps. This script goes through each mail-enabled user account and tags one of the extensionAttributes with a number 1-number of mail stores I will end up with.