Version 60 - ActiveSync - Not Working

I have recently setup a new mail-in-a-box (v60) and have noticed that ActiveSync is not working. It is important to mention here that my mail-in-a-box status page is not reporting any issues whatsoever and SSL certificates have been generated and assigned.

I have tried accessing ActiveSync on mail clients ‘Mail’ and ‘Gmail’ both applications report that they are unable to add the email due to security concerns.

Has anyone else been able to get ActiveSync working with v60?

See this post from @stylnchris for a possible resolution for active sync not working (as provided by the zpush application)

I think my fix only fixes z-push-admin, I can’t actually test if the server is pushing mail. Some indications seem like php7.4 is needed for it.

Thanks @latinhypercube and @stylnchris, so it sounds like I’ll need to sit tight for a fix then.

I’m pretty sure this post details almost exactly how to fix it all?

Ok @stylnchris, I’ll give it a shot - see how it goes.

@cinergi

I don’t suppose you could just sum up all of the changes you made in one post without referencing everything separately in each post?

Perhaps you could put the details here and/or here: z-push-admin broken in v60 · Issue #2178 · mail-in-a-box/mailinabox · GitHub

I’m not specifically sure how easy or long it will take for a fix to come as @JoshData doesn’t seem to maintain the Z-Push setup. I really wish I was a “coder” I’d like to be able to get to a place were I can make a pull-request. Any idea who was maintaining Z-Push in MiaB?

Ok @stylnchris, I have done all but the last step. Was a little unsure/unclear what I should be changing here:-

  • Edit /usr/local/lib/z-push/backend/caldav/caldav.php as per the end of this thread .

What are your thoughts?

Think it is:

vim /usr/local/lib/z-push/backend/caldav/caldav.php
then “escape key” then : type “setnu” then enter (this gives you line numbers)
go to line 847
make sure it says this:

might need a “i” key for insert at some point here – sorry I dont know if you know vim or not…

$message->reminder = $interval->format("%i") + $interval->format("%h") * 60 + $interval->format("%d") * 60 * 24;

then “escape key” again then : and type “wq” enter

Nano could probably work here too: nano /usr/local/lib/z-push/backend/caldav/caldav.php then Control+_ type 847. change the line

Also not sure if there is any “service” to bounce like

service php8.0-fpm restart
service nginx restart

or a reboot of the box in general just to ensure there is no cache or something like that?

Just a warning. After using Z-Push today with the changes indicated in my last post above, it turns out that it’s unstable. I saw strange behavior like mail folders and emails disappearing and reappearing, endless loading, etc. I also saw many errors in the Z-Push log regarding array out-of-bounds in carddav.php. It’s really not usable in this state.

I think the fundamental problem is that from what I understand, Z-Push does not yet officially support PHP 8.x. I don’t think @JoshData can do anything about it until PHP 8.0 support is added upstream by the Z-Push project. In this post, someone installed PHP 7.4 to get Z-Push to work; I don’t know what other implications this may have for MIAB - perhaps @JoshData could let us know if this is a good idea.

1 Like

@stylnchris Thank you. So I have performed all the additional steps and it seems to now be working via ActiveSync.

I am a little concerned with @cinergi comment being unstable.

Any chance this issue will be fixed in an upcoming MITB release? I really don’t want to be going around messing with the filesystem just in case the patch in an upcoming release conflict with these file edits and causes it to break even more.

Same here @st0rm

Hoping this will be fixed soon. Although I have hacked my one, I may need to perform a fresh install after fixed.

1 Like

Hi All,

Just posting here as this came up as the top listing when searching the forum for ActiveSync.

I have a working script to patch standard MIAB, if your willing to test it.
curl -s https://mat.id.au/zpushpatch.sh | sudo bash
Feedback is welcome.

This pulls Z-Push from an updated repo and re-runs the mailinabox set up to install it.

The updared repo is GitHub - matidau/Z-Push: PHP8 support and other bug fixes for Z-Push in mailinabox

Cheers,
Mat