none
Additional rules to utilize send connectors (ie. use this one for attachments)

    Question

  • In Exchange Server 2016 (or 2013) is there any way to create a rule of some sort that affects which send connector is used in certain scenarios?

    For example, let's say I have three second connectors and two of these are smart hosts and I want to control "if attachment size is < 20 MB, use smart host 1", "if attachment size is between 20 MB and 50 MB use this smart host", and "if attachment size is > 50 MB, use this send connector to send directly from this mail server".

    This is one of the tasks I'd like to complete amongst others but I'm not entirely sure if this can be done.

    Thanks in advance!

    Saturday, October 17, 2015 6:09 PM

Answers

  • This answer is based on Exchange 2013; I don't know if any of this changes with Exchange 2016.

    Routing does NOT take into consideration the attachment size, the only consideration is the total message size.  Normally you'd multiply the attachment by something like at least 1.3 and maybe add something to that to determine your limit.

    You can create a transport rule based on the attachment size, but I don't see any rule action that will direct a message to a specific connector in on-premises Exchange.

    Try creating three connectors which I am advised will be selected based on the message size, which I've adjusted upward to try to account for attachment encoding overhead.

    New-SendConnector -Name AttLT20MB -AddressSpaces "SMTP:*;1" -MaxMessageSize 30MB -SmartHosts "smarthost1.domain.com" -DNSRoutingEnabled:$False
    New-SendConnector -Name Att20To50MBAtt -AddressSpaces "SMTP:*;10" -MaxMessageSize 70MB -SmartHosts "smarthost2.domain.com" -DNSRoutingEnabled:$False
    New-SendConnector -Name AttGT50MB -AddressSpaces "SMTP:*;20" -MaxMessageSize Unlimited -SmartHosts "smarthost3.domain.com" -DNSRoutingEnabled:$False

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    Celebrating 20 years of providing Exchange peer support!




    Saturday, October 17, 2015 10:51 PM
    Moderator

All replies

  • This answer is based on Exchange 2013; I don't know if any of this changes with Exchange 2016.

    Routing does NOT take into consideration the attachment size, the only consideration is the total message size.  Normally you'd multiply the attachment by something like at least 1.3 and maybe add something to that to determine your limit.

    You can create a transport rule based on the attachment size, but I don't see any rule action that will direct a message to a specific connector in on-premises Exchange.

    Try creating three connectors which I am advised will be selected based on the message size, which I've adjusted upward to try to account for attachment encoding overhead.

    New-SendConnector -Name AttLT20MB -AddressSpaces "SMTP:*;1" -MaxMessageSize 30MB -SmartHosts "smarthost1.domain.com" -DNSRoutingEnabled:$False
    New-SendConnector -Name Att20To50MBAtt -AddressSpaces "SMTP:*;10" -MaxMessageSize 70MB -SmartHosts "smarthost2.domain.com" -DNSRoutingEnabled:$False
    New-SendConnector -Name AttGT50MB -AddressSpaces "SMTP:*;20" -MaxMessageSize Unlimited -SmartHosts "smarthost3.domain.com" -DNSRoutingEnabled:$False

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    Celebrating 20 years of providing Exchange peer support!




    Saturday, October 17, 2015 10:51 PM
    Moderator
  • Hi,

    As per Ed's reply, this cannot be done. The commands Ed's provided are a best effort approach to meet as much of your requirements as possible but won't meet them exactly. Using these settings means that messages up to 30MB are sent through smarthost1, messages up to 70MB are sent through smarthost2 and messages of all sizes are sent through smarthost3. This means that messages of 10MB can be sent through any smarthost because you cannot set the minimum message size on a smarthost although I see that costs are set so that email attempts to use smarthost1 then if this doesn't apply then it'll use smarthost2 and so on. This does mean however that if smarthost1 doesn't respond for some reason then an email of 10MB will be sent through smarthost2.

    Perhaps the better question is why do you require this? Once we know the reasons behind this, we can suggest an alternative. It seems that large emails are causing performance issues in which case you are better off reducing the maximum size of email sent and educating users to use another method of file transfer or increasing the mail flow capacity in your Exchange environment by creating additional Exchange servers and smarthosts then load balancing them.

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010

    Blog: http://markgossa.blogspot.com

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.


    • Edited by Mark Gossa Sunday, October 18, 2015 11:58 PM
    Sunday, October 18, 2015 11:55 PM
  • Thank you both for your contributions, Mark's suggestion is a step in the right direction and will satisfy an aspect of the problem. I hadn't considered that imposing limits would provide some manner of a solution.

    Unfortunately there are no alternatives and there are more 'rules' I'd like to have for specifying the appropriate send connector but since this is not a possibility I will have to be more creative.

    Thanks gents.

    Tuesday, October 20, 2015 12:49 PM