Autoresponse is no longer supported

Autoresponse is no longer supported

Sorry everyone! I’m officially ending the autoresponse project. I simply haven’t had the spare time to develop this software further… it had a decent run and thanks to everyone who actually used it in production, your feedback was instrumental in helping make it stable and usable. –musashiXXX 3 December 2012

Autoresponse is an autoresponder for the Postfix MTA.The autoresponse script is called by postfix pipe(8) in the same way that one would call a content filter. As a side note, it is possible to do some minor content filtering with this script however that would require, at the least, intermediate level (or greater) knowledge of bash and some minor hacking of the autoresponse script–this will not be covered here.

Click here to download the latest version (1.6.3).


To install and configure, execute the following actions as root:

useradd -d /var/spool/autoresponse -s `which nologin` autoresponse
mkdir -p /var/spool/autoresponse/log /var/spool/autoresponse/responses
cp ./autoresponse /usr/local/sbin/
chown -R autoresponse.autoresponse /var/spool/autoresponse
chmod -R 0770 /var/spool/autoresponse

Then, edit /etc/postfix/ and look for the following line:

smtp      inet  n       -       n       -       -       smtpd<

And add the following line, directly below it (make sure this line begins with at least one whitespace character):

    -o content_filter=autoresponder:dummy

Add the following two lines (make sure the second one begins with whitespace) somewhere near the bottom of the file under the section “# Other external delivery methods.”

<pre>autoresponder unix - n n - - pipe
     flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${recipient} -S ${sasl_username} -C ${client_address}

Before we go any further, you need to know that there is a difference between ${original_recipient} and ${recipient}. The former expands to the complete recipient address before any address rewriting or aliasing; the latter expands to the complete recipient address after rewriting/aliasing. Some users say that the ${original_recipient} works great for them, and others swear by using ${recipient}. When in doubt, use ${recipient}. For more information, see the manpage pipe(8).

Save and quit, then, run the following command:

postconf -e 'autoresponder_destination_recipient_limit = 1'

Restart postfix:

/etc/init.d/postfix restart

Additional Notes:

[a] These steps are specific to Fedora and Ubuntu however they will probably work on other distros as well.

[b] If you want local users to be able to create their own auto responses (from the shell), you must put them in the ‘autoresponse’ group, see the manpage group(5) for instructions on how to go about this.

If step #7 seems counterintuitive, then see pipe(8) for more details. In a nutshell, it ensures that a message sent to multiple [valid] recipients will be recieved by everyone in the recipient list, rather than ONLY the first recipient in the list. If you still do not understand, skip step #7 and try sending a message with multiple recipients in the “to”, “cc”, etc fields. Note that only the first recipient in the list will actually receive the message.

[d] For security reasons, SASL authentication is required in order to configure autoresponses via e-mail (You shouldn’t be using unauthenticated SMTP anyway). These instructions assume that SMTP authentication via SASL has already been installed and configured (correctly).

To create an autoresponse message for a user via e-mail:

Send an e-mail to “user+autoresponse@domain.tld” where ‘user’ is the user portion of the e-mail address for the user that you are setting the autoresponse message. The message must originate from “user@domain.tld” (for security reasons) otherwise an autoresponse will not be created. If you have a pre-existing autoresponse message, it will be deleted and the user will be notified via e-mail that the autoresponse message has been disabled. Think of it as a toggle switch. If you do not have a pre-existing autoresponse message, the message you send will now become your autoresponse. You’ll want to format the message exactly as you’d like for it to appear; WYSIWYG (What You Send Is What You Get).

To create an autoresponse message for a user via the shell:

Invoke the following command:

autoresponse -e user@domain.tld

Where ‘user@domain.tld’ is the e-mail address of the user who requires an autoresponse. Upon running this command, the vi editor will open; just type the user’s autoresponse, save and quit as you normally would with any text file. That’s all you have to do.

To disable an autoresponse message for a user:

autoresponse -d user@domain.tld

To enable an autoresponse message for a user:

autoresponse -E user@domain.tld

To delete an autoresponse message for a user:

autoresponse -D user@domain.tld

###UPDATE 6/12/2009 v. 1.6.3###
Fixed an issue with “case sensitive” e-mail addresses. Basically,
UsEr@domain.tld or USER@DOMAIN.TLD — both valid addresses, were not able
to set an autoresponse message for user@domain.tld.

###UPDATE 4/2/2009###
Autoresponse has a tutorial on HowToForge:

###UPDATE 3/19/2009 v. 1.6.2###
Fixed a minor bug that could potentially cause the message body of an autoresponse
to contain text that wasn’t intended.

###UPDATE 3/7/2009 v. 1.6.1###
SMTP authentication via SASL is now required in order to set autoresponses via e-mail!

###UPDATE 3/5/2009 v. 1.6.0###
Enabling autoresponses via e-mail finally stable!

###UPDATE 2/2/2009 v. 1.5.2###
Made a few efficiency-oriented modifications

###UPDATE 10/17/2008 v. 1.5.1###
Fixed an issue with the Return-Path header being set to the address of the autoresponse user rather than the address of the original sender of the message (thanks go to Richard Mulder for catching this).