Submitted by lulatsch66 on Fri, 11/08/2019 - 19:58
using Debian 10 buster - but should not matter.
When you create a Website redirect, ".well-known" is correctly excluded in the RedirectMatch.
RedirectMatch ^/(?!.well-known)(.*)$ https://new-domain.tld
But then, mail autoconfig does not work anymore, so I'd suggest to do something like this:
RedirectMatch ^/(?!.well-known|mail/config-v1.1.xml|cgi-bin/autoconfig.cgi|AutoDiscover)(.*)$ https://new-domain.tld
or may be include all such ScriptAliases, if any?
Status:
Active
Comments
Submitted by andreychek on Sat, 11/09/2019 - 00:33 Comment #1
Thanks for your report! I've passed this along to Jamie for further comment.
Do you recall what error you were seeing in your email client when you don't include the fix you've provided?
And also, what email client/version are you using?
Thanks!
Submitted by JamieCameron on Sat, 11/09/2019 - 16:06 Comment #2
Also, are you creating this redirect yourself in Virtualmin, or using it's built-in support for mail autoconfig?
Submitted by lulatsch66 on Sat, 04/04/2020 - 12:12 Comment #3
Hello Jamie, Joe,
thanx for your answers and sorry for my late reply, was travelling abroad at this time, so must have missed it. Now found my own issue in a similar case ... ;)
used the built-in support for mail autoconfig and the built-in Website redirect
had to do some remote support for someone using Outlook, I think we tested using this tool: https://www.priasoft.com/autodiscover-testing-tool/
could track the creation of this redirect down using Webmin logged actions to half a year ago, created by 'save_redirect.cgi'
a bash one liner to find all occurrences for domains with mail and autoconfig/redirects I use atm:
for i in `virtualmin list-domains --enabled --with-feature mail --name-only --no-alias` ; do file=/etc/apache2/sites-available/\*$i.conf ; ls -1 $file && echo found $i ; egrep "Redirect.*(well-known|autoconfig)" $file ; echo ; done
Hope this helps someone.
I think it would be valueable if "virtualmin check-config" could find things like this:
vhosts with mail and autoconfig enabled, but missing "Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi"
vhosts with RedirectMatch and no .well-known exclude
Best regards, Falko