Dan,

> -----Original Message-----
> From: [email protected] <[email protected]> On
> Behalf Of Dan Mahoney (Gushi)
> Sent: Monday, September 21, 2020 10:29 AM
> To: [email protected]
> Subject: Custom reject message for one address?
> 
> Hey there all,
> 
> At the dayjob, we're getting enough spam to webmaster@ that we've decided to
> reroute it to a different address.
> 
> We'd like to have the bounce messgge let people know about this address.
> We don't want to send them another message, but we'd like their bounce message
> to give them a clue -- IF they read it.
> 
> So something like REJECT "Sorry this address has been overrun, please email
> [email protected]"
> 
> If I just delete the address, I get "user unknown in virtual alias table".
> If I try putting the reject in my virtual alias, this seems not to be parsed 
> at that
> point in the process.
> 
> How can one do this?

If my understandings are collect, steps below should do the trick.

1. Create a mapping file like below
  /etc/postfix/custom_reject:
        [email protected]   REJECT   Sorry this address has been overrun, 
please email [email protected]

2. sudo postmap /etc/postfix/custom_reject

3. Edit the main.cf like below.
  smtpd_recipient_restrictions:
        check_recipient_access hash:/etc/postfix/custom_reject

4. reload postfix


Kouga


> 
> -Dan
> 
> --
> 
> --------Dan Mahoney--------
> Techie,  Sysadmin,  WebGeek
> Gushi on efnet/undernet IRC
> FB:  fb.com/DanielMahoneyIV
> LI:   linkedin.com/in/gushi
> Site:  http://www.gushi.org
> ---------------------------

Reply via email to