TD:LR:
1- fuck you members who saw my post and refused to help
2- you can use SMTP relays like dynu service (easy to do but they keep logs)
3- you can be your own SMTP relay service using VPS and postfix (hard to setup but worth it)
- You need a trusted VPS ( i use vlutr)
- You need to open port 25 within that VPS
- You need to setup postfix as send only
- You need to setup SASL to not be an open relay
I’m by all means not an expert in emails or network in fact i keep learning about them daily but i have leanred a lot and i wanted to share it among others (even tho i got negative replies from here and i did not get help except from 2 on my first post and this is was it. So yes even tho -almost- i did not get help here, i will help new members because fuck you old ones who saw my post and knew the info but did not want to help)
Intro:
So now my problem was with my ISP is blocking port 25 (SMTP) and has no option to open it (no plans or addons) so i had nothing to do, now what i can do is use online SMTP relay service but my problem with it is they keep logs on emails (it’s just how it works) you can’t avoid that and if you think about it, it defeats the idea of self-hosting and that you own your data. so i wanted to get it higher in level and i wanted to be my own relay now here i found problem is that it’s not so common so i struggled onlin until i found a guide so now i had to pick up good VPS provider who is trusted and allow ports such as 25, So while you are searching on VPS, pick up trusted one and that can open SMTP port for you. I used to be a luke smith viewer so i know about vultr and i wanted to give a shot so i contacted them and they asked why i want it and how many i will send per day so i said it’s personal and probably one or two at max as i’m not active email user. Now my strugle was within setting up postfix to use it as smtp relay…
STEPS:
- I will assume you already have mailcow running healthy and i will just explain SMTP part
- All you need for this step is setting up postfix and a note is that do not change network interface, keep it open for all not loopback (because you will use it outside your network as relay)
- And you need to setup SMTP or SASL so to speak to avoid being an open relay
- make sure your postfix is running in chroot
- make sure all ports are opened for SMTP to connect to it from mailcow as relay later (simple
telnet
command would help)
- after you done, go to mailcow UI admin page and click on routing then add relay info as:
- HOST: the host you configured during setup along side IP address (as we added in postfix master.cf)
- username: username you added while you setting up SASL with command line so it will be something like username@host.name
- password: will be same password you added while you setting up SASL with command line too!
LINKS:
TIPS and TRICKS i have found:
- in postfix do not change network interface to loopback as we need to access postfix outside the network, loopback will make it local only
- while setting up sasl make sure postfix is running in chroot, check it by opening
master.cf
file and replace line:
smtp inet n - n - - smtpd
to smtp inet n - - - - smtpd
and make sure you changed SMTP port (As it’s defualt to 25 and our ISP is blocking it so create new line of smtp and change it to be(587 is our port, change as needed
):
587 inet n - - - - smtpd
and restart postfix
This was my try with postfix and the tricks i had to solve but if you found different errors you can post them and i will try to help and heck! let’s make a big wiki page in mailcow for it. Also if you will use vultr too you might use my link and get some free credits: https://www.vultr.com/?ref=9020605-8H (also count it as thanks for my guide)
If you still want to use other services like dynu (fuck you) it’s easy just go to thier outbound smtp relay service page from their email tab then buy it and you will get info just copy and paste inside mailcow smtp relay (the hostname, username and password) so it’s easy to setup and you really don’t need a guide