Autorespond for certain domains only

We run an Exchange 2007 server, with around 200 users.  We have a number of domains registered, which we currently receive email for.  Some are old, and we are planning to abandon them, let the registration lapse, kill the MX records & remove then from the list of accepted domains.  We have let users know, and are waiting a few months so that they can inform senders.

Someone has suggested we should send back a response to anyone who tries to send email into our old domains, letting them know to use a new one.

ie. if Fred@hotmail.com   sends an email to Bill@ourolddomain.com, we would like Exchange to automatically send a response back saying "@ourolddomian.com is slated for retirement, can you please send future email to %username%@ourcurrent domain".  

Any ideas how to achieve this?
LVL 21
Mal OsborneAlpha GeekAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AkhaterCommented:
This can be done using transport rules,

the only thing is that transport rules in 2007 do not support variables so you will have to put something more generic
something like
 "@ourolddomian.com is slated for retirement, can you please send future email to @ourcurrent domain".  

0
Mal OsborneAlpha GeekAuthor Commented:
I had a look, but I can't figure it out.
Every user on our site has 8 or so email address.  ie Fred Bloggs has fbloggs@ourolddomain.com, as well as fbloggs@ourcurrentdomain.com. I only want a respose sent if mail is sent to the former.  I can't see how to specify a "sent to a domian" filter in the transport rule wizard.  It lets me specify a user, group etc, but this does not really help.  

Is there some way of filtering by the domain an email is sent to?
0
AkhaterCommented:
You are right man test the following

$condition = Get-TransportRulePredicate headercontains
$condition.MessageHeader = "to"
$condition.words= @("@domain.com")

$action = Get-TransportRuleAction RejectMessage
$action.RejectReason = "@ourolddomian.com is slated for retirement, can you please send future email to @ourcurrent domain"


new-TransportRule "Transport Rule Name" -conditions $condition -action $action

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Mal OsborneAlpha GeekAuthor Commented:
Close, but not quite what we are aiming for.  We want the email to still get delivered to the recipient, with a response sent back to the sender.  Your solution blocks the message at SMTP level.
0
AkhaterCommented:
I am sorry this is not possible you might want to look into a 3rd party tool, this option is not available in the transport rules.

Sorry
0
Mal OsborneAlpha GeekAuthor Commented:
OK, I had another idea.   Rather than sending a response in the rule, how about if I send a copy of the message a mailbox, then use an OOO message to fire back a response?  Trouble here is that the logic in the transport rule does not seem correct, I chaged the action, but the rule does not fire.
0
AkhaterCommented:
honestly I am not sure if it work like this !

are you receiving the emails in the OOF mailbox ?
0
Mal OsborneAlpha GeekAuthor Commented:
No, the rule does not seem to fire at all.
0
AkhaterCommented:
I am sorry Guess you will need to look into a 3rd party solution
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mal OsborneAlpha GeekAuthor Commented:
A third party solution is not really an answer I was looking for, but may prove to be correct.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.