SMTP and EHLO/HELO

216 views
Skip to first unread message

Tech163

unread,
Feb 22, 2013, 9:37:30 PM2/22/13
to golan...@googlegroups.com
I have a script that looks up the MX record of a domain, and uses net/http to connect directly to it on port 25. I would like to avoid running postfix/sendmail/etc locally if possible.

Golang appears to send "EHLO localhost" by default. Is there a way of overriding the smtp.ehlo() function without manually editing the source files and customizing that?

Devon H. O'Dell

unread,
Feb 22, 2013, 10:15:16 PM2/22/13
to Tech163, golan...@googlegroups.com
2013/2/22 Tech163 <tec...@sliceone.com>:
This makes no sense from the perspective of HTTP or SMTP. Please
explain what you're trying to do.

--dho

> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Tech163

unread,
Feb 22, 2013, 10:31:36 PM2/22/13
to Devon H. O'Dell, golan...@googlegroups.com
Oops. I meant net/smtp not net/http. I want to send emails using net/smtp but use a custom EHLO that is not "localhost"

Devon H. O'Dell

unread,
Feb 22, 2013, 10:39:38 PM2/22/13
to Tech163, golan...@googlegroups.com
2013/2/22 Tech163 <tec...@sliceone.com>:
> Oops. I meant net/smtp not net/http. I want to send emails using net/smtp
> but use a custom EHLO that is not "localhost"

Ah, right. This is an issue that hasn't been fixed yet (to my
knowledge). I can't legally fix it, and I would appreciate anyone
providing a reasonable patch to do so. I never saw a patch from this
conversation (that doesn't mean it doesn't exist):

https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/Pt_H9d3QVXg

Please send a patch! This is a real issue.

--dho

Rick Arnold

unread,
Feb 23, 2013, 12:02:06 AM2/23/13
to golan...@googlegroups.com
This is issue 4219 and it is fixed in tip.


Rick

Devon H. O'Dell

unread,
Feb 23, 2013, 12:06:02 AM2/23/13
to Rick Arnold, golan...@googlegroups.com
2013/2/23 Rick Arnold <rickar...@gmail.com>:
> This is issue 4219 and it is fixed in tip.

Awesome, thanks. Wasn't aware that this got fixed.

--dho

> http://code.google.com/p/go/issues/detail?id=4219
>
> Rick
Reply all
Reply to author
Forward
0 new messages