#13570: SMTP backend should try harder to figure out the local host name
------------------------------+---------------------------------------------
 Reporter:  jacob             |       Owner:  nobody    
   Status:  new               |   Milestone:  1.3       
Component:  django.core.mail  |     Version:  1.2       
 Keywords:                    |       Stage:  Unreviewed
Has_patch:  0                 |  
------------------------------+---------------------------------------------
 Django's SMTP backend sets the `local_hostname` argument to `smtplib.SMTP`
 by calling `socket.getfqdn()` (via `django.core.mail.utils.DNS_NAME`,
 which caches that result). `smtplib` itself uses a slightly more robust
 method (see `smtplib` around line 245) if `local_hostname` isn't given.

 In certain circumstances this can mean that sending mail through `smtplib`
 directly works, but sending it via `django.core.mail` fails.

 We could solve this by just passing `local_hostname=None`, but that'd
 result in a DNS lookup every time we send email, which is silly (and which
 is why we're caching it in the first place).

 So, `DNS_NAME` should use similar logic to `smtplib` to try harder to get
 the DNS hostname.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13570>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to