It is not really necessary to use one IP address per domain, both Postfix and Dovecot (and the DNS system) are perfectly capable of handling a practical unlimited amount of domains with only one IP.
Even if you do use only one domain per IP, you would usually still run only one instance of Postfix/Dovecot and configure them accordingly to handle mails for all domains.
Furthermore, both Postfix and Dovecot can use a wide range of sources for users, from the default in the form of the unix system user to text files, SQL databases or LDAP directories, and you can configure per domain or even per user where the mail should be stored.
How this is done is way too broad to answer on SF.
Regarding PTR records: You are correct that one IP can only have a single PTR record, but that is actually OK.
What is important is that the mail server uses the same hostname as in the PTR record in its HELO
message (as set in the postfix myhostname
parameter), so the triple of PTR record, A record and HELO name must be the same.
For the pure SMTP part, this is entirely sufficient. Spam filters make the situation more complex, as they will indeed add a small penalty to such a setup if the FROM
address and the HELO
doesn't match, but that alone is usually not enough to classify a mail as spam.
This can be counteracted by different means:
- Use
mail.example.com
as MX for example.org
. This is checked by spam filters.
- Add SPF records that authorize
mail.example.com
to send mails on behalf of example.org
.
- Use DKIM.
So, in the end, it stills stands: One IP address is enough for multiple mail domains, and using more than one is only is only useful if you have more complicated setups with multiple NICS or even servers in a HA scenario, but even then you would likely not separate domains to specific IP addresses.