Closed yajo closed 5 years ago
This will mean a retro-compatibility problem updating the scaffolding, as now the "email from" will be postmaster@example.com
if not changed to the same as the project. I think you have to put it empty and default to SMTP_REAL_RELAY_USER
if not filled
Yes, I thought about that, but the problem is that there's no syntax to set a variable default value. You can only set a static default value for a missing variable, as seen here:
I tested and if I put there EMAIL_FROM: "${SMTP_DEFAULT_FROM:-$SMTP_REAL_RELAY_USER}"
and $SMTP_DEFAULT_FROM
is empty, the result is a string with $SMTP_REAL_RELAY_USER
literally (no env var resolution).
However, there's still the possibility to set it empty by default. The behavior if you leave it like that will be the same as until today.
In any case, this kind of update is one of those that almost in 100% of the cases will produce a merge conflict, so the dev attention will be called to the matter when updating the scaffolding (it's not as dangerous as the cases when the update lands unnoticed).
So, do we leave it as it is, or do I default it to an empty string? :thinking:
OK, I see. It's a pity... I would say any way to leave it empty, as in conflict resolution, most people won't know about this, and simply resolve the conflict without adjusting that part.
Just like https://github.com/odoo/odoo/pull/36837 introduces this feature per database, here we're going to add support for it in Doodba directly, via config file, as it is currently supported in Odoo.
You should fill this new env variable with the address that should be used as a default sender address in case the mail template doesn't supply one, which is a not-so-uncommon case.
Usually it should match your
mail.catchall.alias@mail.catchall.domain
combination, or the same value as for$SMTP_REAL_RELAY_USER
, but it could be any other.@Tecnativa TT19448