SmarterMail Update Removes IIS Rewrite Rules
Problem reported by Jim Rosemary - February 8, 2017 at 1:30 PM
Submitted
We recently updated SmarterMail to v15.5.6222.  After the update, we realized that webmail sessions were no longer automatically redirecting to use a secure ("https") connection.  The conclusion we came to is that the SmarterMail update removed the IIS rewrite rules we implemented to always redirect to a secure webmail connection.  Is this a bug?  Thanks
Jim Rosemary
New Tech Web, Inc.

6 Replies

Reply to Thread
1
Jay Altemoos Replied
I ran into this as well. I had to reconfigure the redirect rule on my IIS installation to https. I don't remember this happening in previous versions. Something must have changed for this to happen.
2
Michael Breines Replied
I'm fairly certain this has been a complaint for a long time. There is other forum discussion out there about forcing HTTPS connections. But as far as I know nothing has been resolved.
2
Sean Middlemore Replied
Yep, it's always done this as far as I'm aware. I have a protocol written that when SmarterMail is updated I re-add the redirect rules to IIS
2
Scarab Replied
Yes, the SmarterMail installer overwrites the \SmarterMail\MRS\web.config on every upgrade.
 
This will no longer be an issue in v16 going forward as there will be a toggle setting in SmarterMail to force HTTPS.
 
For those on v15 and older here is the solution:
 
If you don't want to keep adding your URL Rewrite for HTTP > HTTPS to the \MRS\web.config on every update then you would want to add your URL Rewrite at the Server level instead of the Website level (this is assuming that your server is only running SmarterMail and no other websites).
 
The global file is located at: %WINDOWS%\system32\inetsrv\config\applicationHost.config
 
You would add your Rewrite Rule as follows:
 
        <rewrite>
            <globalRules>
                <rule name="Redirect to HTTPS" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
                </rule>
            </globalRules>
        </rewrite>
Of course, you will have to stop the World Wide Web Publishing Service before making this change and restart it when your change is complete, but you do not have to stop/start the SmarterMail service. 
 
Note: if you are hosting multiple sites (i.e., mail.customerdomain.com) but only one SSL Certificate for the Mail Server's Hostname then you'd change https://{HTTP_HOST}/{R:1} to https://fqdn.yourserver.com/{R:1}
0
Jean-Guy Dubois Replied
Hi,
 
why not set Smartermail website for only listen on 433
Then create another website listening on 80 for smartermail hostnames with IIS redirection ?
0
CCC Replied
This configuration has worked well for us.

Reply to Thread