Configure smtp2go on a vps

SYSTEM INFORMATION
OS type and version AlmaLinux 9.8
Webmin version 2.653
Virtualmin version 8.1.0 GPL

I want to configure smtp2go on my VPS. I’m getting an error message that Ecuadorian public companies are blocking my VPS IP address. I don’t want to damage Postfix. Does anyone have a guide on how to do this?

I see only a option for AmazonSES and it maybe thats only in pro version?

Post the error your getting from your logs. It maybe you haven’t setup rDNS.

Check the docs, says pro version.

On rDNS

They have documentation for configuring a relay in Postfix. (But, configuring a relayhost in Postfix is always basically the same regardless of who runs the relay.)

I have never used or heard of smtp2go. Obviously, you already have Postfix and Cyrus SASL, so you don’t need to do the installation steps (which look mixed up and wrong) just configure the relay (Step 4).

Everything was perfect, thank you.

I looked into this and it works fantastic!

it is also free for low volume from smtp2go.

I don’t know if it is because I host from home but Outlook/hotmail always blocked me.

they always agreed to add mitigation since I had valid PTR, SPF, DKIM but they would always just put me on the block list again after a couple of weeks even though the IP in question has no reputation issues at all.

You can make postfix only use it for domains that dont work in /etc/postfix/transport (I dont have any issues with gmail or yahoo or other large hosters etc…).

Do you have any guide on how to use it with a government domain and Hotmail, in my case?

Check the exact reason why the email bounces first.

I would try to make it work with a native connection first.

Check for compliance of your mail server with tools like:

if you are in compliance then you can circle back to smtp2go

but you said it worked? If not I can give you the way I set it up.

Yep, that’s why. The net blocks owned by consumer ISPs are pretty much universally blocked from sending email directly to many mail servers.

I solved it by first creating an smtp2go account and verifying the domain:

  • Set requested CNAME records
  • Create smtp2go smtp User/Password

then on the server:

nano /etc/postfix/sasl_passwd and insert:

[mail-eu.smtp2go.com]:2525 youruser:yourpassword

Note there seems to be region specific servers for optimization, choose the one smtp2go lists when you created the user in their dashboard.

afterwards:

postmap lmdb:/etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.lmdb

I use lmdb, if you still use hash: change it accordingly.

Next:

nano /etc/postfix/transport


# --- Microsoft / Hotmail / Outlook / MSN / Live Consumer Domains ---

# Global & Standard Domains
outlook.com        smtp:[mail-eu.smtp2go.com]:2525
hotmail.com        smtp:[mail-eu.smtp2go.com]:2525
live.com           smtp:[mail-eu.smtp2go.com]:2525
msn.com            smtp:[mail-eu.smtp2go.com]:2525
passport.com       smtp:[mail-eu.smtp2go.com]:2525
passport.net       smtp:[mail-eu.smtp2go.com]:2525
windowslive.com    smtp:[mail-eu.smtp2go.com]:2525

# Regional Outlook Domains
outlook.at         smtp:[mail-eu.smtp2go.com]:2525
outlook.be         smtp:[mail-eu.smtp2go.com]:2525
outlook.cl         smtp:[mail-eu.smtp2go.com]:2525
outlook.co.il      smtp:[mail-eu.smtp2go.com]:2525
outlook.co.th      smtp:[mail-eu.smtp2go.com]:2525
outlook.co.uk      smtp:[mail-eu.smtp2go.com]:2525
outlook.com.ar     smtp:[mail-eu.smtp2go.com]:2525
outlook.com.au     smtp:[mail-eu.smtp2go.com]:2525
outlook.com.br     smtp:[mail-eu.smtp2go.com]:2525
outlook.com.gr     smtp:[mail-eu.smtp2go.com]:2525
outlook.com.tr     smtp:[mail-eu.smtp2go.com]:2525
outlook.com.vn     smtp:[mail-eu.smtp2go.com]:2525
outlook.cz         smtp:[mail-eu.smtp2go.com]:2525
outlook.de         smtp:[mail-eu.smtp2go.com]:2525
outlook.dk         smtp:[mail-eu.smtp2go.com]:2525
outlook.es         smtp:[mail-eu.smtp2go.com]:2525
outlook.fi         smtp:[mail-eu.smtp2go.com]:2525
outlook.fr         smtp:[mail-eu.smtp2go.com]:2525
outlook.hu         smtp:[mail-eu.smtp2go.com]:2525
outlook.ie         smtp:[mail-eu.smtp2go.com]:2525
outlook.in         smtp:[mail-eu.smtp2go.com]:2525
outlook.it         smtp:[mail-eu.smtp2go.com]:2525
outlook.jp         smtp:[mail-eu.smtp2go.com]:2525
outlook.kr         smtp:[mail-eu.smtp2go.com]:2525
outlook.lv         smtp:[mail-eu.smtp2go.com]:2525
outlook.my         smtp:[mail-eu.smtp2go.com]:2525
outlook.sa         smtp:[mail-eu.smtp2go.com]:2525
outlook.sg         smtp:[mail-eu.smtp2go.com]:2525
outlook.sk         smtp:[mail-eu.smtp2go.com]:2525
outlook.pt         smtp:[mail-eu.smtp2go.com]:2525
outlook.ph         smtp:[mail-eu.smtp2go.com]:2525

# Regional Hotmail Domains
hotmail.at         smtp:[mail-eu.smtp2go.com]:2525
hotmail.be         smtp:[mail-eu.smtp2go.com]:2525
hotmail.ca         smtp:[mail-eu.smtp2go.com]:2525
hotmail.ch         smtp:[mail-eu.smtp2go.com]:2525
hotmail.cl         smtp:[mail-eu.smtp2go.com]:2525
hotmail.co.il      smtp:[mail-eu.smtp2go.com]:2525
hotmail.co.jp      smtp:[mail-eu.smtp2go.com]:2525
hotmail.co.nz      smtp:[mail-eu.smtp2go.com]:2525
hotmail.co.th      smtp:[mail-eu.smtp2go.com]:2525
hotmail.co.uk      smtp:[mail-eu.smtp2go.com]:2525
hotmail.co.za      smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.ar     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.au     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.br     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.hk     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.my     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.ph     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.sg     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.tr     smtp:[mail-eu.smtp2go.com]:2525
hotmail.com.tw     smtp:[mail-eu.smtp2go.com]:2525
hotmail.cz         smtp:[mail-eu.smtp2go.com]:2525
hotmail.de         smtp:[mail-eu.smtp2go.com]:2525
hotmail.dk         smtp:[mail-eu.smtp2go.com]:2525
hotmail.es         smtp:[mail-eu.smtp2go.com]:2525
hotmail.fi         smtp:[mail-eu.smtp2go.com]:2525
hotmail.fr         smtp:[mail-eu.smtp2go.com]:2525
hotmail.gr         smtp:[mail-eu.smtp2go.com]:2525
hotmail.hu         smtp:[mail-eu.smtp2go.com]:2525
hotmail.id         smtp:[mail-eu.smtp2go.com]:2525
hotmail.ie         smtp:[mail-eu.smtp2go.com]:2525
hotmail.in         smtp:[mail-eu.smtp2go.com]:2525
hotmail.it         smtp:[mail-eu.smtp2go.com]:2525
hotmail.kr         smtp:[mail-eu.smtp2go.com]:2525
hotmail.lv         smtp:[mail-eu.smtp2go.com]:2525
hotmail.my         smtp:[mail-eu.smtp2go.com]:2525
hotmail.nl         smtp:[mail-eu.smtp2go.com]:2525
hotmail.no         smtp:[mail-eu.smtp2go.com]:2525
hotmail.ph         smtp:[mail-eu.smtp2go.com]:2525
hotmail.pt         smtp:[mail-eu.smtp2go.com]:2525
hotmail.rs         smtp:[mail-eu.smtp2go.com]:2525
hotmail.ru         smtp:[mail-eu.smtp2go.com]:2525
hotmail.se         smtp:[mail-eu.smtp2go.com]:2525
hotmail.sg         smtp:[mail-eu.smtp2go.com]:2525
hotmail.sk         smtp:[mail-eu.smtp2go.com]:2525

# Regional Live Domains
live.at            smtp:[mail-eu.smtp2go.com]:2525
live.be            smtp:[mail-eu.smtp2go.com]:2525
live.ca            smtp:[mail-eu.smtp2go.com]:2525
live.cl            smtp:[mail-eu.smtp2go.com]:2525
live.cn            smtp:[mail-eu.smtp2go.com]:2525
live.co.uk         smtp:[mail-eu.smtp2go.com]:2525
live.co.za         smtp:[mail-eu.smtp2go.com]:2525
live.com.ar        smtp:[mail-eu.smtp2go.com]:2525
live.com.au        smtp:[mail-eu.smtp2go.com]:2525
live.com.mxy       smtp:[mail-eu.smtp2go.com]:2525
live.com.pt        smtp:[mail-eu.smtp2go.com]:2525
live.com.sg        smtp:[mail-eu.smtp2go.com]:2525
live.de            smtp:[mail-eu.smtp2go.com]:2525
live.dk            smtp:[mail-eu.smtp2go.com]:2525
live.es            smtp:[mail-eu.smtp2go.com]:2525
live.fi            smtp:[mail-eu.smtp2go.com]:2525
live.fr            smtp:[mail-eu.smtp2go.com]:2525
live.hk            smtp:[mail-eu.smtp2go.com]:2525
live.ie            smtp:[mail-eu.smtp2go.com]:2525
live.in            smtp:[mail-eu.smtp2go.com]:2525
live.it            smtp:[mail-eu.smtp2go.com]:2525
live.jp            smtp:[mail-eu.smtp2go.com]:2525
live.nl            smtp:[mail-eu.smtp2go.com]:2525
live.no            smtp:[mail-eu.smtp2go.com]:2525
live.ru            smtp:[mail-eu.smtp2go.com]:2525
live.se            smtp:[mail-eu.smtp2go.com]:2525

Run:

postmap lmdb:/etc/postfix/transport

add to main.cf:

nano /etc/postfix/main.cf

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
transport_maps = lmdb:/etc/postfix/transport

This way it only uses the relay for those domains. One vital thing is to make sure you have custom PTR record. Many home ISPs dont offer this.

Gmail does not seem to have this problem with deliverability from my home ftth connection:

I am not sure about office 365 business, I think it works.

Thanks for your guide, but I think I’m using maps, not lmdb. Maybe I can do it with maps and transport.

lmdb is a type of map. hash was the most common type of map in the past, but lmdb has become the default a couple/few years ago, I believe.

Seems like you must be on a pretty old OS, if you’ve only got hash and no lmdb, but it doesn’t matter for the above. Just replace lmdb with hash in the examples.

Or, perhaps it’s a separate package like postfix-lmdb.