Autoresponse 1.6.3 (bugfix) Released

Autoresponse 1.6.3 has been released. This is a bugfix release that 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 (…after the user authenticated with the server via SASL of course). This is no longer an issue thanks to this release.

40 thoughts on “Autoresponse 1.6.3 (bugfix) Released

  1. djordje says:

    I have the same question as Vladimir: are there any chances to move autoresponder from BEFORE amavis to AFTER amavis?

  2. musashi says:

    Sorry it’s taken me so long to respond to this; could you send me an e-mail ( regarding the problems you’re having? This way, I can address them when I get back to the office on Monday. Thanks!

  3. vladimir says:

    So, the question is: are there any chances to move autoresponder from BEFORE amavis to AFTER amavis?
    In addition it could give some pros: it will be not “triggered” for spam mails.

  4. vladimir says:

    Thank you for this excellent autoresponder.
    But I’ve got a problem with it: when I’m trying to use it with amavis and postfix I could not pass XFORWARD to amavis. This XFORWARD is necessary for policy banks using (e.g. MYNETS or MYUSER policy banks – I’m trying to avoid spam checks for outgoing mails).
    Have you any thoughts how to do this with autoresponder?

  5. Sam says:

    >autoresponse receives the message 5x and re-sends the >mail to the original recipient which then gets >forwarded again to 5 different boxes.


    I started having the same problem after using it for about a month with no problems. Nothing that I could find had been changed but now all aliases with 2 or more email addresses get delivered multiple times. A restore of backup when it WAS working to a test machine yields the same result. What gives?


  6. p-thor says:

    I found i small issue

    De version is not correctly set in de autorseponse script

    #|autoresponse 1.6.3 - an autoresponder script for postfix|
    #| Charles Hamilton - |
    #| This program is GNU/GPL software |

    shopt -s -o nounset
    shopt -s extglob

    if [ "${#}" -eq "0" ]; then
    printf "%s\n" "Autoresponse v. 1.6.2"
    printf "%s\n" "Type -h for help"

    Is there an easy way to set your script up for several mailservers?

  7. Ka-3 says:


    I’ve got a little problem with autoresponse. I’m using autoresponse with postfix and IMSS (Trend Micro Stuff).
    I’am using also sender_bcc_maps to backup the sent e-mails. The issue is that when I activate the autoresponder in and when I try to send e-mail to more than 1 recipient I’ve got two mails in may backup sender account. If there is only one recipient everything is OK. Is there a solution for this problem? I mean that when I send one mail to multiple recipient, I would like to get only one mail in my backup account. I suppose that this problem is connected with that autoresponce can work on only one recipient at once therefore the ‘autoresponder_destination_recipient_limit = 1′ is set.

    Sorry for my English. I would be grateful for any help.

  8. Reto says:


    I try to use your script on FreeBSD – first I had to change the path to “bash” (/usr/local/bin/bash on FreeBSD) and modify “chmod” so that it looks like chmod autoresponse:autoresponse … (colon not dot on FreeBSD).

    Now if I want to add a new responder, I get the following error after exiting “vi”:

    sed: 1: “/var/spool/autoresponse …”: bad flag in substitute command: ‘o’

    Any idea? Maybe “sed” has another syntax on FreeBSD?


  9. Emerson says:

    Great Script, but i can’t do this work.

    If i send an email to, i receive this error message in my email client:
    “Recipient address rejected: User unknown in local recipient table”.

    I try to add manually in linux terminal.
    autoresponse -e
    I checked /var/spool/autoresponse/responses and the file is here! ok. But… if a try to send a message to this account, the autoresponse don’t work and the message delivery normal…

    RHEL 5
    Postfix + Amavis + Cyrus-IMAP + OpenLDAP (all users are here)


  10. Finn says:

    Thanks Jonas for sharing your approach. I’ve been using it for a while now and I think I ran into a little issue. I’ve been using the original_recipient as musashi describes in a situation where virtual_alias_maps maps one address to multiple real mailboxes ( goes to all 5 crew members). When running a crew@ mail through autoresponse it is delivered to each crew members mailbox 5 times. This is because the autoresponse receives the message 5x and re-sends the mail to the original recipient which then gets forwarded again to 5 different boxes.
    Would it be an idea to use both “recipient” and “original recipient” inside the script in order to determine how to treat the request? The checked mail could then be sent to the recipient while you use original recipient for the autoresponse actions.

  11. Peter says:

    Hi guys
    how it is with the other charset, like iso-8859-2 ?
    When I type the answer with national characters of this encoding, the response is in different charset.
    problem is that in the autoresponse file it is already misinterpreted
    do you have anн idea
    thank you

  12. Peter says:

    I’m sorry, it;s olved
    I din;t notice the command “postconf -e ‘autoresponder_destination_recipient_limit = 1′”
    My mistake
    Thansk for the great tool

  13. musashi says:

    Peter, this isn’t a bug in autoresponse, you just left out a very important part of the configuration. Click here and scroll down until you see the line:

    postconf -e 'autoresponder_destination_recipient_limit = 1'

    The explanation can be found under item [c] in the ‘Additional Notes’ section (at the bottom) of the page.

    Thanks for using autoresponse!

  14. Peter says:


    It seems that i’ve found the BUG in the latest version
    When i send the email to multiple recipients, autoresponse will hand over only one recipient and therefore maildrop deliver mail to only one recipient:

    So when you send the emails to,, from the Outlook, the message will be delivered only to

    Jan 21 14:56:23 mail postfix/pipe[22026]: 8071D13C008: to=, relay=autoresponder, delay=1, status=sent (dummy)
    Jan 21 14:56:23 mail postfix/pipe[22026]: 8071D13C008: to=, relay=autoresponder, delay=1, status=sent (dumm
    Jan 21 14:56:23 mail postfix/pipe[22026]: 8071D13C008: to=, relay=autoresponder, delay=1, status=sent (dummy
    When i remove autoresponse from the , the message is delivered as usually to all recipients.

    Can you please check it ?

  15. musashi says:

    Amavis still works because of this line (162) in the script:

    exec ${SENDMAIL} -i -f "${SENDER}" "${RECIPIENT}"

    Basically, after the message has passed all the checks in place (pertinent to the autoresponse script), it “resends” (not literally, but sort of) the original message as if autoresponse never existed. Because autoresponse is the first ‘content filter’, the message gets passed to the next content filter in the pipeline. This might not be the best technical explanation, but I did find myself asking the same question during the development of the script and eventually, this is the answer that I found.

    Any time you add steps to a process it usually increases the time it takes to complete — with regard to performance, there is a small performance hit because every incoming message must be checked to see if the recipient has an autoresponse message configured. However, I’ve installed autoresponse in many different scenarios from the simplest <5 user mail server to an environment of over 50+ users with an extremely heavy mail load (both incoming and outgoing) and I've never noticed any performance issues whatsoever (but this also depends on the server's hardware). Still, I would like to find a better way of accomplishing this task but as of now, development of autoresponse has been postponed due to my current work load.

  16. musashi says:

    It should work with virtual domains just fine; in fact, that’s the exact environment in which I developed this script. Then again, it also depends on how you’ve configured virtual domains (hint: I use mysql to keep track of usernames/passwords/addresses/domains/etc.) You must also use SASL for authentication — currently this is the only way to ensure that only authorized users are able to set/unset autoresponse messages via the ‘user+autoresponse@domain.tld’ convention. The problem with the current version is that it assumes that the username used for authentication is the same as the user portion of the e-mail address. This will change (eventually). The reason it’s like that is because when the script was originally written, it was written for a very specific configuration; future versions will address this limitation. With regard to other characters like ä, ü, and ö, I haven’t tested this yet because further development has been postponed due to my work load at my ‘day’ job :-/

    I hope to resume development soon. Thanks for using autoresponse!

  17. spud says:

    Just found Autoresponse, and it was quick and easy to set up, so thanks!

    I’ve been modifying some Postfix settings today, and I have a quick question about the line in used to enable Autoresponse on the smtp service line. I added the

    -o content_filter=autoresponder:dummy

    line, but after reading about the configuration of, I noticed that the “-o content_filter” part will “override the named configuration parameter.” (from

    Since I’m using Amavis for spam and virus checking, my has

    content_filter = amavis:[]:10024

    in it. Does that mean that the autoresponder:dummy line will override the content_filter parameter that calls Amavis? (And if not, why not?)

    It does seem that Amavis is still at work (according to lines in mail.log), but I’m just curious how it still calls Amavis even with the override.

    On a related note, is there any performance hit to keeping the autoresponse line in, even if I’m not using any responders?

  18. no such says:


    thanks for your script! i have two questions:

    how can i make it work with postfix style virtual domains. the autoresponder only seems to work for the domain listed in “mydomain”, not for the other domains listed in “mydestination”. how can i create autoresponses for the virtual domains?

    how can i make the autoresponse accept characters like ä, ü, ö?

    mandriva 2007

  19. Finn says:


    Thanks for the nice script! One question though, shouldn’t you also add the filter (-o content_filter=autoresponder:dummy) to the smtps line when using SASL?

  20. musashi says:

    Currently there is no way to do this other than modifying the script. I will be incorporating this feature into later versions (I promise). :-)

    Thanks for using autoresponse!

  21. Michael Laccetti says:

    Is there any way to have the subject line set dynamically? While I can go in and hack the script (and might already have done so), that seems like a bit of a brute force method for doing so.

  22. musashi says:

    Actually, that makes sense. As long as the user’s “from” portion matches the “user+” part of the message, _and_ the user authenticates with a valid account (via SASL) then you can set an autoresponse for a user’s alias. Sorry I didn’t think of this before :-)

  23. 3apa3a says:

    Thanks for answer. Ups, this trick cant work for me, but in may case if I want to make autoresponse to ALIAS – it’s work ! :) I can write message to j.doe+autoresponse@domain.tld from my e-mail client and Your program make file for that alias. It’s strange enought for me, cause users donno their real login names :) Thank You :)

  24. musashi says:

    Hello, and thanks for using autoresponse! It’s true that autoresponse does assume that the sender address is the same as the sasl_username when a user is trying to configure an autoresponse message. This is something that I plan on addressing in later versions.

    The easiest way for you to accomplish what you are trying to do is to modify the the The following line specifically:

    flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${original_recipient} -S ${sasl_username} -C ${client_address}

    Change ${sender} to ${sasl_username} in the above line, and this will accomplish what you are trying to do. The users will have to set their autoresponse message by sending e-mail to the actual e-mail account (not the alias). Using the example you explained, if J.Doe@domain.tld wanted to set his autoresponse, he would send a message to johndoe+autoresponse@domain.tld.

    Let me know if this solves your problem!

  25. 3apa3a says:

    Hello. Thank You fo that script. I have one problem with it. All users use Outlook Express as e-mail client. And in account settings, in E-mail address field they have NOT login name, but ALIAS. So, if user is John Doe, than he have E-mail address: J.Doe@domain.tld and Account name: johndoe@domain.tld
    Autoresponder works only if e-mail address and account name are the same :( Is it possible to resolve this problem ? I cant change users e-mail addresses on client side :(

    Thanks in advance

  26. fabio says:

    I sent to your mail…

    Oct 12 16:07:27 firewall postfix/smtpd[10327]: NOQUEUE: reject: RCPT
    from[201.3.108.xx]: 550
    5.1.1 : Recipient address rejected:
    User unknown in virtual mailbox table;
    to= proto=ESMTP

  27. fabio says:


    i’ve problem to set autoresponse by E-mail. My log show this:
    User unknown in virtual mailbox table… I use mysql auth.

    Any idea? ***In command line is working very well.

  28. silent254 says:

    Hi Charles,

    Thanks for this great tool.

    If I want to cc myself the auto-response, how would I do that?

    I can tinker with the code, I just want to know what to do (my knowledge of mail protocols is not as extensive as yours).


  29. musashi says:

    Yes, paste the output of the following commands:

    ls -l /var/spool/autoresponse/responses


    cat /var/log/mail.log | grep autoresponder


    cat /etc/postfix/ | grep -b1 autore


    cat /etc/postfix/ | grep autoresponder

    This should be enough to get us started. Thanks for using autoresponse!

  30. JQ says:

    I have just setup 1.6.3. Autoresponse. It seems to work, but just that the response email was blank even though the file exists and was enabled for the specified user.

    Any advice on how to troubleshoot?

  31. musashi says:


    Thanks for your input. This is not so much a function of the script as it is the manner in which the script is called. For example, the script is only using the arguments passed to it (configured in the file). My instructions say that the following lines should appear in the

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

    However, to apply your advice, all one would have to do is modify:

    -r ${recipient}


    -r ${original_recipient}

  32. Jonas says:


    it might be usefull to use ORIGINAL_RECIPIENT instead of RECIPIENT in your script. This is for example needed when you use alias_maps. Otherwise your script will not work. (For example if you have and forward it to via postfix your script will not work unless you use ORIGINAL_RECIPIENT.)

Comments are closed.