Connection failed error when trying to send mail on Android

Written by - 0 comments

Published on - Listed in Android Linux Mail Rant

It's been bugging me for weeks. And it hasn't changed since. No, I'm not talking about volcanic eruptions on Iceland. Neither am I talking about my little cat Twix which is still not able to open the little cat-door so the cat-toilet has to stay inside... No, I'm talking about the problem of the Android Email application which can't send mails. If you try to send an e-mail using your Android Email application (not Gmail!) you may see a yellow bar which contains the disappointing text CONNECTION FAILED. Why is that, you may ask yourself. Should I have bought an iPhone instead, may be the next question. The answer to all that is to analyze the problem. On the remote mail server, the try to send the e-mail is clearly refused because of a helo check:

Apr 22 15:53:04 area-1 postfix/smtpd[23187]: NOQUEUE: reject: RCPT from[]: 554 5.7.1 : Helo command rejected: you are not me; from= to= proto=ESMTP helo=

A debugged log of Postfix shows the following connection coming from Android:[]: 220 ESMTP Postfix (Debian/GNU) watchdog_pat: 0x559270[]: EHLO localhost[]:[]: 250-PIPELINING[]: 250-SIZE 10240000[]: 250-VRFY[]: 250-ETRN lost connection after EHLO from[]

The problem is, that the used HELO/EHLO command used by the Android Email application is 'localhost' which of course is a senseless SMTP helo - everybody is localhost and you don't connect to a remote host like this. Now it would be interesting to compare this with the iPhone, and here we go:[]: EHLO [][]:[]: 250-PIPELINING[]: 250-SIZE 10240000[]: 250-VRFY[]: 250-ETRN

So here we can compare it. Android uses 'localhost' and iPhone some internal IP ( which isn't perfect either but much better than localhost. Depending on the mail server configuration this might also fail but the chances are definitely greater that the internal IP gets accepted. Many mail servers however reject remote hosts trying to send e-mails and identifying themselves as localhost for a good reason; a lot of spam servers are using this method. There is already a bug report open, issue no. 1063 handles this case. But unfortunately without resolution. I'll follow up on that and try to see what happens, when the entries in /etc/hosts are changed...

Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder