AsmBB

Power
Login Register

Email integration not working
0

#16471 (ツ) MrMister
Created 09.05.2025 , read: 257 times

Hello, I tried enabling the email confirmation that asmbb offers however it did not work for me.

I tried both with setting it to connect to a server (running, in this case, on a "LAN" address). I tested said address with msmtp and know that it is working (though it is actually a "proxy" to another server this is beside the point).

I also tried with the "Pipe the emails through:" option using msmtp (ssmtp and sendmail appear to be unmaintained). Tested msmtp using command line, definitely works. Msmtp also creates a ".msmtp.log" when it tries to send emails. No such file is created in instances where asmbb should be sending email (at account registration or when changing email addresses) indicating that asmbb is not even making an attempt.

I noticed there wasn't much documentation on what to put in which field, so I tested multiple configurations (about 17 of them), none of which resulted in any sent emails. Also setting to many of them resulted in asmbb crashing.

Any guidance on what to do next, so as to make it work?

While one benefit of email integration is to prevent spam accounts, it is also useful for forgotten passwords. It seems that changing a given user's forgotten password is not possible?

#16473 (ツ) johnfound
Created 21.05.2025 , read: 198 times
MrMister

Hello, I tried enabling the email confirmation that asmbb offers however it did not work for me.

I tried both with setting it to connect to a server (running, in this case, on a "LAN" address). I tested said address with msmtp and know that it is working (though it is actually a "proxy" to another server this is beside the point).

I also tried with the "Pipe the emails through:" option using msmtp (ssmtp and sendmail appear to be unmaintained). Tested msmtp using command line, definitely works. Msmtp also creates a ".msmtp.log" when it tries to send emails. No such file is created in instances where asmbb should be sending email (at account registration or when changing email addresses) indicating that asmbb is not even making an attempt.

I noticed there wasn't much documentation on what to put in which field, so I tested multiple configurations (about 17 of them), none of which resulted in any sent emails. Also setting to many of them resulted in asmbb crashing.

Any guidance on what to do next, so as to make it work?

While one benefit of email integration is to prevent spam accounts, it is also useful for forgotten passwords. It seems that changing a given user's forgotten password is not possible?

Hm, unfortunately, there is not enough information in order to analyze what is going wrong in your case. If AsmBB not trying to send emails, maybe you forgot to check the "confirm by e-mail" check box in the forum settings. Also, notice, that AsmBB uses e-mail very carefully - it tries to send e-mail only once in order to not spam the user account.

Also, the smtp client in AsmBB does not implements user authentication, so the server should allow such connections from the AsmBB server. This usually means that the AsmBB works in the LAN of the email server, but well, I am not a big expert in the network protocols.

Piping the emails through external program needs only the respective field in the settings dialog to be filled with the proper path to the respective program and optionally the command line arguments needed by the program. The e-mail itself will be sending to the program through a pipe, so the program should get the email from the stdin.

Also, I am recently not releasing a binary packages of AsmBB, because I am pretty busy with RL projects, but there are many updates and changes actually in the source base. So it is better to compile AsmBB from sources in order to get the latest version and fixes. It is an easy process, described here: AsmBB how to download, compile and install. and even better, here: Instructions for assembling asmbb without using FreshIde

I hope that this will help. Please, post here, if you have more questions, or share more information on the issue.

#16479 (ツ) MrMister
Created 02.08.2025 , read: 67 times

Hello,

I've discovered that the crashes are caused by a missing null pointer check in SendActivationEmail. This can cause a segmentation fault because it is possible for accounts pending activation in WaitingActivation to have a NULL email field. Such accounts can't be added to the WaitingActivation table when email activation is enabled because RegisterNewUser requires an email address in that case, but they can be added when email activation is not enabled. If email activation is enabled before they are manually activated or expire, future attempts to run ProcessActivationEmails will always fail once it reaches them. Entries in WaitingActivation are only removed by expiry after ProcessActivationEmails has finished a batch, but it currently can't get to that point as long as an entry with a NULL email field exists. So attempts to send email will simply fail (and cause a crash) until manual intervention removes those entries from WaitingActivation.

For now, for our purposes, I've simply added a check in SendActivationEmail to cause an early return if the email address is NULL. An alternative solution would be to modify sqlSelectNotSent to only include entries with non- NULL email addresses.

Also, for posterity, the settings that need to be set in order to get asmbb to send activation emails are (all of these are in the "Server" section of the forum settings page):

  1. "Host" needs to be set to any nonempty string. This corresponds to the host key in the Params table.

  2. "SMTP account" needs to be set to any nonempty string. This corresponds to the smtp_user key in the Params table. Note that this should be just the username, not the host, so for example noreply is good, noreply@example.tld is not. The full value of the "From:" header will be constructed from this field together with the value of the "Host" field, with an "@" in between them.

  3. "Confirm by email" needs to be active (in the default skin I believe this means "shows up as a filled bright green square"). This corresponds to the email_confirm key in the Params table having a nonzero integer value.

  4. EITHER both fields of "SMTP server / port" have nonempty string values OR "Pipe the emails through" has a nonempty string value. These correspond to the smtp_addr, smtp_port, and smtp_exec keys in the Params table, respectively. If all three have nonempty string values, piping will be used. When piping is used, no shell interpretation is performed: the string is simply split at whitespace boundaries and the first element of the resulting array of strings is executed, with the full array of strings passed as arguments to it. PATH is not searched.

While working on documenting and modifying asmbb I came up with several other fixes, but some of them are fixes for security issues and I would rather disclose them privately if at all possible. I've tried emailing johnfound@asm32.info about some of these, but haven't received any response. Is this still an active email address?

- team member "U"

Email integration not working
0

AsmBB v3.0 (check-in: 7544654b24928b93); SQLite v3.42.0 (check-in: 831d0fb2836b71c9);
©2016..2024 John Found; Licensed under EUPL. Powered by Assembly language Created with Fresh IDE