On 20 December 2012 12:44, Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:
> On Thu, Dec 20, 2012 at 12:25:03PM -0500, Simon Brereton wrote:
>
>> >> I did postmap the virtual_alias_maps.  Is there something else I should I 
>> >> do?
>> >
>> > No, but you've likely misconfigured other elements of the system.
>>
>> I think this is ok.  Output is:
>> mail:/etc/postfix# postconf -h virtual_alias_maps
>> proxy:mysql:/etc/postfix/Mail-Alias.cf, 
>> hash:/etc/postfix/virtual_user_aliases
>
> So you have two tables mysql and a hash table.
>
>> >         $ postmap -fq newu...@example.com $maps
>
> After setting "maps" to the exact list tables you configured.
>
>         $ postmap -fq newu...@example.com \
>                 mysql:/etc/postfix/Mail-Alias.cf \
>                 hash:/etc/postfix/virtual_user_aliases
>
> You almost certainly have an entry for "newu...@example.com"
> in the mysql table that hides any data in the hash table. Perhaps
> you should list the hash table first, if you want it to take
> precedence over mysql.

With postfix it's always the simple solution.  I should have seen
that.  Reversing the order works now - and is in fact the more correct
approach.  Thanks!

Dec 20 18:17:49 mail dovecot: deliver(direc...@example.org):
msgid=<20121220131743.horde.1yqsdfyznp9q01zhfab0...@webmail.example.org>:
postmas...@example.org: saved mail to INBOX
Dec 20 18:17:49 mail postfix/pipe[31973]: 777B5DC6001:
to=<direc...@example.org>, relay=dovecot, delay=1, delays=1/0/0/0.01,
dsn=2.0.0, status=sent (delivered via dovecot service)
Dec 20 18:17:49 mail dovecot: deliver(newu...@example.org):
msgid=<20121220131743.horde.1yqsdfyznp9q01zhfab0...@webmail.example.org>:
postmas...@example.org: saved mail to INBOX
Dec 20 18:17:49 mail postfix/pipe[31974]: 777B5DC6001:
to=<newu...@example.org>, relay=dovecot, delay=1,
delays=1/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot
service)
Dec 20 18:17:49 mail dovecot: deliver(direc...@example.org):
msgid=<20121220131743.horde.1yqsdfyznp9q01zhfab0...@webmail.example.org>:
postmas...@example.org: saved mail to INBOX
Dec 20 18:17:49 mail postfix/pipe[31976]: 777B5DC6001:
to=<direc...@example.org>, orig_to=<newu...@example.org>,
relay=dovecot, delay=1, delays=1/0.01/0/0.01, dsn=2.0.0, status=sent
(delivered via dovecot service)
Dec 20 18:17:49 mail postfix/qmgr[31903]: 777B5DC6001: removed


>> >
>> >         To check that the result of the expansion of the user via
>> >         $virtual_alias_maps.
>>
>> Here I ran into problems.
>> mail:/etc/postfix# postmap -fq newu...@example.org $maps
>> postmap: fatal: usage: postmap [-Nfinoprsvw] [-c config_dir] [-d key]
>> [-q key] [map_type:]file...
>>  postfix/postmap[31144]: fatal: usage: postmap [-Nfinoprsvw] [-c
>> config_dir] [-d key] [-q key] [map_type:]file...
>
> I'm disappointed you could not then figure it out by reading the manpage,
> or parsing the "usage:" message.
>
>         postmap -q key map [optionally more maps]

That disappointment is hard to bear, but not unexpected sadly.  I've
had another look and I still don't get it.  Except that $maps can't be
expanded by the shell.  I feel sure there should be a way to check not
just a single file (as I did), but the actual entry from main.cf - but
I'm not able to find it.  Sorry.

Simon

Reply via email to