Postfix for three domains on one host

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix for three domains on one host

Andrew Bernard
I want to use my single VPS for three distinct domains. Simple for
webservers. I would also want to be able to send and receive email on
the three domains using Postfix. I understand there is postfix-multi.
Everything I have read so far uses separate IP addresses for this
scenario. Most VPS providers are loath to assign more than one or at
most two IPV4 address to a VPS, due to the global shortage. I have been
unable to get three at Linode.

Not just subdomains, but quite distinct ones. For example (just abstract
names)

ab.space

cd.space

zx.com


The obvious solution is to run three VPS's. But this adds expense and
triples the admin overhead. is there any way to configure Postfix to act
for three separate domains without the necessity of separate IP's?

Pardon me if this is a stupid newbie question, but it seems to me that
Postfix is enormously powerful and can do pretty much anthing if you
know how.

Andrew


Reply | Threaded
Open this post in threaded view
|

Re: Postfix for three domains on one host

Ralph Seichter-2
* Andrew Bernard:

> is there any way to configure Postfix to act for three separate
> domains without the necessity of separate IP's?

Yes, a single Postfix instance with one IP address can easily handle
multiple domains. http://www.postfix.org/VIRTUAL_README.html should get
you started.

-Ralph
Reply | Threaded
Open this post in threaded view
|

Re: Postfix for three domains on one host

Andrew Bernard
HI Raplh,

Does this cover the case where each domain has its own header showing
origin from each distinct domain? When I tried your suggestion they all
come out from $myorigin. What am I missing? Inbound works fine to any
number of virtual domains for me. It's outbound that has me perplexed.


On 16/8/19 11:20 am, Ralph Seichter wrote:
> Yes, a single Postfix instance with one IP address can easily handle
> multiple domains. http://www.postfix.org/VIRTUAL_README.html should get
> you started.
>
Reply | Threaded
Open this post in threaded view
|

Re: Postfix for three domains on one host

Ralph Seichter-2
* Andrew Bernard:

> Does this cover the case where each domain has its own header showing
> origin from each distinct domain?

The "From" header is usually provided by the MUA. According to your
message headers, you are using Thunderbird, so that's where you define
your desired sender address(es). Postfix won't overwrite that header.

-Ralph
Reply | Threaded
Open this post in threaded view
|

Re: Postfix for three domains on one host

Andrew Bernard
Now am I further confused. What is $myorigin used for then?


Andrew


On 16/8/19 12:04 pm, Ralph Seichter wrote:
> The "From" header is usually provided by the MUA. According to your
> message headers, you are using Thunderbird, so that's where you define
> your desired sender address(es). Postfix won't overwrite that header.
>
> -Ralph
Reply | Threaded
Open this post in threaded view
|

Re: Postfix for three domains on one host

Bill Cole-3
On 15 Aug 2019, at 22:20, Andrew Bernard wrote:

> Now am I further confused. What is $myorigin used for then?

It is used to qualify bare sender usernames for mail generated locally.
The nuances of when that applies can be found in 'man 5 postconf' in the
local_header_rewrite_clients and append_at_myorigin sections. It also is
used in some map lookup protocols to detect when to look up bare
username parts of qualified addresses.

--
Bill Cole
[hidden email] or [hidden email]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)