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.
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