Problems with Horde and Activesync


#1

I’ve managed to get Horde and active sync running. There were quite a lot of config things that needed to be done and I manage to locate most of those through the forum here and google. However, there are still two issues that I haven’t quite figured out.

The first is that when I set up an iPhone it doesn’t seem to use SSL by default. When I check the autodiscover.xml file returned by the server is has the URL displayed with http instead of https. I’m guessing this is related to the config being proxied through ucs and the docker container not knowing it has https available. I’m not sure what to do about this. Has anyone gotten this working right. I know I can go into the client and manually turn on https and that works, but I don’t want to let users setup there accounts with ActiveSync because many of them will surely leave them totally insecure.

I think the best thing would be to force https, but I’m not sure how to handle that with the proxy setup.

The second issue is that the Junk/Spam folders don’t work right with ActiveSync. When the client connects it will create a junk folder regardless of how the preference is set in the horde web interface. Once that junk folder is there the horde web interface gets a bit wonky and if you tell it to use junk for it’s spam folder the preference for the spam folder will show two spam folders, no junk folder, and you can no longer delete the spam folder so you only have one junk folder.

I’m guessing there is some way to setup the junk folder preference in horde to make that work right, but I couldn’t find any obvious solution online and I didn’t want to go blindly editing config files just yet.

Anyone have a solution for these issues or know where to point me for answers.

BTW, I am going to attempt to go back and retrace my steps and post this info up for others or file a bug report or something. Seems like horde is the default solution on UCS and it would be nice if it worked out of the box as much as possible. I realize that DNS and certificate setup will always need to be handled individually, but I don’t see why the other stuff couldn’t be already set up to work.

Oh, while I’m at it on email stuff. Is there a reason that the spam folder isn’t emptied automatically by the learn script. Maybe delete any spam older than 7 days be default or something like that. It would also be nice to have sender restrictions for using a regex file to block some of the bogus top level domains that are nothing but spam. It looks like you have to edit template files and create new ucr variables to make that work.

TIA


#2

I’m not sure what the best way to handle the cleartext email is. I’ve determined that the reason Horde generates the autodiscover URLs with http is simply because it is reach via http proxy to it’s container. I think that it the container was set up with a cert and the proxy was done with https that it would work as intended.

My shortcut solution for now is to force the generation of https URLs by editing the php.

I changed /usr/share/php/Horde/ActiveSync/Request/Autodiscover.php in the container as follows.

$httpsurl = str_replace( 'http://', 'https://', $properties['url'] );
            return '<?xml version="1.0" encoding="utf-8"?>
              <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
                <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
                  <Culture>' . $properties['culture'] . '</Culture>
                  <User>
                    <DisplayName>' . $properties['display_name'] . '</DisplayName>
                    <EMailAddress>' . $properties['email'] . '</EMailAddress>
                  </User>
                  <Action>
                    <Settings>
                      <Server>
                        <Type>MobileSync</Type>
                        <Url>' . $httpsurl . '</Url>
                        <Name>' . $httpsurl . '</Name>

Now my clients are set up with secure connections without needing the user to switch it on manually.


#3

Regarding this issue. It seems dovecot was set to automatically create and subscribe a Spam folder in it’s config. I’ve changed the UCR mail setting to make that Junk as that is what the iPhone expects with ActiveSync it seems. I can then delete the spam folder and it stays deleted. The only problem now is apparently with Horde’s behavior with the Junk folder. If the web interface is set up to designate the Junk folder as the Spam folder then when using active sync Horde seems to be sending the name Spam to the client instead of Junk. So the solution for the time being is to leave the Horde spam folder set to none.