Send only SMTP server?

I use Microsoft 365 for my normal email. Still, I'm building landing pages for both of my websites, and I need to collect email addresses for a mailing list for both domains (don't worry this will be a double opt-in system and very easy to unsubscribe from). Most people would use a third-party email mailing list provider like Mailchimp or ConvertKit, but due to privacy reasons, I want to build the mailing list software myself so that email addresses never leave my servers.

To do this, I need to have a send-only SMTP server to send all of my emails. I was wondering if there was anything I should be aware of when picking a particular piece of SMTP server software? I only want it to be able to send email from two domains which are both owned by me, and I want all email it sends to be plain text only.

When it comes to Linux distributions being used I only ever use OpenSUSE LEAP so currently, that would be LEAP 15.2. I know Linode block SMTP ports by default, but I was under the impression that you could have them unblocked via a support ticket.

My question is very simple. Which SMTP server is easiest to configure for sending only mailing lists? I don't want to waste a lot of time building out a complex bit of mailing list software. The only features I want are double opt-in subscription, email address storage and plain text email sending. I'll be using PostgreSQL to store all of the email addresses.

If anyone has any advice on this side of things I would like to hear it. I'm particularly interested in things that could help me improve privacy for my users and to increase security on my side of things.

I'm going to release my solution as open-source software on Github for other people who want a really easy to use solution for creating email lists.

4 Replies

Thank you for your reply.

I've been thinking about this a bit more and what would be good is if I could have domain1.com send from:

smtp.domain1.com

and have domain2.com send from:

smtp.domain2.com

I mean I guess I could have a Linode for each domain, but that seems a bit wasteful to me. It would have the advantage of each domain having a completely separate IP address which might prove useful. I'm not sure what the normal solution to this problem is, to be honest.

Is there a better way to go about this? I've never really liked setting up email, so I'm a bit of a newbie on this side of things.

@Cromulent --

You write:

I mean I guess I could have a Linode for each domain, but that seems a bit wasteful to me.

If you want to send from separate IP addresses, you would need:

  • two different Linodes; or
  • a single Linode with 2 different IP addresses (doable for more $$$).

You can send from two different domains using a single Linode, a single IP address and a single postfix(1) configuration. You're going to have to be very well-versed in setting up DNS for this. You would need two different domain registrations for domain1.com and domain2.com.

IMHO, the proper way to do this is mark the outbound mail with a special header…say:

X-Originating-Page: this_page
or
X-Originating-Page: that_page

to distinguish your two situations. There's only one Linode, one IP address, one domain, and one postfix(1) configuration required to do this. It's your sending app that makes this distinction.

I do this all the time. It's really easy and mail user agents (MUAs) are sophisticated enough to ignore stuff like this.

If your mail is outbound-only, why do you care which domain it came from? After your server sends it, you have no control of it anymore.

You also write:

It would have the advantage of each domain having a completely separate IP address which might prove useful.

This statement is completely wrong…and represents a fundamental misunderstanding of how DNS works. Multiple domain names can resolve to a single IP address. Not only is this situation common, I would suggest that it's the norm and not the exception. At one time, I had 3 different domain names that resolved to my Linode's IP address…

-- sw

+1 for Postfix.

I have a similar set up - Office 365 (Exchange Online) for my mailbox, and Postfix running on my server as send-only for my apps.

I don’t have to do anything other than the “dpkg-reconfigure postfix” (on Ubuntu anyway) to set the outgoing server name etc., and it’s firewall’ed off from the public.

It would have the advantage of each domain having a completely separate IP address which might prove useful.

One advantage I can see here is reputation. If domain1.com sent emails that enough people saw as “spammy”, reported them and got the IP blacklisted, it would have a negative impact on domain2.com’s emails if they were sent from the same IP.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct