On Fri, Aug 28, 2020 at 03:42:20AM +0000, Dominic Lai wrote:
> Aug 28 10:11:36 postfix-server postfix/local[3915542]: 2D8F33028D88:
> to=<[email protected]>, relay=local,
> delay=0.06, delays=0.05/0/0/0.01, dsn=5.4.6, status=bounced (mail
> forwarding loop for [email protected])
>
> When I look at dovecot log (I have got mail_log plugins on), and
> I note that postfix bounced this message even before handling it
> to dovecot-lda (ie. dovecot-lda does not even record any handling of
> this transaction).
>
> However, if I changed the .forward as follows:
>
> username@localhost, "|/usr/bin/vacation username"
>
> Then vacation works, username can also receive a copy of email.
This likely because $myorigin is not listed in $mydestination,
and so just a bare "username" in aliases(5) or .forward files
is not a reference to an address in "local" address class.
You either need to ensure that $myorigin is listed in
$mydestination, or else to use explicit local domains
in .forward files and aliases(5) files as you noted.
--
Viktor.