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 20
Mal OsborneAlpha GeekAsked:
Who is Participating?
 
AkhaterConnect With a Mentor Commented:
I am sorry Guess you will need to look into a 3rd party solution
0
 
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
 
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
 
Mal OsborneAlpha GeekAuthor Commented:
A third party solution is not really an answer I was looking for, but may prove to be correct.
0
All Courses

From novice to tech pro — start learning today.