[Dovecot] recipient_delimiter deux

LuKreme kremels at kreme.com
Wed Oct 23 18:56:05 EEST 2013


OK, I've been banging my head on why my procmail setup for virtual users is no longer working (difficult to test, since enabling it breaks live user's mail). There are only a few virtual users who have any sort of filters in place anyway (the heavy procmail users are local, not virtual), and they are fairly simple, so I think I can recreate them with sieve.

I think I have everything I need for sieve to work, but now what?

The first thing I want to do is have sieve process recipient_delimiter into a separate mailbox (creating it, if needed). Googling just for example sieve scripts comes up empty (well, directing to the dovecot wiki which at least on the links that come up, does not have sample scripts).

so, foo+bar at example.com will go into foo's mailstore in the folder .bar/new/

On 27 Sep 2013, at 00:24 , Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote:
> Dovecot LDA uses the "-m" option and only lda_mailbox_autocreate and lda_mailbox_autosubscribe, no need for recipient_delimiter to override the default mailbox.

Which I still don't understand.

recipient_delimiter = + is the default, so I shouldn't need to set it in my confs, I just need to setup a sieve recipe (is that what it is called? script?) that will process these messages, right? What would that look like?

I have to setup the SQL users so that LMTP or LDA is used for deliver, but I want that to apply only to the sql users. Something like this, maybe?

userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  default_fields = uid=vpopmail gid=vchkpw mail_location=/usr/local/virtual/%u mail=maildir:/usr/local/virtual/%u sieve=/var/sieve/%u.sieve protocol_lda=$mailplugins sieve
  driver = sql
}

I'm sure that protoco_lda isn't the right syntax though.

If I set sieve=/var/sieve/%u.sieve as above would users still be able to use sieve-manage to manage their own sieve files? And what MUAs support this?

If I left that out, do I put ~/.dovecot.sieve in with the other mailboxes and {cur,new,tmp} and the index files, or will there be issues? If I put a dovecot.sieve file there will it just be seen, processed, and work?

(SQL user's $HOME is their maildir)

$ doveconf -n
# 2.2.5: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 9.1-RELEASE i386
auth_mechanisms = PLAIN LOGIN
disable_plaintext_auth = no
first_valid_uid = 89
login_log_format_elements = user=<%u> %r %m %c
mail_location = maildir:~/Maildir
mail_max_userip_connections = 90
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  } 
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox NotJunk {
    auto = subscribe
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = imap sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  default_fields = uid=vpopmail gid=vchkpw mail_location=/usr/local/virtual/%u mail=maildir:/usr/local/virtual/%u
  driver = sql
}
-- 
'He's mad, isn't he?' 'No, mad's when you froth at the mouth,' said
Gaspode. ' He's insane. That's when you froth at the brain.'



More information about the dovecot mailing list