Transport rule is not working as expected

Copper Contributor
Hello All,
 
we have set forwarding from VIM@domain.com to VIM@sapprd.domain.com . Now we have requirement that vim@sapprd.domain.com should receive only email with PDF attachments. 
So I have created transport rule , 
 
rcpt to:  VIM@domain.com 
Action: reject the message and include the explanation 'Allow only PDF attach email.' with the status code: '5.7.1'
Except if...
Has an attachment with a file extension that matches one of these values: 'pdf'
 
when I send email to VIM@domain.com  , i got the NDR with message "Allow only PDF attach email.' with the status code: '5.7.1'" 
But at the same time email also get forwarded VIM@sapprd.domain.com 
 
I also created new transport rule as below, 

rcpt to: VIM@sapprd.domain.com
Action: Delete the message without notifying the recipient or sender
Except if :
has an attachment with a file extension that matches one of these values: 'PDF'
 
still emails getting forwarded to VIM@sapprd.domain.com 
 
 
Any idea how to resolved 
 
 
11 Replies

@sandipk 

 

Hi, please can you explain where you are setting the attachment action?  When I check the available actions for attachments,  I see the following;

 

Screenshot 2020-05-16 at 18.21.30.png

 

Was it one of these options that you chose please?

@PeterRising    i have used below option

 

sandipk_0-1589655051635.png

 

@sandipk 

 

OK, I have reproduced the rule, and for me it works just fine. I noticed that your second transport rule is setup slightly different to the first.  What happens if you match the settings to be the same as the first transport rule?

 

Also, what is the reason for the forwarding?  Are the messages kept in both mailboxes or old forwarded to the other one?

@PeterRising 

 

Thanks for the update. can you please use only first transport rule and check if the email are getting forwarded to forwarding address. 

Ideally using first transport rule , it should not allow forwarding of emails as well. 

 

We are keeping the copy in mailbox VIm@domain.com  and forwarding the emails to vim@sapprd.domain.com 

 

 

@sandipk 

 

I have reproduced both of your rules as follows;

 

Rule 1;

 

Screenshot 2020-05-18 at 08.05.17.png

 

Rule 2;

 

Screenshot 2020-05-18 at 08.05.32.png

 

The mailbox in rule 1 has forwarding enabled to the mailbox in rule 2, but also keeps a copy in both mailboxes.  

 

Testing results

 

When I send any email to the mailbox in rule 1, I get an NDR as expected.

 

When I send an email to the mailbox in rule 1, with a PDF attached, the email is received in both mailboxes as expected due to the forwarding.

 

When I send any email directly to the the mailbox in rule 2, nothing happens.

 

When I send an email to the mailbox in rule 2, with a PDF attached,  the email is received in the mailbox from rule 2 only.

 

Is this the behaviour you are hoping for?

@PeterRising 

 

Thanks for the update.

 

When you  send any email (non PDF attach) to the mailbox in rule 1 

 you get an NDR as expected.

but the the same time email getting forwarded to the mailbox in Rule 2. 

 

This should not happen as per the rule . can you please confirm the behavior  

 

 

 

@sandipk 

 

I can confirm that when I send any email (non PDF attach) to the mailbox in rule 1, I get an NDR as expected.  Also, the same email is not getting forwarded to the mailbox in Rule 2.   So for me, it is working as I think you wish it to?

@PeterRising 

Thanks Peter. 

unfortunately , its not working for me 

Whenever users send non pdf attach email to user in Rule 1 , i get NDR , but at the same time email getting forwarded to forwarding address. 

 

sandipk_0-1589790969419.png

Am i missing anything here 

@sandipk 

 

The only other thing I can think of is the order of processing for the transport rules.  Do you have rule 1 set with lower priority than rule 2?

@PeterRising 

hello Peter

 

I created rule 2 because Rule1 was not working as expected. 

 

@sandipk 

 

Don't think I explained myself very well there.  What I mean is, the order that the rules are processed in Exchange Online is important.  As in my example below, rule 1 gets triggered before rule 2, as rule 1 has a priority of 0, and rule 2 a priority of 1

 

Screenshot 2020-05-18 at 10.35.59.png

If your rule 2 has a lower priority number than rule 1,  then rule 2 would be triggered first and potentially ignore rule 1.  Make sense?