0
votes

I'm not sure why my error logging is not working. When I try to log an error with a logger that has the default 'mail_admins' handler, no email is sent even though SERVER_EMAIL and ADMINS appear to be properly defined. Looking in the postfix logs, I get this line whenever I try to send one of these emails:

Nov 20 11:55:58 localhost postfix/smtpd[1027]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <g>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]
> to=<g> proto=ESMTP helo=<localhost>

Why would it be trying to send the email to 'g' rather than the specified admin email?

Edit: By the way, send_mail does work correctly.

1
It's trying to send the message to g, and being rejected because that address doesn't exist. This doesn't seem to have anything to do with postfix so I've removed that tag.qqx
Thanks, I parsed that log line incorrectly. Any django people have any ideas why it would be trying to send an email to "g" rather than the admin email I specified? Here's the ADMIN assignment from settings.py: ADMINS = ( ('John Doe','[email protected]') )Tiki

1 Answers

3
votes
ADMINS = ( ('John Doe','[email protected]') )

Should be:

ADMINS = [ ('John Doe','[email protected]') ]

Or:

ADMINS = ( ('John Doe','[email protected]'), )