View Single Post
  #10  
Old 7th January 2013, 23:54
jrklein jrklein is offline
Junior Member
 
Join Date: Dec 2012
Location: US
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Catchall + Forward, ISPconfig 3 + Dovecot + Sieve

We also required a catchall + remote forward solution for Dovecot/Sieve on ISPconfig 3. I found that these steps work perfectly.

1. Create a new mailbox for the domain (e.g.: catchall@domain.org).
2. Create a catchall for the domain that points to new mailbox.
3. Edit mailbox and go to the "Custom Rules" tab. Enter these two rules:

redirect "destination@example.org";
stop;

If I use these rules, an email sent to "anything@domain.org" is redirected to "destination@example.org" and discarded. No messages are saved in the catchall mailbox! You MUST include the "stop;" line or Sieve will NOT discard the message after forwarding.

Suppose your catchall mailbox is "catchall@domain.org". Login to the mail server that hosts the mailbox and type the following to view the entire Sieve filter for this mailbox.

cat /var/vmail/domain.org/catchall/.sieve

Contents of the Sieve filter file are as follows.

require ["fileinto", "regex", "date", "relational", "vacation"];
redirect "destination@example.org";
stop;

keep;

Notice the "keep;" line added by ISPconfig 3 at the end of the file? If you do not specify "stop;" to terminate the Sieve script, Dovecot will execute the "keep;" command and place a copy of the message in your catchall mailbox.
Reply With Quote