WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
[resolved] [Plugin: Better WP Security] Sending backup emails through Mandrill stopped working (21 posts)

  1. pmfox
    Member
    Posted 1 year ago #

    I'm getting errors sending the email backups to me in error_logs.

    I'm using mandrillapp.com (wpmandrill is the plugin to the app) to send emails so I can track and get better deliverability. It uses the native wp email functions but sends through their system.

    It started with the last upgrade of Better WP Security. It's generating the backups but not sending.

    Here is an example of the error in my root, error-log

    [12-Aug-2012 12:49:03]
    wpMandrill::sendEmail: Exception Caught => The domain of the email you provided has not been verified by Mandrill.
    
    [12-Aug-2012 12:49:03]
    wpMandrill::wp_mail_native: email@mydomain.com (Site Database Backup Sunday, August 12th, 2012 at 5:49 am)

    Mandrill is set correctly and my domain is verified. I don't know if Better WP Security is using another 'send as' email address?

    Here's the wp-admin/error-log:

    [11-Aug-2012 14:07:04]
    wpMandrill::sendEmail: Exception Caught => The domain of the email you provided has not been verified by Mandrill.
    
    [11-Aug-2012 14:07:04]
    wpMandrill::wp_mail_native: email@mydomain.com (Site Database Backup Saturday, August 11th, 2012 at 7:07 am)
    
    [12-Aug-2012 18:39:03] PHP Fatal error:  Uncaught exception 'Mandrill_Exception' with message ' - ' in /pathtoroot/public_html/wp-content/plugins/wpmandrill/lib/mandrill.class.php:104
    Stack trace:
    #0 /pathtoroot/public_html/wp-content/plugins/wpmandrill/lib/mandrill.class.php(125): Mandrill->request('users/info')
    #1 /pathtoroot/public_html/wp-content/plugins/wpmandrill/wpmandrill.php(1082): Mandrill->users_info()
    #2 [internal function]: wpMandrill::showDashboardWidget('', Array)
    #3 /pathtoroot/public_html/wp-admin/includes/template.php(975): call_user_func(Array, '', Array)
    #4 /pathtoroot/public_html/wp-admin/includes/dashboard.php(205): do_meta_boxes('dashboard', 'side', '')
    #5 /pathtoroot/public_html/wp-admin/index.php(108): wp_dashboard()
    #6 {main}
      thrown in /pathtoroot/public_html/wp-content/plugins/wpmandrill/lib/mandrill.class.php on line 104

    I've changed the email address and path to root for security reasons.

    These don't make much sense to me but I do know it's not delivering email backups to me since the upgrade.
    Thanks.

    http://wordpress.org/extend/plugins/better-wp-security/

  2. This error is your spam filter saying it doesn't like the email address it's sending from. I'm afraid only your host can help you with this one as it isn't an issue with the plugin (the plugin passes the message on which then fails with your host).

  3. pmfox
    Member
    Posted 1 year ago #

    Thanks for the quick reply. Would it have anything to do with my email being handled by Google Apps and no longer at the host?
    I'll contact the host too.
    Again, thanks for the speedy reply.

  4. That might explain it (normally that's against GApps EULA, I've in fact seen numerous GApps accounts banned for doing just that).

  5. pmfox
    Member
    Posted 1 year ago #

    What part is against the GApps EULA?

    Funny thing is the error_log only showed up last week, out of the blue, and I've been on Apps for a couple years.

  6. I would have to look up the EULA later but I've had them suspend accounts for just that. Could it have to do with the way they've changed postini? I've never heard of wpMandrill before...

  7. pmfox
    Member
    Posted 1 year ago #

    Mandrill is from the guys at MailChimp. It allows you to send mail via SMTP through them, instead of other, more spam related options, like PHP.
    It's a nice setup and should be better deliverability.

    I don't believe I have Postini active but will check that too.

    Thanks a lot.

  8. MC_Will
    Member
    Posted 1 year ago #

    Hello guys,

    Are you sure wpMandrill is correctly set up? If you try to perform a Password Recovery, the email you got is sent by Mandrill (check full headers)?

    We released a new version of wpMandrill last week so we probably broke something somewhere.

  9. pmfox
    Member
    Posted 1 year ago #

    MC_Will,
    I'll check later, when I'm at a computer. It was set up correctly before but I'll check. You want me to do a WP Password recovery, correct? Not through the Mandrillapp site.

  10. MC_Will
    Member
    Posted 1 year ago #

    That's correct. I mean a passw recovery through your wp installation.

    You don't even need to reset it. Just get the email, check its headers, and delete it.

  11. pmfox
    Member
    Posted 1 year ago #

    ME_Will:
    The "Mail by" section reads:
    mailed-by: mail26.us4.mandrillapp.com

    Is that what you're asking about? All my other mail sent seems to be working.
    It's just this site backup.
    And, I did receive the backup emailed this morning. I also have the error log though, which I don't want to keep growing. Ha.

  12. pmfox
    Member
    Posted 1 year ago #

    ME_Will:
    I noticed the email in Better WP Security was to me@MyDomain.com and changed it to me@mydomain.com (removing the camelcase).

    When I changed the email and manually sent the backup (went into plugin admin and hit the "Create Database Backup" button), it created an error_log in wp-admin.
    However, the error was different this time. The error is this:

    [14-Aug-2012 04:00:21]
    wpMandrill::processAttachments: /pathtoroot/public_html/wp-content/plugins/better-wp-security/backups/database-backup-1344916820.zip => Error creating the attachment structure: application/zip is not a valid content type (it should be image/*,text/*,application/pdf).

    I hope this helps. I don't know if the camelcase made a difference but I ended up with a different result.

    Also, the info from the email:
    mailed-by: mail26.us4.mandrillapp.com
    signed-by: mydomain.com

  13. pmfox
    Member
    Posted 1 year ago #

    I just noticed there is no attachment now too. That's not good at all.

  14. Mandrill Kaitlin
    Member
    Posted 1 year ago #

    It looks like the backup file is a .zip, which isn't currently supported for Mandrill. We currently only support images, audio, video, text files and PDFs as described here: http://eepurl.com/nXMa1

  15. MC_Will
    Member
    Posted 1 year ago #

    Kaitlin is right.

    However, wpMandrill shouldn't have sent it anyway. Whenever it encounters an error, it silently send the email using the native wp_mail function and leave a trace in the log.

    Did you get a message like this one in your log file?
    [DATE TIME] wpMandrill::wp_mail_native: user@domain.com (Email Subject)

    I'll dig into this. Sorry for the inconvenience.

  16. pmfox
    Member
    Posted 1 year ago #

    It was receiving the zip last week and up until I removed the camelcase for my email address.
    I've disabled Mandrill and everything's working fine. It's not worth the hassle for me to keep playing with it.

    It would be nice to have wpMandrill send all comment updates and other emails but I can specify my backups or other specific emails are sent with native WP mail function.

    Thanks.

  17. @Mandrill Kaitlin and @MC_Will thanks. That could explain a LOT of issues folks are having. Any suggestion on a format it will support? What about someway to whitelist this plugin? I would love to work with you guys on this if you could please email me at info [at] bit51 [dot] com

  18. MC_Will
    Member
    Posted 1 year ago #

    Hey,

    We have been adding support for new formats in a regular-ish basis. However, I can't tell right now when we'll be adding support for zip files... if ever.

    There's a couple of ways I think we could make it work:

    1) If your plugin checks for the existence of the wpMandrill class... and if so, use the function wpMandrill::wp_mail_native instead of wp_mail (same parameters)...

    or 2) If wpMandrill detects that your plugin is the sender and forward your call to wpMandrill::wp_mail_native instead... I'll need to find a reliable way to univocally tell your plugin is the sender.

  19. @MC_Will

    Number 1 should be doable. I'll put something in the dev version in the next week or so. Could I then ask you to test it?

  20. MC_Will
    Member
    Posted 1 year ago #

    Sure!

  21. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic