Thomas Nyberg:
> Hello,
> 
> Let's say that I do have a user "user" on my system, but I would like 
> for emails sent to "user+doesnotex...@domain.org" to bounce back the 
> "Undelivered mail" message with something like:
> 
> <user+doesnotex...@domain.org>: unknown user: "user+doesnotexist"
> 
> How would I do this? I naively tried adding
> 
> user+doesnotexist: doesnoteixst
> 
> to my /etc/aliases file, but it was still delivered to my user account.

/etc/aliases is used only for mail handled by the local(8)
delivery agent.

Alternative: use a transport map; that works for all domains.

/etc/postfix/main.cf
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    user+doesnotex...@example.com  error:5.1.1 User does not receive mail.

Requires "postmap hash:/etc/postfix/transport".

        Wietse

Reply via email to