On Wed, Mar 1, 2017 at 3:32 PM, Viktor Dukhovni <postfix-us...@dukhovni.org>
wrote:

>
> > On Mar 1, 2017, at 3:20 PM, Ian Evans <dheianev...@gmail.com> wrote:
> >
> > virtual_mailbox_base = /home/vmail
> > virtual_mailbox_domains = example.com
> > virtual_mailbox_limit = 0
> > virtual_mailbox_maps = hash:/etc/postfix/vmaps
> > virtual_transport = lmtp:unix:private/dovecot-lmtp
>
> The virtual_mailbox_maps table is NOT an aliasing mechanism.
> It serves precisely two purposes:
>
>    1. Used as a *validation* table for inbound mail to reject
>       invalid recipients.  Only the existence of the lookup key
>       (email address) matters, the associated value is ignored.
>
>    2. *IF* you're using the Postfix-provided virtual(8) delivery
>       agent, then *that* agent uses the associated value as the
>       location of the mailbox in the filesystem.
>
> With "dovecot-lmtp", the second purpose does not apply, and mapping
> email addresses to mailboxes is up to dovecot.
>
> You can of course use virtual_alias_maps to map multiple equivalent
> addresses to a single address known to dovecot for delivery to the
> associated mailbox.
>
> --
>         Viktor.
>
> Okay...lack of caffeine and hospital distraction is probably not the best
time to be doing this,

Created /etc/virtual with:

example.com          this-text-is-ignored
ianev...@example.com ianevans
webmas...@example.com        ianevans

postconf -e virtual_alias_maps=hash:/etc/postfix/virtual

postmap /etc/postfix/virtual

service postfix reload

Sent an email to myself:

Mar  1 16:05:56 carson postfix/smtpd[24513]: connect from
localhost[127.0.0.1]
Mar  1 16:05:56 carson postfix/smtpd[24513]: 0FD87201FEC:
client=localhost[127.0.0.1]
Mar  1 16:05:56 carson postfix/cleanup[24506]: 0FD87201FEC:
message-id=<CABiY0=
ikvkqxrc0oqe7hk1szisy-kgk36aq+rz6xj-8i3lq...@mail.gmail.com>
Mar  1 16:05:56 carson postfix/qmgr[24498]: 0FD87201FEC: from=<
dheianev...@gmail.com>, size=3734, nrcpt=1 (queue active)
Mar  1 16:05:56 carson amavis[22912]: (22912-04) FWD from <
dheianev...@gmail.com> -> <ianev...@example.com>,BODY=7BIT 250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0FD87201FEC
Mar  1 16:05:56 carson postfix/smtpd[24513]: disconnect from
localhost[127.0.0.1]
Mar  1 16:05:56 carson amavis[22912]: (22912-04) Passed CLEAN
{RelayedInbound}, [74.125.82.43]:38908 [74.125.82.43] <dheianev...@gmail.com>
-> <ianev...@example.com>, Queue-ID: 48163201F9F, Message-ID: <CABiY0=
ikvkqxrc0oqe7hk1szisy-kgk36aq+rz6xj-8i3lq...@mail.gmail.com>, mail_id:
x4zkW8Bv6wBB, Hits: -2.019, size: 2816, queued_as: 0FD87201FEC,
dkim_sd=20161025:gmail.com, 2611 ms
Mar  1 16:05:56 carson postfix/smtp[24507]: 48163201F9F: to=<
ianev...@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.3,
delays=0.72/0.01/0.01/2.6, dsn=2.0.0, status=sent (250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0FD87201FEC)
Mar  1 16:05:56 carson postfix/qmgr[24498]: 48163201F9F: removed
Mar  1 16:05:56 carson postfix/error[24514]: 0FD87201FEC: to=<
ianev...@example.com>, relay=none, delay=0.03, delays=0.01/0.01/0/0.01,
dsn=5.1.1, status=bounced (User unknown in virtual alias table)
Mar  1 16:05:56 carson postfix/cleanup[24506]: 179D7201F9F: message-id=<
20170301210556.179d7201...@carson.example.com>

Okay, so I've obviously misunderstood what I need to place in the
/etc/virtual file

Do I need the ianev...@example.com ianevans

or just the webmas...@example.com ianevans

Sorry if I'm just being really thick.

Reply via email to