Skip to content

Configure SMTP for Nodebb

Solved Configure
  • still doesn’t work… I have tried to put even mail. at smtp host, but still the same, I also tried with all the connection security, nothing… and I don’t think it’s a problem from my e mail, I set it up with SSL encryption, DNS is also set… tried with port 465 also… any ideas? thank you!

  • @marusaky is your server permitted to send outbound email directly? Several hosting companies disable this by default so you might need to contact them and ask them to release or permit.

    Another test would be to see if the server is in fact listening. You can do this with a simple telnet command, for example

    telnet server.com 587 where you obviously replace server.com with the actual mail host name. If you get a response, then it’s working. If nothing, then you’ll need to call the hosting company as I suggested.

  • @phenomlab said in Configure SMTP for Nodebb:

    @marusaky is your server permitted to send outbound email directly? Several hosting companies disable this by default so you might need to contact them and ask them to release or permit.

    Another test would be to see if the server is in fact listening. You can do this with a simple telnet command, for example

    telnet server.com 587 where you obviously replace server.com with the actual mail host name. If you get a response, then it’s working. If nothing, then you’ll need to call the hosting company as I suggested.

    yep, the e mail is working as it should, I even contacted the support, they helped me set up the e mail again and entering it in the nodebb settings fields, but it still doesn’t work, I am going crazy lol

  • @marusaky Happy to take a look if you want to provide me with temporary admin.

  • @phenomlab said in Configure SMTP for Nodebb:

    @marusaky Happy to take a look if you want to provide me with temporary admin.

    of course, I will send you the details

  • @marusaky After checking:

    1. Email appears to work without issues. I am able to send new user registration emails with no issues
    2. Test template email also works fine without issues
    3. Emails sent to GMAIL accounts are sent to Spam. This is due to no DMARC DNS record being configured. You should also check that the A and AAA records (for Ipv6) are present in DNS
    4. Your server IP address appears on one blacklist. You should contact the owner of this list to have the block removed
  • @marusaky it looks like your SMTP connector in NodeBB is set to use StartTLS (which makes sense on port 587), although the message seems to be discarded. I changed this so it looks like the below

    2339b77c-a6f9-437f-b2c9-6068dfcfd791-image.png

    This seems to work in my testing. Let me know. Essentially, we change StartTLS to None

  • @marusaky seems there are some DNS records missing or are there but not configured correctly. I’ve corrected this so hopefully (in the next 48 hours) the spf, dmarc, and dkim should function as required and mail won’t be classed as spam.

    As discussed in PM though, some mail servers will still send messages to spam from new domains less than x days old. This is standard security practice and not much you can do to avoid unfortunately, but what we have is best practice.

  • @marusaky I checked again this morning and it seems that messages are still going to spam when using Gmail, so a little more investigation and configuration is needed. However, it seems to work fine with other domains I tested.

    Will look into this further.

  • @marusaky based on the work completed thus far (in relation to PM exchanges), I’m going to mark this completed. Sending email from the server itself works fine without issue, and DNS appears to be clean (valid SPF, DMARC, and DKIM records).

    It appears that only Gmail marks incoming messages from your domain as spam - perhaps because of the domain age, which there is nothing we can do to prevent this. Mail delivery to all other domains appears to work fine in al of my tests.

  • phenomlabundefined phenomlab has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation💗

  • Fixed background to nodebb forum

    Solved Configure
    25
    4 Votes
    25 Posts
    1k Views

    @Panda said in Fixed background to nodebb forum:

    Chatgpt told me the ::before method.

    Go figure 😛

  • NodeBB: Consent page

    Solved Configure
    16
    4 Votes
    16 Posts
    552 Views

    @DownPW I still do not see any issues.

  • 0 Votes
    2 Posts
    126 Views

    @mventures the swatch feature you refer to isn’t a NodeBB plugin, but a utility that I wrote that handles this. It is available for v2 (as you can see here) but I’ve stopped developing and releasing the code because it has been entirely rewritten to work for v3.

    If you’d like the code, this is possible, but you’ll need to upgrade to v3 first.

  • NodeBB: Creating pages

    Solved Configure
    9
    0 Votes
    9 Posts
    272 Views

    OK, I think I have figured out how to place a link in the footer which will click to a new page.

  • 5 Votes
    13 Posts
    470 Views
    'use strict'; const winston = require('winston'); const user = require('../user'); const notifications = require('../notifications'); const sockets = require('../socket.io'); const plugins = require('../plugins'); const meta = require('../meta'); module.exports = function (Messaging) { Messaging.notifyQueue = {}; // Only used to notify a user of a new chat message, see Messaging.notifyUser Messaging.notifyUsersInRoom = async (fromUid, roomId, messageObj) => { let uids = await Messaging.getUidsInRoom(roomId, 0, -1); uids = await user.blocks.filterUids(fromUid, uids); let data = { roomId: roomId, fromUid: fromUid, message: messageObj, uids: uids, }; data = await plugins.hooks.fire('filter:messaging.notify', data); if (!data || !data.uids || !data.uids.length) { return; } uids = data.uids; uids.forEach((uid) => { data.self = parseInt(uid, 10) === parseInt(fromUid, 10) ? 1 : 0; Messaging.pushUnreadCount(uid); sockets.in(`uid_${uid}`).emit('event:chats.receive', data); }); if (messageObj.system) { return; } // Delayed notifications let queueObj = Messaging.notifyQueue[`${fromUid}:${roomId}`]; if (queueObj) { queueObj.message.content += `\n${messageObj.content}`; clearTimeout(queueObj.timeout); } else { queueObj = { message: messageObj, }; Messaging.notifyQueue[`${fromUid}:${roomId}`] = queueObj; } queueObj.timeout = setTimeout(async () => { try { await sendNotifications(fromUid, uids, roomId, queueObj.message); } catch (err) { winston.error(`[messaging/notifications] Unabled to send notification\n${err.stack}`); } }, meta.config.notificationSendDelay * 1000); }; async function sendNotifications(fromuid, uids, roomId, messageObj) { const isOnline = await user.isOnline(uids); uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10)); if (!uids.length) { return; } if (roomId != 11) { // 5 Is the ID of the ID of the global chat room. Messaging.getUidsInRoom(roomId, 0, -1); // Proceed as normal. } else { user.getUidsFromSet('users:online', 0, -1); // Only notify online users. } const { displayname } = messageObj.fromUser; const isGroupChat = await Messaging.isGroupChat(roomId); const notification = await notifications.create({ type: isGroupChat ? 'new-group-chat' : 'new-chat', subject: `[[email:notif.chat.subject, ${displayname}]]`, bodyShort: `[[notifications:new_message_from, ${displayname}]]`, bodyLong: messageObj.content, nid: `chat_${fromuid}_${roomId}`, from: fromuid, path: `/chats/${messageObj.roomId}`, }); delete Messaging.notifyQueue[`${fromuid}:${roomId}`]; notifications.push(notification, uids); } };
  • NodeBB metadata

    Solved Configure
    4
    2 Votes
    4 Posts
    362 Views

    @phenomlab said in NodeBB metadata:

    @jac Are you sure ?

    https://www.google.co.uk/search?q=site%3Astockportcounty.fans&sxsrf=AOaemvLwnaZL-PliU_2dBOg_Eo1pMVhBjg%3A1638982328139&source=hp&ei=uOKwYeatBcOsad3yp7AE&iflsig=ALs-wAMAAAAAYbDwyLBSDcG5XYoFCKwQFhgz94wTxOcV&ved=0ahUKEwjm6dX71NT0AhVDVhoKHV35CUYQ4dUDCAk&uact=5&oq=site%3Astockportcounty.fans&gs_lcp=Cgdnd3Mtd2l6EAM6BAgjECc6CwgAEIAEELEDEIMBOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQowI6BQguEIAEOggIABCABBCxAzoFCAAQgAQ6CAguELEDEIMBOgsILhCABBDHARCvAToICC4QgAQQsQM6BQgAELEDOgsILhCABBDHARDRAzoLCAAQgAQQsQMQyQM6BQgAEJIDUABYySZg0CdoAHAAeACAAW2IAa0NkgEEMjMuMpgBAKABAQ&sclient=gws-wiz

    Fair enough 🤪🤪😁.

  • nodebb dropdown menu

    Solved Configure
    5
    0 Votes
    5 Posts
    418 Views

    @phenomlab said in nodebb dropdown menu:

    @kurulumu-net You set it like the below example taken from this site

    aae36790-3257-4bb2-ad5a-0d744309876a-image.png

    Which presents this

    77f47260-2941-4afe-9614-8e17dcfc8c19-image.png

    Very interesting…

    I actually thought this wasn’t possible, as I remember it being asked in the NodeBB forum.

    Is this something new that’s been implemented? I’ll 100% be doing that when I’m on the laptop over the weekend.

  • Iframely (Nodebb)

    Solved Configure
    40
    4 Votes
    40 Posts
    2k Views

    @DownPW This is now resolved. The issue was an incorrect URL specified in the Nodebb plugin. I’ve corrected this, and now it works as intended.