Need help on solving an issue

2022-09-07 Thread Arka Pratim Chaudhuri
Hey, can anyone help me in solving #33985 
 . This is actually my first 
time & I'm totally confused of what to do.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/97e2b0e7-2574-4a14-a55a-38beff787964n%40googlegroups.com.


Re: Need help on solving an issue

2022-09-07 Thread Carlton Gibson
Hi Arka. Welcome.

Did you see the contributing guidelines?
https://docs.djangoproject.com/en/4.1/internals/contributing/

Then make sure you're set up to run the unit tests:
https://docs.djangoproject.com/en/4.1/internals/contributing/writing-code/unit-tests/

If you can create a test-case for the issue, that shows how it fails,
that's a great start.

Then take a look at this PR, which looks related 🤔 — although that needs
confirming (and it needs a test case at least).
https://github.com/django/django/pull/15573

I hope that helps.

Kind Regards,

Carlton

On Wed, 7 Sept 2022 at 15:58, Arka Pratim Chaudhuri 
wrote:

> Hey, can anyone help me in solving #33985
>  . This is actually my first
> time & I'm totally confused of what to do.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/97e2b0e7-2574-4a14-a55a-38beff787964n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJwKpyT7OXyiE5L%2BFUOeypGnNugnwtwPJeNSGb5CqT8TZQpquA%40mail.gmail.com.


add option to specify HELO name/identity in SMTP client

2022-09-07 Thread David Miguel Susano Pinto
After connecting to a SMTP server, a client identifies themselves with
a HELO/EHLO command, like so:

HELO my-domain.example

While typically this is the client FQDN, that's not actually required
and in some setups the client needs to use some other name (it just
so happens that I'm in that situation).

Django's SMTP client defaults to `socket.getfqdn()`.

https://github.com/django/django/blob/main/django/core/mail/
backends/smtp.py#L69
https://github.com/django/django/blob/main/django/core/mail/utils.py#L16

This is a very good default but there is no option to set it to
something else.  I would propose a new option for it.  Some possible
names are:

- `MAIL_LOCAL_HOSTNAME`: because `local_hostname` is the name of the
  argument used by `smtplib` for this.

- `MAIL_HELO_DATA`: a clearer name, `helo_data` is used in the exim
  configuration.

- `MAIL_HELO_NAME`: even more clear, `helo_name` is used in the
  postfix configuration.

A workaround for this is to setup a SMTP server locally, such as Exim
or Postfix, that simply forwards the emails from Django.

Best wishes
David

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/eaa81e50-cfd0-4cbd-ac75-3ad36fc50c51n%40googlegroups.com.


Re: add option to specify HELO name/identity in SMTP client

2022-09-07 Thread אורי
Hi David,

Does and should Django connect directly to a remote SMTP server? Isn't it
better to use the local mail server which will receive the email and then
send it to a remote SMTP server? In my opinion, it's always better to send
emails via a local mail server on the same machine. Do you have other
experiences?

Thanks,
Uri Rodberg, Speedy Net.
אורי
u...@speedy.net


On Wed, Sep 7, 2022 at 5:21 PM David Miguel Susano Pinto <
carandr...@gmail.com> wrote:

> After connecting to a SMTP server, a client identifies themselves with
> a HELO/EHLO command, like so:
>
> HELO my-domain.example
>
> While typically this is the client FQDN, that's not actually required
> and in some setups the client needs to use some other name (it just
> so happens that I'm in that situation).
>
> Django's SMTP client defaults to `socket.getfqdn()`.
>
> https://github.com/django/django/blob/main/django/core/mail/
> backends/smtp.py#L69
> https://github.com/django/django/blob/main/django/core/mail/
> utils.py#L16
>
> This is a very good default but there is no option to set it to
> something else.  I would propose a new option for it.  Some possible
> names are:
>
> - `MAIL_LOCAL_HOSTNAME`: because `local_hostname` is the name of the
>   argument used by `smtplib` for this.
>
> - `MAIL_HELO_DATA`: a clearer name, `helo_data` is used in the exim
>   configuration.
>
> - `MAIL_HELO_NAME`: even more clear, `helo_name` is used in the
>   postfix configuration.
>
> A workaround for this is to setup a SMTP server locally, such as Exim
> or Postfix, that simply forwards the emails from Django.
>
> Best wishes
> David
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/eaa81e50-cfd0-4cbd-ac75-3ad36fc50c51n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CABD5YeGWKjHYGtzRwpZFkLWvAXJpnQmYjHBa_2inYXpx4f6C5A%40mail.gmail.com.