List of local mailboxes and other diagnostics

2016-11-29 Thread Stavros Tsolakos
Hi list.

Apologies for the dumb question.

Is there a way to ask postfix what local addresses it is aware of i.e
something like:

# my_list_tool

us...@domain.com
us...@domain.com
...

On the contrary, is there a way to display what will do when asked to
deliver to a specific recipient? For example:

# my_route_tool us...@domain.com

Relay to mx.domain.com

Thank you,

Stavros


Re: List of local mailboxes and other diagnostics

2016-11-29 Thread Wietse Venema
Stavros Tsolakos:
> Hi list.
> 
> Apologies for the dumb question.
> 
> Is there a way to ask postfix what local addresses it is aware of i.e
> something like:
> 
> # my_list_tool
> 
> us...@domain.com
> us...@domain.com
> ...

The Postfix query that looks user information does not support user
enumeration.

> On the contrary, is there a way to display what will do when asked to
> deliver to a specific recipient? For example:
> 
> # my_route_tool us...@domain.com
> 
> Relay to mx.domain.com

See http://www.postfix.org/ADDRESS_REWRITING_README.html#debugging
for "what-if" and for "what happened" analysis.

Wietse