Nefaria.com

Autoresponse 1.6.3 (bugfix) Released

by musashi on Jun.12, 2009, under Autoresponse, I.T.

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.

:,

29 Comments for this entry

  • Peter

    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
    pet

  • Peter

    Hi

    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 1@a.com,2@a.com,3@a.com from the Outlook, the message will be delivered only to 1@a.com

    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
    y)
    Jan 21 14:56:23 mail postfix/pipe[22026]: 8071D13C008: to=, relay=autoresponder, delay=1, status=sent (dummy
    )
    When i remove autoresponse from the master.cf , the message is delivered as usually to all recipients.

    Can you please check it ?
    Thanks

    • musashi

      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!

    • Peter

      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

  • spud

    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 master.cf 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 master.cf, I noticed that the “-o content_filter” part will “override the named main.cf configuration parameter.” (from http://www.postfix.org/master.5.html)

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

    content_filter = amavis:[127.0.0.1]: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?

    • musashi

      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.

  • no such

    hello,

    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 ä, ü, ö?

    system:
    postfix-2.3.3-4
    mandriva 2007

    • musashi

      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!

  • Finn

    Hi,

    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?

  • Michael Laccetti

    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.

    • musashi

      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!

  • 3apa3a

    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

    • musashi

      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 master.cf. 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!

      • 3apa3a

        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 :)

        • musashi

          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 :-)

  • fabio

    musashi

    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.

    • musashi

      Can you paste the log entries here?

      • fabio

        I sent to your mail…

        Oct 12 16:07:27 firewall postfix/smtpd[10327]: NOQUEUE: reject: RCPT
        from 201-3-108-xx.ctame700.dsl.brasiltelecom.net.br[201.3.108.xx]: 550
        5.1.1 : Recipient address rejected:
        User unknown in virtual mailbox table;
        from=
        to= proto=ESMTP
        helo=

  • silent254

    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).

    Thanks

  • JQ

    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?

    • musashi

      Yes, paste the output of the following commands:

      ls -l /var/spool/autoresponse/responses

      and:

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

      and:

      cat /etc/postfix/master.cf | grep -b1 autore

      and:

      cat /etc/postfix/main.cf | grep autoresponder

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

  • Jonas

    Hello,

    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 user@domain.xyz and forward it to user@domain.abc via postfix your script will not work unless you use ORIGINAL_RECIPIENT.)

    • musashi

      Jonas,

      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 master.cf file). My instructions say that the following lines should appear in the master.cf:


      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}

      To:

      -r ${original_recipient}

    • Finn

      Hi,
      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 (crew@example.com 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.
      @musashi
      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.

  • For@ll

    Hi,

    I ask is any chance set that a autoresponse if a sender e-mail looks like: no-reply@foo.com, promotion@foo.com, majordomo@foo.com, autoresponse not send notification.

  • For@ll

    Hi,

    I would like to ask whether it is using the opportunity autorespose not to send an e-mail notifications when the sender is a no-reply@foo.com orpromotion@foo.com

  • seb

    Hi,

    thanks for the nice script, funky bash code.

    I would love to see a variation that is using the postfix transport + subdomain setup instead of piping all messages.

    http://unwin.org/postfix/vda-autoresponder.html

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...