Hi, I would like to setup an autoresponder for an entire domain. I've tried with a catch all but only messages specifically sent to the catch all mailbox receive an auto-response, other catch all mail does not receive an auto-response. Should this be done in a script in the main.cf file? Any advice would be appreciated.
Here a few pages with examples of sieve scripts: http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples http://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)#Example
Hmmm, pondering further on it, I think sieve isn't probably the way to go... it would be simple for all incoming mail.... but not just for one domain.
Dovecot has an option for a global sieve file: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration It might work if you would add an autoresponer in that file wrapped into an if statement that filters the domain name.
actually, I think it's easy. Add always_bcc to the postfix main.cf That will cause that of every email passing through the server a copy will be sent to the specified address. Aftwares for that email addres, make a custom filter like: Code: ### BEGINN CUSTOM FILTERS if anyof (header :regex ["Delivered-To"] [".*domain.tld"], header :regex ["To"] [".*domain.tld"] ){ vacation :days 1 :addresses ["[email protected]"] "add your autoresponder text"; } # Delete email from the bcc account discard; ### END CUSTOM FILTERS
the one issue I see is when the recipient for domain.tld is in bcc... then it probably won't work. Any maybe also add a regex for CC field
Wow, that always_bcc seems to be a dangerous feature, is it possible to use always_bcc for a single domain?
First off, thanks for all your input. I setup a catchall address, and then I installed avelsieve with dovecot-managesieved but it only auto-responds if email is sent directly to the catchall address. any other address that is redirected to the catch-all does not trigger the auto-responder. This is what I did so far: Installed avelsieve from here: http://code.uoa.gr/p/avelsieve/download.php (added source, then installed ubuntu package) Followed this howto to get filters setup in squirrelmail: https://github.com/cmjnisse/sogo-ispconfig/wiki/Use-manage-sieve-protocol and then fixed the imapflags error with this article: http://comments.gmane.org/gmane.mail.squirrelmail.plugins/16444 I haven't tried the always_bcc option in main.cf, I'd like to see if that can be done to one domain only, ISPconfig server is hosting multiple domains. Thanks,