So I've acquired a VPS and a domain (
my_domain.com, say), and now I'd like to set up my own, exim4-based e-mail infrastructure for learning purposes. In order not to produce an open relay I need some basic understanding about best practices for authentication.
My initial understanding is that the MTA (exim4) should act in two roles when it comes to authentication:
When my MUA (Apple Mail on a MacBook, say) connects to it over SMTP, it must insist on authentication. If the sender address is
email@example.com, the username/password for (Debian) user
meon the VPS should serve. My ISP assigns variable IP addresses, so I could not fix the MAU to a particular one nor do I know the applicable range. In any case, after such authentication the MTA should send (relay?) the message to the relevant MTA (at
mail.your-domain.com, say) without further authentication.
When another MTA (at
mail.your-domain.com, say) contacts my MUA over SMTP it should keep it for delivery only when the target domain is
my_domain.com(i.e. allow this as local domain) and dump it otherwise (i.e. not act as an open relay).
My questions is two-fold like this: Is my basic understanding correct and will the following set of answers to
dpkg-reconfigure exim4-config achieve this setup/goal?
mail name: my_domain.com IP-addresses to listen on for incoming SNMP connection: (the VPS) local domains: mail;my_domain.com domains to relay mail for: (none) machines to relay mail for: (none) keep DNS-queries minimal: no delivery method for local mail: mbox format in /var/mail split configuration file into small files: no root and postmaster mail recipient: root
I'm currently puzzled because this does not mention any authentication (or on what grounds the MTA could even make a distinction between SMTP-connections from an MUA or another MTA) and whether messages to domains other than local domains will be "dumped". This looks to me as if it would allow my MTA to receive messages to
my-domain.com from anywhere, not be an open relay, but also not allow my MUA to send anything via it.