Wildcard Aliases
Our corporation is moving off of CommuniGate Pro onto Exchange 2007, and we are looking for the wildcard alias (don't know the actualy term for it) feature.Basically we need testuser+stuff@mydomain.com, testuser+853@mydomain.com, etc to deliver mail to testuser. This has to be done on the fly without administrator intervention. We create testuser, and testuser+* works (of course if there is an EMS command to do this, thats fine...we just can't continually create new aliases).Is this even available in Exchange 2007? Is there a work around or a third party application?
June 19th, 2008 7:00pm

I currenlty do not have a way to test this but it looks like you can setup a transportrule to perform the filtering based on FromAddressContains http://technet.microsoft.com/en-us/library/bb123927(EXCHG.80).aspx $Condition = Get-TransportRulePredicate FromAddressContains http://technet.microsoft.com/en-us/library/aa995960(EXCHG.80).aspx
Free Windows Admin Tool Kit Click here and download it now
June 19th, 2008 9:09pm

Im looking at this article.http://technet.microsoft.com/en-us/library/aa997187(EXCHG.80).aspxIs there some way to Regex the conditionals?if i were to do this in perl i would just do:if($definedaddress =~ /(\w+)+\w*\d*/sm) { $actualaddress = $1;}Any way i can do that with these
June 20th, 2008 2:54pm

Currently, Microsoft does NOT provide a way to do this. This was pretty popular at one time with small businesses or someone that wanted all mail to their domain to go to a specific address. However, you are creating a giant spam magnet that the bots will innundate. Keep that in mind. That being said, there is a company called Turbo Geeks that has a spiffy toold called MailBasket MD that is very configurable and will do pretty much what you want. I have tested it before and it does work great. http://www.turbogeeks.com/products/mailbasket.asp I checked their site and am not sure if they have an E2K7 version or not, but it might be worth checking in to.
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2008 3:26pm

you could also develop your own transport agent that does this for you. you could probably start with this http://www.codeplex.com/catchallagentand change the code slightly to create what you want.
June 22nd, 2008 4:28am

Okay, so the Perl programmer wrote a C# Transport Agent (woohoo). I basically altered the above agent's re-write of the address, and it worked beautifully. You'll notice that I have some includes that aren't necessarily required. The C# Express Studio complained when I didn't have them, so I went ahead and appeased it.This work is a derivative of the work found at http://www.codeplex.com/catchallagent. The catchallagent Transport Agent is Licensed under MS-PL, and as such, references to the license and source code must be referenced when altering it and redistributing it.using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;using Microsoft.Exchange.Data.Transport;using Microsoft.Exchange.Data.Transport.Smtp;using Microsoft.Exchange.Data.Transport.Email;using Microsoft.Exchange.Data.Transport.Routing;using Microsoft.Exchange.Data.Common;namespace Sample{ public class ReceiveAgentFactory : SmtpReceiveAgentFactory { public override SmtpReceiveAgent CreateAgent(SmtpServer server) { return new ReceiveAgent(server.AddressBook); } }}public class ReceiveAgent : SmtpReceiveAgent{ private AddressBook addressBook; public ReceiveAgent(AddressBook addressBook) { this.addressBook = addressBook; this.OnRcptCommand += new RcptCommandEventHandler(this.RcptToHandler); } public void RcptToHandler(ReceiveEventSource source, RcptCommandEventArgs rcptArgs) { //You don't have to add the last part of this, I just find that it reduces the overhead of depending on the regex string to process. if ((this.addressBook != null) && (this.addressBook.Find(rcptArgs.RecipientAddress) == null) && (rcptArgs.RecipientAddress.LocalPart.IndexOf("+") > -1)) { string regexString = @"^(\w+)\+\w+"; string newAddress = Regex.Replace(rcptArgs.RecipientAddress.LocalPart, regexString, "$1"); rcptArgs.RecipientAddress = new RoutingAddress(newAddress, rcptArgs.RecipientAddress.DomainPart); } return; }}
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2008 11:21am

Hi All, I am new to exchange server and all . I am trying above program but I didn't understand the function parameter "SmtpServer server" of CreateAgent() function . please help me on "SmtpServer "what value should I pass to that function CreateAgent(). Thank you In advance . Pravin Thokal
May 23rd, 2012 12:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics