Hi, Here is the solution we use. For this situation we have on our postfix SMTP servers local accounts that handle this. Once the issue is over you can simple delete the user account on the server.
The accounts .forward file contains | ~/bin/mail_respond I run these commands RAN useradd -m <insert username> RAN su - <insert username> RAN mkdir bin RAN mkdir conf RAN mkdir log RAN mkdir mailbox Then i have files i insert /home/<insert username>/bin/mail_respond /home/<insert username>/conf/reply.msg I also have mapping setup to send emails to u...@mydomain.com to user@localhost The script mail_respond logs each time an email was forwarded and all details about it. Here is basics of it from pulling out comments: #!/usr/bin/python #----------------------------------------------------------------------- # About #----------------------------------------------------------------------- # # Tell sender that their intendend recipient, <insert username>, is no # longer at the University. # # The reply DOES NOT include the original subject. # # The Email response template is stored in REPLY below. #----------------------------------------------------------------------- # Imports #----------------------------------------------------------------------- #----------------------------------------------------------------------- # Config #----------------------------------------------------------------------- # Get home directory for this user # Directories for storage, logging and configuration #----------------------------------------------------------------------- # Function #----------------------------------------------------------------------- # Log message # Extract the sender's email address from the first line of the raw email text: # it looks like this "From EMAIL-ADDR # Convert mail header time format to user readable # First, parse input string for time zone # Cannot parse input time string, so just return it unchanged # Adjust for time zone # Parse remaining time string # Return reformatted time #----------------------------------------------------------------------- # Main #----------------------------------------------------------------------- # Make sure needed files and directory exist # Read incoming mail # Parse incoming email # Get reply address -Angelo Fazzina Operating Systems Programmer / Analyst University of Connecticut, UITS, SSG, Server Systems 860-486-9075 -----Original Message----- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of @lbutlr Sent: Monday, January 16, 2017 7:49 AM To: Postfix users <postfix-users@postfix.org> Subject: Autoresponder? I have an email account that belonged to someone who died recently. Rather than simply shutdown the account and bounce all future emails, the family would like some sort of automated messages for at least a few months saying something like “<Name> died in November, 2016. Please redirect emails to <another address>”. I think this is a bad idea and they should just keep checking the current address of another month or six, but I did say I’d ask. So, how would I do this with only sending a single ‘bounce’ to any email address? I have gone through an unsubscribed from all the legitimate mailing lists like amazon and such. Thankfully, there is not a lot of spam on this account. I feel I’m missing something obvious. -- Apple broke AppleScripting signatures in Mail.app, so no random signatures.