PUNCH-Cyber / YaraGuardian

Django web interface for managing Yara rules
Apache License 2.0
189 stars 43 forks source link

Email from account #35

Closed coolacid closed 6 years ago

coolacid commented 6 years ago

By default all emails come from webmaster@localhost this doesn't work well for some mail gateways.

Configuring DEFAULT_FROM_EMAIL in settings.py does change this from address, however should probably be configured from the upstream settings like all other settings.

coolacid commented 6 years ago

After further digging with Debug Off, I found https://github.com/PUNCH-Cyber/YaraGuardian/blob/master/core/models.py#L59 tries to build the email address from settings. This does not work when the login user is not the same as the domain user - IE: AWS SES.

Taskr commented 6 years ago

Hi @coolacid! Thanks for bringing this to our attention. Will update settings and email build logic to account for wider range of email configurations.

Taskr commented 6 years ago

v1.0.3

DEFAULT_FROM_EMAIL is now able to be configured in upstream settings and is the email address used instead of the login user. This should help to account for situations such as AWS SES.

In a situation where DEFAULT_FROM_EMAIL is not set, the default value will continue to be webmaster@localhost in DEBUG mode. For production mode, the default value will be the login user.

Please let us know if this adequately solves your issue.