Nicolas JEAN:
> ### Tests without randmap ###
> 
> transport_maps = hash:/etc/postfix/local_transport_map
> 
> Having "my.domain :" or "my.domain lmtp:unix:private/dovecot-lmtp" 
> doesn't modify default behaviour (set by virtual_transport = 
> lmtp:unix:private/dovecot-lmtp), and yields such a log line:

>      to=<contact@my.domain>, relay=my.domain[private/dovecot-lmtp] ... 
> dsn=2.0.0, status=sent

Note that you would get the exact same email delivery result with
a map that does not match your domain.

How would you tell the difference between a map that returns ":"
for your domain and a map that does not match your domain?

Not by looking at the mailog file.

> But having "my.domain virtual:"; for instance, changes the log line to:
> 
>      to=<contact@my.domain>, relay=virtual ... dsn=2.0.0, status=sent
> 
> So the incoming email's domain /is/ matched against local_transport_map 
> and the transport described there is used.

This is a DIFFERENT map that matches your domain.

> ### Test with randmap ###
> 
> transport_maps = hash:/etc/postfix/local_transport_map 
> randmap:{smtp:[relay1.com]:587, smtp:[relay2.com]:587}
> 
> Adding randmap after local_transport_map (unchanged "my.domain :" line) 

We know based on the above test that THIS UNCHANGED MAP either
returns ":" for your domain or it does not match your domain.

And now we know the difference:

> results in all incoming email being relayed to one of the randmap relays.

Conclusion: the map does not match your local domain, and therefore
Postfix queries the next map, which is the randmap.

        Wietse

Reply via email to