1

Topic: Autorespond for all incoming mails/catchall/domain alias

==== Required information ====
- iRedMail version: iRedAdmin-Pro 1.5.1/iRedMail 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MYSQL
- Linux/BSD distribution name and version: CENTOS 6.3
- Related log if you're reporting an issue:
====

Hello people,

do not ask why, but I need an autoresponder for a catch-all address.

I have two domains:
domain2.com is a domain alias of domain1.com
There are a info@domain1.com account configured to a catch-all incoming mails.

Now, on any mail that goes to one of the two domains it should be answered automatically with a standard text.
How can I do this best?

Thanks in advance!

2

Re: Autorespond for all incoming mails/catchall/domain alias

Try this:

- Add mail user "info@domain1.com" (of course you should add it first)
- Login to Roundcube webmail as info@domain1.com, then create a filter (Settings -> Filters) for "all messages" with action "Reply with message", set "How often send messages (in days):" to 1.

That's all. let me know whether it works for you or not.

3

Re: Autorespond for all incoming mails/catchall/domain alias

Hi Zhang,

hmm, i try to access Settings -> Filters from Roundcube and it returns the error:

SERVICE CURRENTLY NOT AVAILABLE!
Error No. [501]

Something is not working well.
Please Help!

4

Re: Autorespond for all incoming mails/catchall/domain alias

Please check your config file /var/www/roundcubemail/plugins/managesieve/config.inc.php, make sure you have correct managesieve server address and port. If it still not work, please turn on debug mode in Dovecot and see what it complains.

5

Re: Autorespond for all incoming mails/catchall/domain alias

Hi,

the file /var/www/roundcubemail/plugins/managesieve/config.inc.php contains this:
$rcmail_config['managesieve_port'] = 4190;
$rcmail_config['managesieve_host'] = "127.0.0.1";
$rcmail_config['managesieve_auth_type'] = null;
$rcmail_config['managesieve_auth_cid'] = null;
$rcmail_config['managesieve_auth_pw'] = null;
$rcmail_config['managesieve_usetls'] = false;
$rcmail_config['managesieve_default'] = "/var/www/roundcubemail/config/dovecot.sieve";
$rcmail_config['managesieve_script_name'] = 'managesieve';
$rcmail_config['managesieve_mbox_encoding'] = 'UTF-8';
$rcmail_config['managesieve_replace_delimiter'] = '';
$rcmail_config['managesieve_disabled_extensions'] = array();
$rcmail_config['managesieve_debug'] = false;
$rcmail_config['managesieve_kolab_master'] = false;
$rcmail_config['managesieve_filename_extension'] = '.sieve';
$rcmail_config['managesieve_filename_exceptions'] = array();

With a telnet 127.0.0.1 4190 i get a response from dovecot :
telnet 127.0.0.1 4190
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
"IMPLEMENTATION" "Dovecot Pigeonhole"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave"
"NOTIFY" "mailto"
"SASL" "PLAIN LOGIN"
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot ready."
^]
telnet> q

I have enabled mail_debug in /etc/dovecot/dovecot.conf and found this in the logfiles:
dovecot.log
Feb 07 15:58:28 managesieve-login: Info: Login: user=<info@domain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=394, secured
Feb 07 15:58:28 managesieve(info@domain.com): Debug: Effective uid=501, gid=501, home=/imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15/
Feb 07 15:58:28 managesieve(info@domain.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir://imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//Maildir/:INDEX=//imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//Maildir/
Feb 07 15:58:28 managesieve(info@domain.com): Debug: maildir++: root=//imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//Maildir, index=, control=, inbox=//imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//Maildir, alt=
Feb 07 15:58:28 managesieve(info@domain.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/Shared/%u
Feb 07 15:58:28 managesieve(info@domain.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox=, alt=
Feb 07 15:58:28 managesieve(info@domain.com): Debug: sieve-storage: using active sieve script path: //imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//sieve/dovecot.sieve
Feb 07 15:58:28 managesieve(info@domain.com): Debug: sieve-storage: using sieve script storage directory: //imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//sieve
Feb 07 15:58:28 managesieve(info@domain.com): Debug: sieve-storage: using permissions from //imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//sieve: mode=0700 gid=-1
Feb 07 15:58:28 managesieve(info@domain.com): Debug: sieve-storage: relative path to sieve storage in active link:
Feb 07 15:58:28 managesieve(info@domain.com): Info: Disconnected: Logged out bytes=44/411



sieve.log
Feb 07 16:02:09 lda(info@domain.com): Debug: sieve: using sieve path for user's script: //imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//sieve/dovecot.sieve
Feb 07 16:02:09 lda(info@domain.com): Debug: sieve: opening script //imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//sieve/dovecot.sieve
Feb 07 16:02:09 lda(info@domain.com): Debug: sieve: script //imap/vmail1/domain.com/i/n/f/info-2013.02.05.08.13.15//sieve/dovecot.sieve successfully compiled

I cant see any error in the logfiles. You?

Thank you
Hannes

6

Re: Autorespond for all incoming mails/catchall/domain alias

No error at all.

Well, i have no idea why it occurred. sad Could you please try again?

7

Re: Autorespond for all incoming mails/catchall/domain alias

Hi,

i have found two problems:

1) in the /var/www/roundcubemail/plugins/managesieve/config.inc.php file i have changed the parameter
from
$rcmail_config['managesieve_auth_type'] = "none"
to
$rcmail_config['managesieve_auth_type'] ="PLAIN"

2) in apache error log i found a "cannot find diretory" /var/www/roundcubemail/plugins/managesieve/skins/default
There was no directory default in there only a directory larry and a directory classic.
cp -r larry default

Now sieve in roundcubemail works! Yea!
Back to the initial problem.

8

Re: Autorespond for all incoming mails/catchall/domain alias

Hi Zhang,

there is no email response. In sieve.log this error occurs

Feb 07 16:35:56 lda(info@domain.com): Info: sieve: msgid=<CAPufTkaf+AufAYHH1GwQZFeGS8wvpHVO6UsoLFKPPXMyzEeQ@mail.gmail.com>: discarding vacation response for implicitly delivered message; no known (envelope) recipient address found in message headers (recipient=<info@domain.com>, and no additional `:addresses' are specified)
Feb 07 16:35:56 lda(info@domain.com): Info: sieve: msgid=<CAPufTkaf+AufAYHH1GwQZFeGS8wvpHVO6UsoLFKPPXMyzEeQ@mail.gmail.com>: stored mail into mailbox 'INBOX'

Any idea?

Maybe Sieve is not the right program to do this?
In another forums i found threads advise against to make an autoresponder on a catchall addresse. Any SPAM leads to that domain generates useless mails. Some say that it comes quickly to get blacklisted. What do you think about?

Thx
Hannes