Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Outbound connections to SMTP servers
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Outbound connections to SMTP servers

Do you block outbound connections to SMTP servers?I want to set up a mastodon instaancem so need to be able to connect to Mailgun for password resets, account verifications et cetera

Comments

  • stonedstoned Member
    edited December 2022

    To or From?

    Port 25 is required for an MTA for successful delivery. Disable AUTH advertisement on port 25. Don't allow anyone login over 25. Only enable advertisement of AUTH on TLS, and only advertise AUTH to selected IPs you want to allow to login for sending mail, and not everyone. Lock everything else down using iptables. Anyone not on the whitelist shouldn't even get an option to use the AUTH command.

    That is if you run your own mailserver. If you are using a provider like mailgun, you don't need worry about SMTP connections inbound/outbound as you are simply using a 3rd party SMTP server. I run my own mail server and don't even use mailgun so I can't comment on that. I'm not even sure if I understand your question to be fair.

    More than likely they'll have a secure SMTP port for your application to use in order to send mail, so you may not even need to worry about anything on your end.

    So long as your system can make outbound connections to whatever secure SMTP port they provide you with, you should be fine. You're retrieving mail through their secure IMAP port I assume, so again, you don't need to worry.

    If you're not running a mail server, you don't have to worry about port 25 or any SMTP port, as no service is running on your box on those ports.

    Hope that makes sense.

    Thanked by 1yoursunny
  • Why do you need two threads for basically the same question?

  • I use smtp2go for free and doesn't require outbound port 25. Have you checked mailgun setup requirements?

  • Mailgun doesn't require you to make outbound 25. They will provide you a secure SMTP port where your application can send emails through.

    host: “smtp.mailgun.org”, port: 587, auth: { user: “postmaster@YOUR_DOMAIN_NAME”, pass: “YOUR_SMTP_PASSWORD”, }

Sign In or Register to comment.