I am unable to send emails via z-push client due to the recipient missing. Receiving/reading emails works just fine.
I believe the problem lies in this line from the error log:
/usr/share/z-push/include/mimeDecode.php:529 Uninitialized string offset 0 (2)
Here are the error logs with full logging enabled:
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] -------- Start
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] cmd='SendMail' devType='iPhone' devId='DEVICE_ID' getUser='user@domain.tld' from='USER_IP' version='2.6.2' method='POST'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] Used timezone 'Etc/UTC'
29/03/2021 08:14:55 [ 5319] [ INFO] [user@domain.tld] [DEVICE_ID] BackendIMAP(): Using UTF-8 as Default Charset for Searches
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] Request::ProcessHeaders() ASVersion: 14.0
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] ZPush::CommandNeedsProvisioning(1): true
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] FileStateMachine->GetState() read '9333' bytes from file: '/var/lib/z-push/s/p/DEVICE_ID-devicedata'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] ASDevice data loaded for user: 'user@domain.tld'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] InterProcessData:__construct type: 'DEVICE_ID'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] TopCollector initialised with IPC provider 'IpcMemcachedProvider' with type '20'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] InterProcessData:__construct type: 'DEVICE_ID'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] LoopDetection initialised with IPC provider 'IpcMemcachedProvider' with type 'DEVICE_ID-1337'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] ZPush::HierarchyCommand(1): false
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] DeviceManager->ProvisioningRequired('215982743') saved device key '215982743': false
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] DeviceManager->getPolicyName(): determined policy name: 'default'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] DeviceManager->getProvisioningPolicies(): loaded 'default' policy.
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] ZPush::CommandNeedsAuthentication(1): true
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->Logon(): User 'user@domain.tld' is authenticated on '{mail.alt.domain.tld:993/imap/ssl}'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] ZPush::CommandNeedsPlainInput(1): false
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->SendMail(): RFC822: 1 bytes forward-id: 'false' reply-id: 'false' parent-id: 'false' SaveInSent: 'true' ReplaceMIME: 'false'
29/03/2021 08:14:55 [ 5319] [WBXML] [user@domain.tld] [DEVICE_ID]
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->SendMail(): We get the new message
29/03/2021 08:14:55 [ 5319] [WARN] [user@domain.tld] [DEVICE_ID] /usr/share/z-push/include/mimeDecode.php:529 Uninitialized string offset 0 (2)
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->SendMail(): We get the From and To
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->getFromHeaderValue(): No From address defined, we try for a default one
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->setReturnPathValue(): No Return-Path address defined, we use From
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->SendMail(): is a new message or we are replacing mime
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->SendMail(): Copying new headers
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->SendMail(): Final mail to send:
29/03/2021 08:14:55 [ 5319] [WBXML] [user@domain.tld] [DEVICE_ID] MIME-Version: 1.0
:
From: user@domain.tld
Return-path: user@domain.tld
Content-Type: multipart/mixed;
boundary="=_a52f8a0976f89ebfa33b87bd168451c2"
29/03/2021 08:14:55 [ 5319] [WBXML] [user@domain.tld] [DEVICE_ID] Body: This is a multi-part message in MIME format.
Body: --=_a52f8a0976f89ebfa33b87bd168451c2
Body: Content-Type: multipart/alternative;
Body: boundary="=_0932d3ab486ec6973ffec0c842e1a38b"
Body:
Body:
Body: --=_a52f8a0976f89ebfa33b87bd168451c2--
Body:
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->sendMessage(): SendingMail with mail
29/03/2021 08:14:55 [ 5319] [ERROR] [user@domain.tld] [DEVICE_ID] Mail<mail> error: mail() returned failure
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->sendMessage(): send return value
29/03/2021 08:14:55 [ 5319] [ INFO] [user@domain.tld] [DEVICE_ID] StatusException: BackendIMAP->sendMessage(): The email could not be sent - code: 120 - file: /usr/share/z-push/backend/imap/imap.php:2659
29/03/2021 08:14:55 [ 5319] [WARN] [user@domain.tld] [DEVICE_ID] HTTPReturnCodeException: BackendIMAP->sendMessage(): The email could not be sent - code: 500 - file: /usr/share/z-push/lib/request/sendmail.php:152
29/03/2021 08:14:55 [ 5319] [FATAL] [user@domain.tld] [DEVICE_ID] WBXML 10K debug data:
29/03/2021 08:14:55 [ 5319] [ INFO] [user@domain.tld] [DEVICE_ID] User-agent: 'Apple-iPhone11C2/1804.52'
29/03/2021 08:14:55 [ 5319] [FATAL] [user@domain.tld] [DEVICE_ID] Exception: (HTTPReturnCodeException) - BackendIMAP->sendMessage(): The email could not be sent
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] LoopDetection->ProcessLoopDetectionTerminate()
29/03/2021 08:14:55 [ 5319] [ INFO] [user@domain.tld] [DEVICE_ID] cmd='SendMail' memory='1.86 MiB/4.00 MiB' time='0.13s' devType='iPhone' devId='DEVICE_ID' getUser='user@domain.tld' from='USER_IP' idle='0s' version='2.6.2' method='POST' httpcode='500'
29/03/2021 08:14:55 [ 5319] [DEBUG] [user@domain.tld] [DEVICE_ID] -------- End
29/03/2021 08:15:05 [ 5222] [DEBUG] [user@domain.tld] [DEVICE_ID] BackendIMAP->close_connection(): disconnected from IMAP server
Any help is much appreciated.