The last thing one knows in constructing a work is what to put first. — Blaise Pascal
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.
Hi,
I have the same question as Vladimir: are there any chances to move autoresponder from BEFORE amavis to AFTER amavis?
Just FYI: email sent with detailed problem description.
Sorry it’s taken me so long to respond to this; could you send me an e-mail (musashi@nefaria.com) regarding the problems you’re having? This way, I can address them when I get back to the office on Monday. Thanks!
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.
Hi!
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?
>autoresponse receives the message 5x and re-sends the >mail to the original recipient which then gets >forwarded again to 5 different boxes.
@musashi
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?
Sam
I found i small issue
De version is not correctly set in de autorseponse script
#!/bin/bash
#+--------------------------------------------------------+
#|autoresponse 1.6.3 - an autoresponder script for postfix|
#| Charles Hamilton - musashi@nefaria.com |
#| 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?
Hello,
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 master.cf 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.
Hi
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?
Regards,
Reto
Great Script, but i can’t do this work.
If i send an email to user+autoresponse@mydomain.com, 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 user@mydomain.com
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)
thnks
Ensure that you have the following line in main.cf:
recipient_delimiter = +
Otherwise, trying to set up an autoresponse using foo+autoresponse@domain.tld fails.
B.
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.
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
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
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!
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
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.
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!
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?
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
I’m not sure that one has anything to do with the other.
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?
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!
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.
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
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
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!
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
Is it possible to resolve this problem ? I cant change users e-mail addresses on client side
Autoresponder works only if e-mail address and account name are the same
Thanks in advance
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=
Can you paste the log entries here?
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.
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
Yes, paste the output of the following commands:
ls -l /var/spool/autoresponse/responsesand:
cat /var/log/mail.log | grep autoresponderand:
cat /etc/postfix/master.cf | grep -b1 autoreand:
cat /etc/postfix/main.cf | grep autoresponderThis should be enough to get us started. Thanks for using autoresponse!
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?
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}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.)
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.
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
No problem! I’m glad you took a look at it.
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