Loading ...
Sorry, an error occurred while loading the content.

290180Re: delivering mail to separate users

Expand Messages
  • Simon Brereton
    Dec 20 10:39 AM
      On 20 December 2012 12:44, Viktor Dukhovni <postfix-users@...> 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 newuser@... $maps
      >
      > After setting "maps" to the exact list tables you configured.
      >
      > $ postmap -fq newuser@... \
      > mysql:/etc/postfix/Mail-Alias.cf \
      > hash:/etc/postfix/virtual_user_aliases
      >
      > You almost certainly have an entry for "newuser@..."
      > 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(director@...):
      msgid=<20121220131743.Horde.1YqSdFyZnp9Q01ZHFAB0eeA@...>:
      postmaster@...: saved mail to INBOX
      Dec 20 18:17:49 mail postfix/pipe[31973]: 777B5DC6001:
      to=<director@...>, 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(newuser@...):
      msgid=<20121220131743.Horde.1YqSdFyZnp9Q01ZHFAB0eeA@...>:
      postmaster@...: saved mail to INBOX
      Dec 20 18:17:49 mail postfix/pipe[31974]: 777B5DC6001:
      to=<newuser@...>, 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(director@...):
      msgid=<20121220131743.Horde.1YqSdFyZnp9Q01ZHFAB0eeA@...>:
      postmaster@...: saved mail to INBOX
      Dec 20 18:17:49 mail postfix/pipe[31976]: 777B5DC6001:
      to=<director@...>, orig_to=<newuser@...>,
      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 newuser@... $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
    • Show all 14 messages in this topic