1 (edited by mikal 2018-10-03 20:51:32)

Topic: Iphone outgoing mail rejected by server - EAS

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Outgoing e-mails from IOS are rejected by server. Incoming messages are working fine. I did a apt upgrade a few days ago but is not sure if that is whats causing the problem. Postfix was upgraded. I have tried to browse different forums, but non of the solutions are working. I wonder if it is a server problem. Webmail (Roundcoube and SOGo) are woking just fine. I can send and recieve.

The messages are still in my outbox and are not being sent.

IOS 12
Mail.app -> Exchange Active-Sync

Please help me in the right direction.

2

Re: Iphone outgoing mail rejected by server - EAS

Any relevant error message in Postfix log file?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Iphone outgoing mail rejected by server - EAS

ZhangHuangbin wrote:

Any relevant error message in Postfix log file?

I can see no updates on my mail.log file when I try to send e-mails. (tail -f /var/log/mail.log)

My sogo.log file shows: (real addresses are replaced with capital letters)
Oct 04 02:14:47 sogod [15036]: WEBSERVERADDRESS "POST /SOGo/Microsoft-Server-ActiveSync?User=MAILADDRESS&DeviceId=DEVICEID&DeviceType=iPhone&Cmd=SendMail HTTP/1.0" 200 15/0 0.524 - - 4M
Oct 04 02:14:52 sogod [15035]: WEBSERVERADDRESS "POST /SOGo/Microsoft-Server-ActiveSync?User=MAILADDRESS&DeviceId=DEVICEID&DeviceType=iPhone&Cmd=Ping HTTP/1.0" 200 13/125 91.048 - - 0

My IOS device gives me the following errormessage when I try to send:
"Can not send e-mail - The message was rejected by the server" (translated from norwegian)

IMAP is working, which im using as a workaround for e-mail, but I want EAS to work instead because of better functionality. Calendar and contacts in EAS are also working as far as I can see. My only problem is sending e-mails.

4

Re: Iphone outgoing mail rejected by server - EAS

mikal wrote:

My IOS device gives me the following errormessage when I try to send:
"Can not send e-mail - The message was rejected by the server" (translated from norwegian)

Disable fail2ban service and try again.

if not blocked by fail2ban, try this:

1: send email again
2: check sogo log file and postfix log immediately to find relevant error/log.

If there's no any log on server side, better double check the mail server settings in iPhone.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: Iphone outgoing mail rejected by server - EAS

ZhangHuangbin wrote:

Disable fail2ban service and try again.

if not blocked by fail2ban, try this:

1: send email again
2: check sogo log file and postfix log immediately to find relevant error/log.

If there's no any log on server side, better double check the mail server settings in iPhone.

I disabled fail2ban (systemctl stop fail2ban) and sent a new e-mail. There where no difference in the logs in sogo.log as described earlier. Postfix did not show any logs at all in mail.log. I also tried to put "-v" behind every service in master.cf, to get more verbose logging. No reports. My webmail is still working, but by phone over EAS it is still not working. I have setup the phone as described in https://docs.iredmail.org/activesync.ios.html . Everything i syncing exept outgoing mails. Those fail with the message "The message was rejected by the server".

6

Re: Iphone outgoing mail rejected by server - EAS

I have also seen an error in other forums for IOS11 that you have to disable http2. I have no http2 on any of my serverblocks in nginx.

7

Re: Iphone outgoing mail rejected by server - EAS

Solved!

Fix: I had in virtual host in nginx rewrited all access to the mail webpage to https://www... postfix and sogo probably looked for the server hostname, which was not www.XXXX