looking for guidelines for basic smtp

Benjm

New member
Joined
Jun 21, 2013
Messages
1
I'm looking for some general guidelines on how to configure mail for my personal domain. This forum came up in a lot of search results for exim configuration questions I had, but I wasn't able to find the answers I needed. Maybe someone will read this and understand my question better than I've been able to match it to answers to others.

I have a domain, like example.com. For years I just used the registrar's dns server, forwarded my mail to some webmail service, and I hosted the site at the big hosting company. Now I want to host the site from my house, receive email (SMTP) at home, and serve webmail myself. I realize the many reasons why this might not be the most robust solution and that there's better ways to do it, but this is what I'm doing.

A long time ago I would use a mail-relay and two different DNS zones for the same domain, one 'internal' and the other 'external.' So the external (internet-facing) DNS server would provide an MX record for the domain that was a sendmail server in the DMZ. Incoming SMTP would be received by the sendmail server in the DMZ, which itself would have an internal (private-network-facing) DNS, with an MX record pointing to a Domino or Exchange server behind a second firewall. That seemed to work fine for a couple hundred email accounts. I've since seen better ways to do it that integrate LDAP and scale out with features better than just round-robin DNS, but I'm really looking for a simpler way to relay incoming SMTP for what is really two users.

Importantly, I'm convinced I can do this without the internal/external DNS which is needlessly complex in my current situation where I have so few hosts on the private network.

I get one public address at home. So I use a router with NAT to connect my servers. I could just configure a mail server with IMAP behind my port-25-forwarding router, but I have an aversion to storing the mail on a host that accepts connections initiated from the external network. My plan is to use a second router to isolate the SMTP relay so that my mail server only makes and receives connections to and from the specific host.

The mail relay will be a good place to do filtering and so on as well. It doesn't really matter to my question, but I am using wordpress and roundcube on this same host to serve the website and provide webmail access to the IMAP server on the inside. Those pieces are working brilliantly already.

My smtp relay is a little rpi, so I am using Raspbian. I vaguely recall sendmail from a long time ago, but I'm trying to use exim or postfix now and they seem to be close to the same thing. Configuring outbound mail is very easy. I haven't pointed my domain's MX record to it yet, because although it will receive mail, I don't understand how to make it relay the mail for my domain to my mail server inside. The examples I found seemed hopelessly complex for something that should be so simple.

At the moment my mail server inside is hhmail on a Windows PC. I'm intending to replace it with another rpi with Dovecot. That should be easy when I get the hardware. I use Thunderbird to read my mail when I'm home, and roundcube (on the DMZ host) to read it when I'm outside.

Does this configuration make sense for self-hosting a couple of email addresses?

How can I get exim4 to relay inbound mail to the internal IMAP host without using internal DNS and a MX record? I think I might be able to do it with a static route in a manual exim4.conf, but I would rather have a generated configuration file.

How would you do it?
 
These forums are for users of the DirectAdmin hosting control panel. DirectAdmin can be used on a local server, but would require a dedicated IP# for the license to be authenticated, or it will fail. It also needs a dedicated IP# for installation.

If you're planning on using DirectAdmin, then please rephrase your questions in the context of a DirectAdmin based server, after reading the DirectAdmin website. If not, then you'll be best served looking elsewhere.

Jeff
 
Back
Top