Discussion:
Smart-Host Username Bug
StreetG6
2018-02-04 19:25:56 UTC
Permalink
I originally posted to Citadel and after they verified they could reproduce the issue they directed me to here. The issue I am having deals with using a smart-host. I'm imputing a URI with a user name, password, smart-host domain, and port. I use my smart-host to get around my ISP blocking port 25 (and for spam filtering), and my smart-host uses SMTP authentication to deal with my dynamic IP address when I send email. Unfortunately, my smart-host uses an email address as a username. When i use this username, it causes unexpected results due to the @ symbol in the user name. Here is basically what I'm trying to input:

smtp://***@DOMAIN.com:***@asp-submit.reflexion.net:2525

When i try to send mail, it does a DNS lookup, but not properly. It bases its lookup off of the first @ symbol, so it looks up "DOMAIN.com:***@asp-submit.reflexion.net"

Obviously that fails. Just for testing I added that to my DNS server with the correct IP for that DNS name at the time, and it seemed to accept that. However, when it connects to the smart-host I get a Login Denied, so i think its passing the credentials incorrectly too. Here are the relevant logs


This is before I manually made a DNS entry for the incorrect request:
citserver[12220]: smtpclient: 381 attempting delivery now
citserver[12220]: smtpclient: smtp_attempt_delivery(380, ***@gmail.com)
citserver[12220]: smtpclient: trying smtp://***@DOMAIN.com:***@asp-submit.reflexion.net:2525/DOMAIN.com
citserver[12220]: smtpclient: libcurl returned 6 (Couldn't resolve host name) , SMTP response 0
citserver[12220]: smtpclient: recp: <***@gmail.com> , result: 421 (Domain service not available, closing transmission channel)
citserver[12220]: smtpclient: submission age: 0d0h0m27s


This is after I made a DNS entry for the incorrect request:
citserver[12220]: smtpclient: 386 attempting delivery now
citserver[12220]: smtpclient: smtp_attempt_delivery(385, ***@gmail.com)
citserver[12220]: smtpclient: trying smtp://travis:***@asp-submit.reflexion.net:2525/DOMAIN.com
citserver[12220]: smtpclient: libcurl returned 67 (Login denied) , SMTP response 250
citserver[12220]: smtpclient: recp: <***@gmail.com> , result: 250 (Requested mail action completed and OK)
citserver[12220]: smtpclient: submission age: 0d0h0m17s

Is there any work around or any way to fix this using quotes or some other method?
Thank you very much in advance. I've been trying to chase down a solution for a couple weeks or so now.
Travis
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiqu
Daniel Stenberg
2018-02-05 15:42:03 UTC
Permalink
curl does not support '@' as part of the username when put in the URL. You
need to URL-encode it first, which then makes it %40. Like this:

smtp://ME%40DOMAIN.com:***@asp-submit.reflexion.net:2525
--
/ daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:
Loading...