3

I am complete novice to Postfix, just set up default Postfix for Ubuntu, tested it through telnet and it sent mail ok, but when I try to send mail through django (host='localhost', port='25', user='', password=''), I just get

SMTPException: SMTP AUTH extension not supported by server.

Here is my main.cf: https://gist.github.com/3348411

Could you please suggest, what I need to add to set up minimal working smtp just for sending email?

evgeniuz
  • 2,599
  • 5
  • 30
  • 36

1 Answers1

7

It looks like you don't really want to use AUTH. In that case, user and password should be None, not the empty string. If you look at the code base, Django checks explicitly for None. Since the default is None already, you can just leave off the username and password parameters.

HTH!

John Szakmeister
  • 44,691
  • 9
  • 89
  • 79
  • Oh, thanks, it works. I've looked at another server (Django 1.1) and there username/password was '', just did as there. – evgeniuz Aug 14 '12 at 11:42
  • Yeah, it looks like Django 1.1 did this a [little differently](https://github.com/django/django/blob/27358368879cc7d56756f12155393d3277fc52aa/django/core/mail.py#L113). In that case, Django 1.1 would have defaulted to whatever was in settings, which was probably None. It looks like that code has all changed fairly substantially since then. :-) – John Szakmeister Aug 14 '12 at 11:46