Commit 2112657b authored by x0r's avatar x0r

Use local-hostname for HELO command

In the SMTP-HANDSHAKE function, a EHLO command is sent to the server if ESMTP
features are required and HELO otherwise. The EHLO command was followed by the
value of LOCAL-HOSTNAME, whereas HELO erroneously used the result of
USOCKET::GET-HOST-NAME directly.

This leads to the HELO command being rejected, since USOCKET::GET-HOST-NAME does
not return a FQDN. With this fix, and an explicit :LOCAL-HOSTNAME keyword
argument given to SEND-EMAIL, e-mails go through normally.
parent bbafff40
......@@ -336,8 +336,7 @@
;; Unless we want ESMTP features, perform classic SMTP handshake and return
;; Read the initial greeting from the SMTP server
(smtp-command stream nil 220)
(smtp-command stream (format nil "HELO ~A"
(usocket::get-host-name))
(smtp-command stream (format nil "HELO ~A" local-hostname)
250)
(return-from smtp-handshake stream))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment