iphone (IOS) not able to send mails
-
@bob4os
No need to excuse yourselves ;-)
I am happy so find such a fine software out there for free and even have people helping on a SUNDAY at 10PM… -
Copy the GetSafeContents function from GitHub https://github.com/Z-Hub/Z-Push/blob/5fc6ca6e680b36f6d80ad052fc7c2ed89cc77a36/src/lib/utils/utils.php line 1425 and following into your “lib/utils/utils.php”, this should work until it has been properly fixed.
-
@bob4os Thank you very much. The question is if it makes sense to open all the small warnings and issues I see in the Z-push log like:
13/06/2021 22:42:35 [ 1411] [WARN] [maedball] /usr/share/z-push/backend/caldav/caldav.php:841 A non-numeric value encountered (2) 13/06/2021 22:59:24 [110456] [WARN] [maedball] BackendIMAP->StatMessage('4278c508','23'): Failed to retrieve overview: 13/06/2021 23:00:49 [ 1411] [WARN] [maedball] /usr/share/z-push/include/mimeDecode.php:865 iconv(): Detected an illegal character in input string (8) 13/06/2021 23:00:45 [ 1414] [WARN] [maedball] SyncObject->Check(): object from type SyncMail: parameter 'from' contains an invalid email address 'Angelika Klein <>'. Address is removed 13/06/2021 23:01:36 [ 1404] [ERROR] [maedball] Ignored broken message (SyncMail). Reason: '2' Folderid: 'i/48a41822' message id '196' 13/06/2021 23:01:53 [108025] [ERROR] [maedball] TimezoneUtil::guessTZNameFromPHPName() no compatible timezone found for 'UTC+01:00'. Returning 'GMT Standard Time'. Please contact the Z-Push dev team. 13/06/2021 23:02:04 [ 1407] [ERROR] [maedball] BackendIMAP->delete_calendar_dav(): event not found, we will end with zombie events 1 13/06/2021 23:01:53 [108025] [ERROR] [maedball] TimezoneUtil::guessTZNameFromPHPName() no compatible timezone found for 'UTC+01:00'. Returning 'GMT Standard Time'. Please contact the Z- 13/06/2021 23:04:29 [ 1411] [WARN] [maedball] cleanupDate('Fri, 1 Aug 2014 20:14:12 UT'): strtotime() failed - message might be broken. 13/06/2021 23:04:32 [106660] [WARN] [maedball] /usr/share/z-push/lib/core/streamer.php:309 strlen() expects parameter 1 to be string, array given (2) 13/06/2021 23:04:32 [106660] [WARN] [maedball] /usr/share/z-push/include/z_RFC822.php:182 trim() expects parameter 1 to be string, array given (2) 13/06/2021 23:05:35 [104908] [ERROR] [maedball] z_RFC822 error: Validation failed for:
-
Are you using PHP 8?
-
@bob4os
7.4 php-frm - > via Nginx.It is more or less a stock Ubuntu 20.04 lts with dovecot (imap) and Nextcloud (cal and card dav)
-
/usr/share/z-push/backend/caldav/caldav.php:841 - ZP-1571
/usr/share/z-push/include/mimeDecode.php:865 - ZP-1579
BackendIMAP->delete_calendar_dav(): event not found, we will end with zombie events - a mail with a cancelation of an event was found, the calendar entry has most likely never existed, so this is to be expected…These are new to me:
/usr/share/z-push/lib/core/streamer.php:309 strlen() expects parameter 1 to be string, array given (2)
/usr/share/z-push/include/z_RFC822.php:182 trim() expects parameter 1 to be string, array given (2) -
Just in case someone has the same issue.
I changed the imap settings to SSL and suddenly IOS was able to send mails.
Now i just need to find out why z-push is disconnecting once outlook is connected:
[WARN] [michael.klein] /usr/share/z-push/backend/imap/imap.php:127 imap_open(): Couldn't open stream {mailserver:993/imap/ssl} (2) [ERROR] [michael.klein] BackendIMAP->Logon(): can't connect as user 'michael.klein' on '{mailserver:993/imap/ssl}': Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (authenticate) [FATAL] [michael.klein] Exception: (AuthenticationRequiredException) - Access denied. Username or password incorrect [michael.klein] IP: 10.20.0.4 failed to authenticate user 'michael.klein' [WARN] [michael.klein] Unknown:0 Unknown: Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (authenticate) (errflg=2) (8)
-
Hello,
does anyone have founf a solution for this behavior?
I have the same problem a described in the initial post. The connection to my IMAP Backend with all Android Client are still working. All IOS device are not be able to send mails. In this account the did not have a mail adress, and are notifing the user with "Cannot Send Mail | Check the settings for the outgoing servers in settings -> Mail -> Accounts.
I tried different task to solve the problem, in example:-
All connection to the IMAP and SMTP backend are based on ssl/tls
-
Changed the provisioning to false
-
I deleted the account setting after every change and resets the device on the Z-Push frontend
Kind regards Andreas
-
-
@andreasb I was never able to get it working with the native IOS app. Instead i switched to the outlook app on IOS… It is not ideal but at least it works
-
@maedball
I found a solution.
After a couple of days in investigation what is the root cause for the strange behavior, I tried to setup the native IOS Mail APP with my full mail address as login name and now I can send mails as expected.
Maybe the missing AD is the problem in the Active Sync with communication in with a native IMAP backend.
Can you check this in your setup? -
@andreasb Sounds promising, unfortunately will this lead to a complete rebuild of my setup. I need to change dovecot aswell as nextcloud to work with emails instead of userids ;). However i will try, just not right away ;-). If this is however the reason, by what can it be caused, any idea?
-
I can get latest iOS working on Z-Push without issues.
It requires that the server is setup proper on SSL certs for the http server you use.
Is there a specific reason why you choose Nginx as opposed to Apache?
The packages install defaults Z-Push and Webapp through Apache. It works well.Beware of iOS Outlook app. This app is not using exchange directly, instead it uses cloud service that connects back to Z-Push (lol why!!) and it stores account related data in cloud services.
If you care about your privacy, stick to other mail clients. I invite you to read about that. And also keep a good eye on your Kopano access logs, you’ll be surprised of how much data is being accessed by the MS cloud.
Very old iOS versions would allow self-signed certs for email, but that changed since iOS 13.
-
@junglemarc: I had it also not working also with apache and tried nginx also with no luck.
The certificates are Lets encrypt certificates. I know about the outlook app (and i am also not happy with it) but been able to send mails on the go is kind of needed ;-).
-
pretty sure we can help you out get it working
When you setup the account in iOS Settings,
leave the domain section blank
only use the username / password and server fields.
What do you see in the logs if you give it a try?
-
@junglemarc I just did resetup the account still the same as i would set it up with autodiscover so doing it manual -> username, password, server, description, email. Everything works except sending mails :-(. Nothing in the log, not in the normal nor in the error log. It looks to me like something is not getting configured on IOS side. Kind of like a missing smtp setup (which is not needed i know ;-))
-
Ok so you are able to get the account to sync at first, good good.
Damn we are so very close to have it all working.
What about your postfix logs?
-
@junglemarc Well everything we achieved was already working before ;-).
Postfix also does not show any messages. As stated my feeling is that IOS is not setting up the sending part internal.
I have currently two clues which i have on my plate:
- Disable IPV6 on my server to check if it is an IPV6 based issues
- switch logon to email address instead of username
-
I’ve never used the autodiscover stuff - always done the profiles manually.
What distro are you on, and I assume you are using latest openssl?
-
Testing ipv4 only could be as simple as setting up a spare wifi router, that has ipv6 disabled at the dhcp server - without having to change anything on the server end.
Ohh, also, what if you specify the port number at the server field in iOS? yourdomain.something:port <-- i doubt that would influence something since you are already able to sync the profile… but worth the shot.
I wonder if any of the Kopano ninjas heard of a bug like this before?
-
I have disabled IPV6 (on the server ;-)) Still the problem persists.
But during testing i found out that there is a small window during setup when it is actually working (i know it really sounds strange). So for me it looks like the provisioning seems to be causing this.
Still i am on my way in testing the email address of username theory.