Re: Primary Domains vs. Virtual Domains - what's the difference?

2019-11-18 Thread Charles Collicutt
On 18 Nov 2019, at 16:24, gil...@poolp.org wrote:
> 
> November 18, 2019 4:14 PM, "Charles Collicutt"  
> wrote:
>> Can virtual users be used with sub-addresses, e.g user+...@virtualdomain.org 
>> ?
>> 
>> When I tried that (some time ago) it failed saying that the user did not 
>> exist.
> 
> It has worked for years so without more information I can't help with why it 
> failed

I just tried with a fresh OpenSMTPD setup and it worked fine. I don’t know why 
it didn’t before. It was a few years ago that I last tried. Sorry for the noise 
- and thank you for OpenSMTPD!

— 
Charles 



Re: Primary Domains vs. Virtual Domains - what's the difference?

2019-11-18 Thread gilles
November 18, 2019 4:14 PM, "Charles Collicutt"  wrote:

> On 18 Nov 2019, at 13:07, gil...@poolp.org wrote:
> 
>> With a virtual domain, OpenSMTPD assumes that domain.org == the content of 
>> the virtual table.
>> The virtual mechanism is not optional, the recipient MUST exist in the table 
>> to be valid.
> 
> Can virtual users be used with sub-addresses, e.g user+...@virtualdomain.org ?
> 
> When I tried that (some time ago) it failed saying that the user did not 
> exist.
> 

It has worked for years so without more information I can't help with why it 
failed

Gilles



Re: Primary Domains vs. Virtual Domains - what's the difference?

2019-11-18 Thread Edgar Pettijohn

On Nov 18, 2019 9:14 AM, Charles Collicutt  wrote:
>
> On 18 Nov 2019, at 13:07, gil...@poolp.org wrote:
> > 
> > With a virtual domain, OpenSMTPD assumes that domain.org == the content of 
> > the virtual table.
> > The virtual mechanism is not optional, the recipient MUST exist in the 
> > table to be valid.
>
> Can virtual users be used with sub-addresses, e.g user+...@virtualdomain.org ?
>

They should work out of the box. Just sent one to myself to double check and it 
went through.

Edgar

> When I tried that (some time ago) it failed saying that the user did not 
> exist.
>
> — 
> Charles
>


Re: Primary Domains vs. Virtual Domains - what's the difference?

2019-11-18 Thread Charles Collicutt
On 18 Nov 2019, at 13:07, gil...@poolp.org wrote:
> 
> With a virtual domain, OpenSMTPD assumes that domain.org == the content of 
> the virtual table.
> The virtual mechanism is not optional, the recipient MUST exist in the table 
> to be valid.

Can virtual users be used with sub-addresses, e.g user+...@virtualdomain.org ?

When I tried that (some time ago) it failed saying that the user did not exist.

— 
Charles



Re: Primary Domains vs. Virtual Domains - what's the difference?

2019-11-18 Thread gilles
November 17, 2019 5:19 PM, "Implausibility"  wrote:

> I'm reading the man pages for makemap, and there are two types of database 
> maps described, as per
> $subject.
> 
> What are the functional / operational differences between Primary & Virtual 
> Domains? When when I
> choose one over the other? Can I get examples of when I'd choose a table of 
> primary domains, and
> when I'd choose a table of virtual domains?
> 
> Which one should I choose if I want to send *and* receive mail from domains 
> that are not the same
> as my mail server's name? (e.g... my business has many websites... 
> example.com, example.us,
> example.io - and I'd like to send and receive mail for each of them 
> separately... say, to route the
> eMail to the sales rep for a specific territory)
> 
> Thanks.


I'll try to summarise it as simple as possible:

During the SMTP transaction, an e-mail address is provided for the recipient:

u...@domain.org

With a primary domain, OpenSMTPD assumes that domain.org == the local machine.
It will look for a system account matching the user and if one is found, then 
mail is delivered.
The aliases mechanism is optional, if an alias exists a transform happens, 
otherwise the username is looked up as is.

With a virtual domain, OpenSMTPD assumes that domain.org == the content of the 
virtual table.
The virtual mechanism is not optional, the recipient MUST exist in the table to 
be valid.


If you use a primary domain, when you create a new system user you can mail 
them right away.
If you use a virtual domain, you'll have to declare that user in the table.