On 18/03/14 14:12, Noel Jones wrote:
On 3/18/2014 5:14 AM, Alan Chandler wrote:

But in this case, I think it is the only way for me to illustrate my
frustration with this problem.  Why is there no lookup of
virtual_mailbox_maps to notice that the recipient is to be routed to
a virtual mailbox.
Postfix behaves as documented.  For an address to be delivered to a
virtual mailbox, the domain must be listed in
virtual_mailbox_domains, and the user must be listed in
virtual_mailbox_maps.

Verbose logging is unlikely to help.

Things that might help are:
- use postmap -q to test your lookup tables.
- use postconf to verify your main.cf settings.
- relevant docs:
http://www.postfix.org/postconf.5.html#virtual_mailbox_domains
http://www.postfix.org/ADDRESS_CLASS_README.html
http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox
http://www.postfix.org/DEBUG_README.html

If you have a small number of virtual domains, specify the domains
directly in main.cf:
# main.cf
virtual_mailbox_domains = example.com example.net

Otherwise, provide a dedicated virtual_mailbox_domains map.


Of course I can provide a dedicated virtual_mailbox_domains map - that is what I do in my working configuration at the moment. The reason for trying to avoid it is preparation for moving to SQL and wondering if I could avoid the extra query.

I have read all the docs referenced above several times, and what it says in there is that if I don't mention virtual_mailbox_domains it defaults to
$virtual_mailbox_maps - as mentioned here for instance

http://www.postfix.org/postconf.5.html#virtual_mailbox_domains

But to be absolutely clear about it, as you can see above from my postconf -n output, I explicitly make that reference. But even so, Postfix does not appear to be using this map.

So the reason I turned on verbose logging was to see what Postfix was actually doing - but it never even mentions it in the log. So as you say, turning on logging, in the end appeared unhelpful.

What I am becoming to realise - but which I can't find documented anywhere is that there is a subtle difference between a map of domains (as keys) and a map of e-mail addresses (as keys), and although the documentation tells you that virtual_mailbox_domains defaults to virtual_mailbox_maps, it actually can't because the former is a list of domains and the latter is a list of e-mail addresses, and it cannot extract the domains from the e-mail addresses.







--
Alan Chandler
http://www.chandlerfamily.org.uk

Reply via email to