Two different domains, two different configs, same machine
Hi, Up until now I've been using Postfix for one domain, evidently with just one configuration, using the virtual domains approach. Now I'm in a situation where I need to handle another completely different domain, with a different behavior and a different Postfix configuration, on the same server. My question is: Should I use the Multi Instance approach (http://www.postfix.org/MULTI_INSTANCE_README.html) in this case? I'm asking because I'd need to use the same server public IP for both instances, and I don't know whether Postfix would create two different processes (one per each instance), which would mean I need at least a different port (and I even found several examples where each configuration has its own IP address), or if both configurations are handled by the same process. If the Multi Instance approach is not suitable for this scenario, would someone recommend another way to face it? Thanks, Nicolás
Re: Two different domains, two different configs, same machine
On 3/5/2015 1:27 PM, Nicolás wrote: > Hi, > > Up until now I've been using Postfix for one domain, evidently with > just one configuration, using the virtual domains approach. Now I'm > in a situation where I need to handle another completely different > domain, with a different behavior and a different Postfix > configuration, on the same server. My question is: Should I use the > Multi Instance approach > (http://www.postfix.org/MULTI_INSTANCE_README.html) in this case? > > I'm asking because I'd need to use the same server public IP for > both instances, and I don't know whether Postfix would create two > different processes (one per each instance), which would mean I need > at least a different port (and I even found several examples where > each configuration has its own IP address), or if both > configurations are handled by the same process. > > If the Multi Instance approach is not suitable for this scenario, > would someone recommend another way to face it? > > Thanks, > > Nicolás If you only have one public IP, you are limited to one postfix instance. Postfix can natively handle multiple virtual domains, each with its own recipient list. The details of "different behavior" determine if this is even doable. Some postfix settings are configurable per recipient domain, others are not. Hosting another domain may be as easy as adding another domain to virtual_mailbox_domains and adding the recipients to virtual_mailbox_maps. -- Noel Jones
Re: Two different domains, two different configs, same machine
El 05/03/2015 a las 22:30, Noel Jones escribió: On 3/5/2015 1:27 PM, Nicolás wrote: Hi, Up until now I've been using Postfix for one domain, evidently with just one configuration, using the virtual domains approach. Now I'm in a situation where I need to handle another completely different domain, with a different behavior and a different Postfix configuration, on the same server. My question is: Should I use the Multi Instance approach (http://www.postfix.org/MULTI_INSTANCE_README.html) in this case? I'm asking because I'd need to use the same server public IP for both instances, and I don't know whether Postfix would create two different processes (one per each instance), which would mean I need at least a different port (and I even found several examples where each configuration has its own IP address), or if both configurations are handled by the same process. If the Multi Instance approach is not suitable for this scenario, would someone recommend another way to face it? Thanks, Nicolás If you only have one public IP, you are limited to one postfix instance. Postfix can natively handle multiple virtual domains, each with its own recipient list. The details of "different behavior" determine if this is even doable. Some postfix settings are configurable per recipient domain, others are not. Actually, on second though, the "different" part just implies that one of the domains should run a check_policy_service in its smtpd_(sender|recipient)_restrictions, and the other one would not. I don't believe this is configurable per domain, but I can make the service return 'DUNNO' if the evaluation corresponds to the domain that doesn't need to, as a workaround. Hosting another domain may be as easy as adding another domain to virtual_mailbox_domains and adding the recipients to virtual_mailbox_maps. Yes, that's exactly how it's configured now, so I guess I'll follow the same schema as I'm limited with one public IP address. Thank you! Regards, Nicolás -- Noel Jones
Re: Two different domains, two different configs, same machine
On 3/5/2015 4:51 PM, Nicolás wrote: > > Actually, on second though, the "different" part just implies that > one of the domains should run a check_policy_service in its > smtpd_(sender|recipient)_restrictions, and the other one would not. Postfix can do this per-domain. General instructions here: http://www.postfix.org/RESTRICTION_CLASS_README.html > I can make the > service return 'DUNNO' if the evaluation corresponds to the domain > that doesn't need to, as a workaround. That would work too. -- Noel Jones
Re: Two different domains, two different configs, same machine
El 05/03/2015 a las 23:03, Noel Jones escribió: On 3/5/2015 4:51 PM, Nicolás wrote: Actually, on second though, the "different" part just implies that one of the domains should run a check_policy_service in its smtpd_(sender|recipient)_restrictions, and the other one would not. Postfix can do this per-domain. General instructions here: http://www.postfix.org/RESTRICTION_CLASS_README.html Nice! I will try that way, thanks so much. Regards, Nicolás