In the event you missed them, I took a couple stabs at some email tutorials. The intent was to provide enough understanding to get you pointed in the right directions rather than get 'er done copy/pasta recipes. Hence, they may or may not be the droids you're looking for:
If one or more of following shoes fits:
Just want to get NodeBB up and running with minimum of hassle please I refer you to the tl;dr commentary from my NodeBB Email Options article.
Intermediate to advanced Linux user. You can likely get this on your own. May be of some value to those unfamiliar with network and server side aspects of SMTP?
Seasoned email administrator? Right. Please do not be too harsh as I'm endeavoring to bridge a gap here... SME commentary welcome. 😉
If, on the other hand:
You're attracted to the "Ops" side of DevOps.
Like to know how things work.
Medium/advanced "beginner" to the Unix/Linux command line and eager to learn.
Have the time to invest in that learning (i.e. big boss man or some other urgency not twisting your arm to get this done yesterday) and not afraid to RTFM.
I confess to deploying a Null Client set up for my forums. I thought I'd expand upon this a bit for interested parties not already possessing subject matter expertise but comfortable with the command line and willing to roll up their sleeves. Follows is meant to be a thumbnail sketch to get the DIY inclined pointed in the proper directions rather than exhaustive step by step copy pasta.
Firstly, let's take a look at some reasons why/when this use case may be a fit:
Isolation and separation of duties. Some favor an all on one approach. I favor dedicated vm's for dedicated tasks. I'd rather not have my app servers initiating connections with the Big Bad Internet. Incoming http(s), smtp, etc. requests from non local VM's is proxied.
Access to prexisting email infrastructure.
Security and stability concerns. All software has bugs. Postfix has weathered extensive scrutiny and audit. As such, I expect it is less vulnerable to things like malformed responses.
Flexibility moving forward. For e.g. you want a daemon to manage NodeBB's outgoing mail queue - and perhaps that daemon also comes in handy for other duties like emailing various reports or alerts to administrators.
You have a Postfix Null Client configured as outlined in the Postfix Standard Configuration Readme.
You have NodeBB configured to utilize such as depicted in my screenshot in my prior article linked above.
I've mentioned this can get complex in a hurry. Let's see if we give it a little K.I.S.S.
Incoming!! 💣 📬
Let's get our biggest hurdle out of the way.
Null clients do not receive incoming mail. Setting up SMTP relays, IMAP server, virus/malware scanner, etc. ups the ante considerably. We've already got enough on our plates, at least for now, embarking upon this Null Client journey so lets save ourselves some grief and off load those duties to a reputable third party service such as Proton Mail.
As always, there's more than one way to do it:
Null client delivers email directly to one of the servers listed in recipient domains MX records.
Null client forwards email to a dedicated SMTP relay host, e.g. the folks handling your incoming mail (you may need to coordinate with them to configure some knobs, e.g. which hosts they will relay email from). Advantages to using a relay host include: 1) Undeliverable mail does not get stuck on your NodeBB server, and 2) Our null client is now initiating outgong SMTP connections with only the relayhost(s) rather than the big bad Internet at large.
Postfix needs to know about your relay host to get this working. Add the following line to your null client's main.cf
relayhost = your-relay-host.domain.tld
You may also choose to specify relayhost via alternate parameters, such as IP address. I recommend sticking with hostnames as IP addresses may change from time to time.
DNS Record Cogs & Widgets ⚙
DNS presents yet another challenge and can have a high price for mistakes. So you're best off offloading this to a third party. Good news is your email provider likely bundles this with their service. Your domain registrar surely does. Consider leveraging that. Submit a request to have forward and SPF records added for your NodeBB instance's hostname.
Note: I've used traditional Bind zone file syntax in the examples below. Using this syntax in help desk requests helps avoid confusion. Your provider may well offer a web based UI.
You want records that look similar to the following (mind the trailing periods on fully qualified host names):
The purpose of an SPF record is to provide a list of servers authorized to send email from your domain and must therefore necessarily include your third party provder's servers as well as your null client(s).
your-domain.tld. IN TXT "v=spf1 ip4:primary-ip, ip4:secondary-ip, ip4:null-host-ip -all"
Your cloud provider is authoritative for reverse records for IP space assigned to them. Set up a PTR record for your NodeBB host using your providers management ui or submit a request ticket for them to create such for you.
XXX.YYY.WWW.ZZZ.in-addr.arpa. IN PTR null-host-name.your-domain.tld.
I manage my own DNS servers. DKIM is a royal pita for even seasoned adminstrators and imho an accident waiting to happen. Hence, unless you have a passion for learning about this stuff, I recommend letting your email/IMAP provider handle DNS for you, as it is lots easier to have them add an A or CNAME record as necessary for web servers and such than for you to configure and maintain DKIM. Else avoid DKIM entirely.
Other systems expect the existence of a valid postmaster address for communication of issues such as bounced mail, etc. Create "[email protected]", either as a dedicated mailbox or a forward to an existing mailbox, e.g. [email protected] if you prefer not having to check multiple mailboxes. Test this. Don't sweep postmaster mail under the rug lest it come back to haunt you at the most inopportune of times.
We need to ensure our newly minted Null Client is not blacklisted. MX Toolbox offers a meta blacklist check. Barracuda Networks will most likely do so before you've sent even a single email and requires jumping thru their hoops to become delisted. And jump ye' shall because their stuff is in wide spread use, particularly corporate side. It behooves you to check these blacklists from time to time, particularly with a newly minted server.
Bippity Boppity Boo! 🎉
Put it together and what have we got?
Robust SMTP daemon relaying outgoing NodeBB email.
Robust and reasonably secure IMAP mailboxes sans administration headaches.
No worries about third party email plugin breakage between version upgrades.
While this method adds complexity it's not too difficult to get set up once you understand some underlying concepts, moving pieces involved and what you're targeting. It also serves as a stepping stone to building out your own email infrastructure should you decide this stuff is all just too much fun.
@julian If i hide the posts and set to view only for logged in users then it effects for SEO? I need to index all contents in google. If i hide post for only logged in users, Google crawl also can't detect posts right?
All of our translation efforts are handled on Transifex (https://www.transifex.com/nodebb/nodebb/), but in general, yes... fixes and incorrect translations would be handled there, and custom changes specific to your community you'd make to those files directly.
I just reinstalled the forum and everything is working fine.
The links have the right url, I did not have a 403 error even without modifying config.json with socket.io origins.
While at the installation I did not change anything.
But hey, everything works fine, it's the main lol.
Thanks, i love to use NodeBB !
(I just put the url of the site when setting up the forum and not by changing config.json later as I had done the first, it may be from there?)
Final update, it worked on the production server!! so now our forum is working properly sending emails the Linux way on a Windows Server OS, quite nice I would say, just as a side note our forum is actually really small in number of users, as it is an internal forum, so I can't assure this setup will work out to other forum's expectations or needs, also I would like to add that this shouldn't be the way to do it on Windows as it is kind of a weird way to handle it so in later versions it would be nice to see it reworked or polished for Windows environments (especially because it looks like the program used to simulate sendmail on Windows is no longer receiving maintenance).
@Gaurav-Grv-Robinson It looks like NodeBB uses the nodemailer package under the covers, but the UI may only present SMTP transport options.
Your best bet is to use an SMTP server that's configured to listen/login/relay email on your behalf, this is a little different than a mail spooling system that in the end may relay, or otherwise send directly. If you have an inbound mail server that also has smtp for outbound, use that.
I tend to just use SendGrid (hosted SaaS mail delivery) for my outbound emails, because delivery rates come out much better. There are other services, and depending on where you are hosting, they may offer one.