Getting '501 Syntactically invalid HELO argument' Error when Sending Mail From Confluence
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
When test sending email from Confluence, one sees 501 Syntactically invalid HELO argument(s)
error. The atlassian-confluence.log file contains the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2010-11-16 16:54:00,022 ERROR [DefaultQuartzScheduler_Worker-7\] [confluence.mail.template.ConfluenceMailQueueItem\] send Unable to send email with subject 'test mail' to <confluence-autosupportrequests@atlassian.com> reason: javax.mail.MessagingException: 501 Syntactically invalid HELO argument(s)
com.atlassian.mail.MailException: javax.mail.MessagingException: 501 Syntactically invalid HELO argument(s)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:191)
at com.atlassian.confluence.jmx.JmxSMTPMailServer.send(JmxSMTPMailServer.java:61)
:
Caused by: javax.mail.MessagingException: 501 Syntactically invalid HELO argument(s)
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:917)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:417)
at javax.mail.Service.connect(Service.java:310)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at alt.javax.mail.TransportImpl.send(TransportImpl.java:18)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:177)
Cause
Communication failure in the SMTP level, during the ehlo/helo command exchange.
It can be caused by many reasons, but the usual suspects are:
Firewall.
Authentication issue.
Hostname of the machine is different to what the mailserver expects.
Underscore(_) in the host name. The underscore character is not a permitted character for the hostname.
Resolution
Try adding the following parameter in the JIRA startup : -Dmail.smtp.localhost=<hostmane>
If nothing helps, contact your system administrator to discuss what network changes were applied recently in the three areas mentioned above. You can also trace the TCP traffic to identify what is wrong.
Was this helpful?