mj:
> Anyone..?
> 
> On 01/30/2018 02:55 PM, lists wrote:
> > Hi,
> > 
> > The question can perhaps be made more generic like this:
> > 
> > Can postfix generate a *specific* NDR (or an autoreply) for accounts 
> > that meet a specific criterium, such as:
> > - user account was found under OU=to-delete,CN=company...
> > contrary to the regular location CN=Users,CN=company...

You can configure user-dependent responses with the error mailer.

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

/etc/pos1fix/transport:
    us...@example.com  error:5.1.1 Mailbox is closed. Yadda yadda yadda.
    us...@example.com  error:5.1.1 Some other text

The 5.x.x codes are defined in RFC 3463. If you don't specify one,
Postfix will use 5.0.0.

The SMTP server will reject the recipients, so that Postfix does
not have to send an NDR. For mail not received via SMTP, Postfix
generates a bounce message when it attempts to deliver mail.

If you have many users, you may want to use database instead of a
text editor. With a database you can make the queries as complex
as you need, and distinguish between OU=to-delete and other cases.

/etc/postfix/main.cf:
    transport_maps = proxy:database:/config/file

        Wietse

> > We would like to move to-be-deleted users to this container, before 
> > actually deleting them. That gives us an easy way to revert, if the 
> > deletion turns out to be erroneous.
> > 
> > If postfix could send a "delivery failure" specific for those accounts 
> > (with instructions who to contact to revert the situation) it would be 
> > very easy: only move the user to the specific OU, and have the system do 
> > the rest.
> > 
> > Can this be done?
> > 
> > (postfix 2.11.1 from debian wheezy, yes we know we should upgrade, and 
> > we also will, but it runs rock solid...)
> > 
> > MJ
> 

Reply via email to