You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Weekly/monthly report emails cannot be sent over SMTP #827
Turns out that many SMTP servers reject emails where a single line exceeds 998 characters ¯_(ツ)_/¯
The standard seems really arbitrary but it's not going to change. We should break up the HTML of those emails such that no line can exceed the maximum length.
Is there any automated way in the templating to achieve this? I can spend some time on this if it needs to be done manually / need to edit all the HTML templates.
This issue also appears to be preventing the selfhosted version sending weekly emails. Logs from bytemark/smtp container:
1077 LOG: smtp_connection MAIN 1077 SMTP connection from plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] closed by QUIT 1078 LOG: MAIN REJECT 1078 H=plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] F=<analytics@test.com> rejected after DATA: maximum allowed line length is 998 octets, got 1360 1078 LOG: smtp_connection MAIN 1078 SMTP connection from plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] closed by QUIT 1079 LOG: MAIN REJECT 1079 H=plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] F=<analytics@test.com> rejected after DATA: maximum allowed line length is 998 octets, got 1360 1079 LOG: smtp_connection MAIN 1079 SMTP connection from plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] closed by QUIT
So all we need to do is upgrade bamboo_smtp to v4 and it should work.
The next planned self-hosted release is in the summer and I said I wouldn't patch any existing versions to lower my overhead (I'm the only maintainer). However, this is a serious issue preventing people from using a core feature of the platform. So I will patch the latest release with this version upgrade.
Make sure the site has a weekly report configured. NB: The function will return :ok even if it failed. Check SMTP logs to see if it actually went through.
Make sure the site has a weekly report configured. NB: The function will return :ok even if it failed. Check SMTP logs to see if it actually went through.
Ignore this for now. Upgrading bamboo_smtp broke everything. Looking into a soluton.
Reacted by Bhavin Gandhi, Matt Smallman and Stephan Sinn
I was trying one Exim (bytemark/smtp uses it) workaround for this, and used the above steps with v1.2.0.
Plausible.Workers.SendEmailReport.perform(%{"interval" => "weekly", "site_id" => site.id})
** (UndefinedFunctionError) function Plausible.Workers.SendEmailReport.perform/1 is undefined or private. Did you mean one of:
* perform/2
(plausible 0.0.1) Plausible.Workers.SendEmailReport.perform(%{"interval" => "weekly", "site_id" => 1})
I was trying one Exim (bytemark/smtp uses it) workaround for this, and used the above steps with v1.2.0.
Plausible.Workers.SendEmailReport.perform(%{"interval" => "weekly", "site_id" => site.id})
** (UndefinedFunctionError) function Plausible.Workers.SendEmailReport.perform/1 is undefined or private. Did you mean one of:
* perform/2
(plausible 0.0.1) Plausible.Workers.SendEmailReport.perform(%{"interval" => "weekly", "site_id" => 1})
If you do decide to try out the release candidate, please leave a message here. I will address any issues and if everything seems smooth I will create a proper release.
Activity
bhavin192 commentedon Mar 11, 2021
Is there any automated way in the templating to achieve this? I can spend some time on this if it needs to be done manually / need to edit all the HTML templates.
mattsmallman commentedon Mar 15, 2021
This issue also appears to be preventing the selfhosted version sending weekly emails. Logs from bytemark/smtp container:
1077 LOG: smtp_connection MAIN 1077 SMTP connection from plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] closed by QUIT 1078 LOG: MAIN REJECT 1078 H=plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] F=<analytics@test.com> rejected after DATA: maximum allowed line length is 998 octets, got 1360 1078 LOG: smtp_connection MAIN 1078 SMTP connection from plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] closed by QUIT 1079 LOG: MAIN REJECT 1079 H=plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] F=<analytics@test.com> rejected after DATA: maximum allowed line length is 998 octets, got 1360 1079 LOG: smtp_connection MAIN 1079 SMTP connection from plausible_plausible_1.nginx-proxy (analytics.test.com) [172.20.0.14] closed by QUITbhavin192 commentedon Mar 15, 2021
Exactly, that's how we found this issue: #756
ukutaht commentedon Mar 15, 2021
Looks like this was actually addressed in the underlying SMTP adapter library: https://github.com/fewlinesco/bamboo_smtp/blob/develop/CHANGELOG.md#300---2020-09-10
EDIT: better link: fewlinesco/bamboo_smtp#141
So all we need to do is upgrade
bamboo_smtpto v4 and it should work.The next planned self-hosted release is in the summer and I said I wouldn't patch any existing versions to lower my overhead (I'm the only maintainer). However, this is a serious issue preventing people from using a core feature of the platform. So I will patch the latest release with this version upgrade.
ukutaht commentedon Mar 15, 2021
Can you please test tag
v1.2.1to see if it fixes the issue?You can wait until next monday or trigger the email manually:
Make sure the
sitehas a weekly report configured. NB: The function will return:okeven if it failed. Check SMTP logs to see if it actually went through.ukutaht commentedon Mar 15, 2021
Ignore this for now. Upgrading bamboo_smtp broke everything. Looking into a soluton.
bhavin192 commentedon Mar 15, 2021
I was trying one Exim (bytemark/smtp uses it) workaround for this, and used the above steps with
v1.2.0.I think the _job argument needs to be provided?
ukutaht commentedon Mar 15, 2021
Yes it can be
nilukutaht commentedon Mar 16, 2021
I'm stumped. Asking for help in the Elixir forum: https://elixirforum.com/t/upgrading-bamboo-smtp-breaks-test-suite-but-not-the-app/38226
ukutaht commentedon Mar 30, 2021
Managed to find the issue and upgrade the dependency. I've created a release candidate for v1.3.0 which includes a fix for email delivery over SMTP.
Find the changelog and installation instructions here: https://github.com/plausible/analytics/releases/tag/v1.3.0-rc.0
If you do decide to try out the release candidate, please leave a message here. I will address any issues and if everything seems smooth I will create a proper release.