SMTP advice needed

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
Hi, Ive recently moved everything over to a new host, new OS (ubuntu 20.04) ive got my forums installed using a version of phpnuke, it seems the forum might need smtp to work properly. I dont remember having the problem before when i setup the forum on the old host.. Anyway, if i end up needing to setup a SMTP server, can anyone here advise on one thats best for a newbie. Ive read SMTP servers can be pain in the back side for a newbie. If i need to setup one then so be it, it would also be handy for my emails instead of paying the hosting company a extra couple quid like i did with previous host. Remember for a newbie, ive got by over the years searching the internet and asking when needed, not ideal i know.. Any helps appreciated, cheers
 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
Not to sound unhelpful but it's kind of an unrealistic expectation to ask someone for a step-by step instructions how of to get a working mail server setup. Those who took the time to do so did research as in what is needed to setup a working mail server setup and tried, failed and with learning experience were able to do there setup. So why didn't you look for a how to using a search engine first, you also can't expect someone to tell you how to do something if you haven't done anything on your part first to begin with.
If you are going to be wanting to hosting your own mailserver it is important that you figure out the setup yourself so that once it is setup you actually understand how to manage it and if is something breaks or doesn't work correctly that you can fix it. You may also want to have a look at this article.
 
OP
J

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
Alright mate, noted. Am not expecting someone to do all the work for me, looking for a recommendation on one that might be more suited for a newbie, more basic, easier to manage. I dont mind putting in the effort learning how to use. Ill have a look at those links, cheers
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
I'll explain in short what you need need to get a working mailserver setup:
1. Postfix (for SMTP, so you can send and receive mail)
2. Dovecot (for Imap, so you can read your inbox)
3. Anti-Spam(Spam assassin)
4. Anti-virus( clamav or another)
5. Dns records: A record to point to your mail host and MX records to tell other mailservers where to deliver mail for your domain)
You will also want to use greylist as a form of protection against spammer
You will also want to have a look at using SPF and DKIM.
The last two can be use for both outgoing and incoming, for outgoing you just configure spf and dkim dns records and for incoming you configure you mailserver to check if a mailserver is allowed to send for that domain.
You can choose your own spam and anti-virus protection from the postfix addon page, a popular one is amavisd-new but I use mailscanner which is not officially supported by postfix but it does builtin spamassasin and allows you to configure the anti-virus of your choice. Also you will want to look into setting up TLS for encrypting you connections with other mailserver for incoming and outgoing mail.
I hope that gives you some information to help you get started on what parts you need to be looking into to get a working setup.
 
Last edited:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
You may also want a webmail client setup such as Roundcube or another if you want to also read your mail through a web-browser besides connecting using a e-mail client such as Thunderbird.
 
OP
J

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
Thats enough to keep me busy, wait for the ive destroyed my vps post later :D How gready do you reckon that would be on cpu/ram
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
What are the cpu/ram specs of your vps?
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
vCPUs2
RAM4GB
Networking400Mb
SSD120GB
If all you are running currently running is a webserver that isn't high traffic you should be fine. I'm running a webserver(lamp) and mailserver on my vps with 4G ram and 4 vCPU and 99% of the time it's idle.
 
OP
J

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
If all you are running currently running is a webserver that isn't high traffic you should be fine. I'm running a webserver(lamp) and mailserver on my vps with 4G ram and 4 vCPU and 99% of the time it's idle.
awesome mate, thanks.
 
OP
J

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
ive got them up and running, able to send email from putty as root to another email. roundcube and dovcot both look to be running ok when tested from putty. i seem to have missed where to create the email user account that i can use later to log into roundcube. etc/postfix/virtual has " [email protected] joe " no password

any helps appreciated
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
You need to setup SASL with postfix so that you can use configure dovecot to use SASL. Then you can configure dovecot the mail location in dovecot, as well as the user, password and password scheme.

These first two should contain all the information you need and links to it.

These links are also of found on the pages of the second link above but I pasted them here so that you have an idea.
 
Last edited:

jpnilson

Active Member
Joined
Jul 31, 2021
Messages
154
Reaction score
84
Credits
1,359
Hi, Ive recently moved everything over to a new host, new OS (ubuntu 20.04) ive got my forums installed using a version of phpnuke, it seems the forum might need smtp to work properly. I dont remember having the problem before when i setup the forum on the old host.. Anyway, if i end up needing to setup a SMTP server, can anyone here advise on one thats best for a newbie. Ive read SMTP servers can be pain in the back side for a newbie. If i need to setup one then so be it, it would also be handy for my emails instead of paying the hosting company a extra couple quid like i did with previous host. Remember for a newbie, ive got by over the years searching the internet and asking when needed, not ideal i know.. Any helps appreciated, cheers
I set up an email server a while back using instructions at the link below. It might be easier if you can link your setup to one of the free email services such as gmail or yahoo. In any case I had a working email server using the instructions below

 

dcbrown73

Well-Known Member
Joined
Jul 14, 2021
Messages
365
Reaction score
342
Credits
3,224
Are you only needing an SMTP server to relay forum emails? If so, you only need Postfix. Nothing else. Postfix is actually quite easy to setup, though you just need to read a little and heed security details as a part of the setup. (no open relays!)

The biggest issue you might run into is RBLs. Some today will block email delivery from a relay server if you don't have reverse DNS (PTR records), MX records, and probably SPF / DKIM / DMARC records, but I've found if they do start blocking you. You can reach out and inform them that it's a forum mail relay server and they will generally unblock you.

Just ensure you keep your SMTP server so that it cannot be used as an open relay. (ie, don't listen on port 25), make the forum software using the local sendmail alias to send email with Postfix.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
It's not too hard to manage your own mailserver once you know how everything works. You can use the following toolbox for checking the status of your mailserver, to check if your system is an open relay or not as @dcbrown73 mentioned.
 
OP
J

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
i have a few domains, the main one mysite1com. i think has always been the hostname on the vps in the past. yesterday i setup mail.site2.com as the hostname as dovecot etc were using mysite.com. and its now causing problems when viewing mysite1.com on chrome.

there is a confilct between mysite1.com and mail.mysite2.com which is the only one that has the padlock/secure symbol

eejit i am lol
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,258
Reaction score
4,728
Credits
45,980
You are talking about websites now, that's a whole different topic because dovecot uses port 993(imap) and webservers use 80 and 443 those can't conflict because they are different services. You can have a website running on on mydomain.com and be receiving mail for that same domain. As well as connecting to imap but a subdomain is usually used for the different services and hosts depending how it is setup. Since you are talking about website problems I would say that's a thread for a different topic or am I misunderstanding you?
 
Last edited:

dcbrown73

Well-Known Member
Joined
Jul 14, 2021
Messages
365
Reaction score
342
Credits
3,224
It's not too hard to manage your own mailserver once you know how everything works. You can use the following toolbox for checking the status of your mailserver, to check if your system is an open relay or not as @dcbrown73 mentioned.
Mail servers are actually pretty easy to build. Though these days, I prefer not manage Internet facing mail servers. (ie exposed to the Internet) The sheer volume of attacks on them these days. It's much better to use a hosted mail service that has dedicated provider who has a full security team managing those attack surfaces.

I still run relay mail servers, but port 25 is not openly exposed to the Internet. At best, their exposure is whitelisted by IP address on the Firewall.
 
OP
J

joe83

New Member
Joined
Oct 15, 2021
Messages
19
Reaction score
4
Credits
157
ill remove the virtual host mail.mysite2.com, set mysite1.com to hostname and connect to roundcube via mysite2.com/roundcube. see if thats fixes my problem.

edit: ill remove it all, start again
 
Last edited:

Members online


Latest posts

Top