0

I've configured a Sentry (https://github.com/getsentry/sentry) server to log and manage all the uncaught exceptions on my Django application, that uses Boto to send e-mail via Amazon SES. It is working well and sending e-mail alerts whenever something wrong occurs.

The problem is, almost everytime an error happens and Sentry sends me an alert, it also notifies me of another error (an exception on Boto while sending an email), but it doesn't show me what is the e-mail. I've tried all the bits of my code that send e-mail, and they are all ok. My SES config is also fine, since my application is sending e-mails to a lot of different customers daily

The error reported by Sentry is:

boto in _handle_error
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
  <Error>
    <Type>Sender</Type>
    <Code>MessageRejected</Code>
    <Message>Email address is not verified.</Message>
  </Error>
  <RequestId>4a085303-817a-11e4-b846-79819d3408ac</RequestId>
</ErrorResponse>

After this, i usually receive another error, but all it says is

boto in _handle_error
400 Bad Request

But besides all this MessageRejected warnings, when i go to my AWS Dashboard to check on SES, it shows no Rejects or Complaints, and just a really small number of Bounces (smaller than the amount of warnings i receive)

If i could at least see what email is he trying to send, it would help me debug this, but i can't find any clue about what's happening.

Thiago
  • 119
  • 12
  • Why don't you enable boto logging and zero in on the error? Set it to maximum level(2). – helloV Dec 12 '14 at 02:45
  • How can i do that? I'm using Boto on the django_ses package, but couldn't find anything about this on the docs – Thiago Dec 14 '14 at 19:59

2 Answers2

1

Boto config

The Boto section is used to specify options that control the operation of boto itself. This section defines the following options:

debug: Controls the level of debug messages that will be printed by the boto library. The following values are defined:
0 - no debug messages are printed
1 - basic debug messages from boto are printed
2 - all boto debugging messages plus request/response messages from httplib

Make sure you restart your Django server for the log level to take effect

helloV
  • 50,176
  • 7
  • 137
  • 145
0

The problem was the default email that Django sends to the emails on the ADMINS setting. Everytime we had an exception, it was trying to email root@localhost (the default value for ADMINS), but since this emails does not exists, it was failing to do so.

Thiago
  • 119
  • 12