Send emails using sendmail or postfix

78 views
Skip to first unread message

Mathieu Leplatre

unread,
Sep 1, 2008, 2:39:22 PM9/1/08
to Django users
Hi all,

According to the documentation, email sending is done through smtp.
Is there a way to use sendmail or postfix instead ?

Thank you.
Mathieu.

Malcolm Tredinnick

unread,
Sep 1, 2008, 3:02:27 PM9/1/08
to django...@googlegroups.com

On Mon, 2008-09-01 at 11:39 -0700, Mathieu Leplatre wrote:
> Hi all,
>
> According to the documentation, email sending is done through smtp.
> Is there a way to use sendmail or postfix instead ?

Yes, start up sendmail or postfix to listen on a port. :-)

Presumably, you mean sending by calling the mail binary (which
could /usr/bin/sendmail or /usr/bin/postfix or whatever). In that acse,
there isn't a way to do that out of the box.

For your own mail, using the EmailMessage, you could write a different
connection class and use that (instead of SMTPConnection), but for the
mail sent by the admin, etc, using send_mail() and send_mass_mail(),
you're stuck with what's there for now.

Still, this wouldn't be a bad improvement to make after 1.0.

Regards,
Malcolm


Mathieu Leplatre

unread,
Sep 1, 2008, 3:17:18 PM9/1/08
to Django users
On Sep 1, 4:02 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Mon, 2008-09-01 at 11:39 -0700, Mathieu Leplatre wrote:
> > Hi all,
>
> > According to the documentation, email sending is done through smtp.
> > Is there a way to use sendmail or postfix instead ?
>
> Yes, start up sendmail or postfix to listen on a port. :-)
>
> Presumably, you mean sending by calling the mail binary (which
> could /usr/bin/sendmail or /usr/bin/postfix or whatever). In that acse,
> there isn't a way to do that out of the box.
>
Exactly, I was thinking of calling the binary.

> For your own mail, using the EmailMessage, you could write a different
> connection class and use that (instead of SMTPConnection), but for the
> mail sent by the admin, etc, using send_mail() and send_mass_mail(),
> you're stuck with what's there for now.
I want to keep it safe and simple, so I'll check my server settings
about starting sendmail with "daemon" options.

> Still, this wouldn't be a bad improvement to make after 1.0.
Happy to help suggesting :)

Thanks a lot malcom.

Regards,
Mathieu.
Reply all
Reply to author
Forward
0 new messages