Problem solved! Firstly, a correction to my original post. The file
`/etc/postfix/virtual_mailboxes` should have had an aditional line, as follows:

> == /etc/postfix/virtual_mailboxes ==
> al...@example.com     example.com/alice/
> b...@example.com       example.com/bob/
> catch...@example.com  example.com/catchall/   # Previously missing line

Now, the problem was solved by specifying the catch-all address not as an alias
in `/etc/postfix/virtual_aliases`, but instead as a mailbox in
`/etc/postfix/virtual_mailboxes`, as follows:

> == /etc/postfix/virtual_mailboxes ==
> al...@example.com     example.com/alice/
> b...@example.com       example.com/bob/
> # Catch-all mailbox belongs to user `catch...@example.com`
> @example.com          example.com/catchall/   # Adjusted this line

> == /etc/postfix/virtual_aliases ==
> postmas...@example.com  al...@example.com

That is, the superfluous aliases `al...@example.com al...@example.com` and
`b...@example.com b...@example.com` no longer need to be specified, and the
mailbox resides at `/var/mail/virtual/example.com/catchall`, which I require in
order for my POP3/IMAP server (Dovecot) to fetch a user's mail based on which
username they log in with. Thus, if a user logs in as `catch...@example.com`,
they can now see mail that has landed in the catch-all mailbox.

-- Jivan

Reply via email to