View Single Post
Old 07-18-2007   #9 (permalink)
Rob Campbell


 
 

Re: Stop the smtp service on an Exchange 2007 server?

I think this is going to have to come from the smtp service log to find the
421 RC.
I believe the objective is not to bounce the email, but to defer any
delivery attempts for some period of time once a connection results in a 421,
not just for that email but for any email to that domain.

"Marco Shaw" wrote:

>
> > What I have in mind is something like this:
> >
> > Make a powershell script that parses the logfile at intervals, and if it
> > finds an smtp code 421 from hotmail, it will simply stop the smtp service on
> > the server, I know that this means that mail to all other domains will be
> > stopped also, but stopping mail to hotmail is top priority in this process,
> > so a solution where the script stops the outgoing queue or enables a filter
> > to stop outgoing mail to hotmail would be better but I dont know if thats
> > easier/possible.

>
> OK, I don't know where the SMTP code gets stored (get-eventlog,
> get-messagetrackinglog)?
>
> I did try this (formatting broken):
> set-TransportRule -Name 'hotmail' -Comments '' -Conditions
> 'Microsoft.Exchange.MessagingPolicies.Rules.Tasks.SentToScopePredicate','Microsoft.Exchange.MessagingPolicies.Rules.Tasks.HeaderContainsPredicate'
> -Actions
> 'Microsoft.Exchange.MessagingPolicies.Rules.Tasks.RejectMessageAction'
> -Exceptions -Identity 'hotmail'
>
> What this does is if I try to send something to an address that has
> "hotmail" in the to field (might need to make it more specifice like
> @hotmail.com), the message is rejected and a bounce back occurs.
>
> That's 1/2 of the solution...
>
> I love PowerShell!
>
> Marco
>
>
>

My System SpecsSystem Spec