roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.5k stars 608 forks source link

sSMTP revaliases and Cron emails #1018

Closed morcth closed 2 years ago

morcth commented 6 years ago

Submit a feature request or bug report

Replace any X with your information.


What is the current behavior?

I have been trying to figure out how to stop my cron logrotate and certificate refresh emails from going to my spam box. The issue (I think) is the from and to headers are root and root.

I did find the sSMTP roles and revalias settings in trellis and really thought this was going to be it but even after uncommenting the lines in roles/defaults/main.yml and adding new email address, the cron job headers don’t change.

If I send an email with sSMTP from the command line, the correct headers are there and the email does not go to spam.

I am not sure if this is a bug or expected behavior.

What is the expected or desired behavior?

Cron email headers can be changed so that my work email does not automatically consider it spam. SPF, DKIM all pass but it is still consider spam.


Please describe your local environment:

Ansible version: 2.6.2

OS: OSX 10.13.6

Vagrant version: 2.1.2

Where did the bug happen? Development or remote servers?

Staging and Production

Please provide a repository or your wordpress_sites config (if possible):

If this is needed, I can make it happen

Feature Request

(delete this section if not applicable)

Please provide use cases for changing the current behavior:

A cron service is installed that allows from and to field changes.

Other relevant information:

X

pacotole commented 3 years ago

Hi there! If you are still interested in CRON emails, follow these steps to resolve https://discourse.roots.io/t/cron-mails-with-wrong-recipient/10163/8?u=pacotole

swalkinshaw commented 2 years ago

Closing this since there's no proper fix that Trellis can do as helpfully detailed by @pacotole on Discourse.

One important thing to note: Let's Encrypt renewal emails are probably the most common (and important) use case here and they have been properly supported in Trellis for a while now via Let's Encrypt itself. Trellis enforces setting a notification email and you'll get notified there instead of through cron.