0

I switched to K-9 and APG recently to send and recieve emails and be able to en- and decrypt emails on the go. I've setup my own email server quite a while ago and everything works fine in Thunderbird, but not in K-9. Sending emails from Google Mail to my own email address works but not the other way round. I always get the error:

Negative SMTP reply: 504 5.5.2 : Helo command rejected: need fully-qualified hostname

I searched around the internet and there are other K-9 users with the same error message, but i've found no solution. I don't think the problem is the hostname because i asume i would get errors in Thunderbird as well ReverseDNS is set up correctly.

EDIT: It's not a problem about K-9, it's a problem with hostnames. I realized my HELO restrictions in postfix were to strict so edited them. Here is my HELO config from /etc/postfix/main.cf

smtpd_helo_required = yes
smtpd_helo_restrictions =
    permit_mynetworks,
    reject_non_fqdn_helo_hostname,
    reject_invalid_helo_hostname,
   #reject_unknown_helo_hostname,
    permit
smtpd_sender_restrictions =
    permit_mynetworks,
    reject_unknown_sender_domain,
    reject_sender_login_mismatch,
    permit
smtpd_recipient_restrictions =
   #reject_unknown_client_hostname,
    reject_unknown_sender_domain,
    reject_unknown_recipient_domain,
    reject_unauth_pipelining,
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    reject_invalid_hostname,
    reject_non_fqdn_sender,
    permit

Commented out lines were previously active.

1 Answers1

2

It is the mail client problem.

There is related bug report on github. The developer said he did not consider it possible or necessary to implement HELO validation in this mobile mail client when sending SMTP, and clothe this bugreport.

There is proposed workaround - set up a mail server on the receiving of messages from clients on a port other than 25 (sugested 587/TCP) and disable HELO check. It is also a good idea to receive this port (587/TCP) mail only from authorized local clients.

Slipeer
  • 3,295
  • 2
  • 21
  • 33
  • Thanks, that clears things up. I assume now that Google Mail omitts EHLO validation and that's why it works with K-9. I will check out your proposed solution. – Blubberlutsch Dec 09 '16 at 17:12
  • It's not a mail client problem but a server problem, in this case a postfix configuration problem. I will accept this answer anyway because it got me on the right track! – Blubberlutsch Dec 09 '16 at 22:48