Dovecot and recipient_delimiter

Edwardo Garcia wdgarc88 at gmail.com
Tue Apr 14 13:28:53 UTC 2015


On 4/14/15, J. Echter <j.echter at echter-kuechen-elektro.de> wrote:
> Am 14.04.2015 um 14:04 schrieb J. Echter:
>> Hi,
>>
>> we're using thunderbird as our client, it has the functionality to
>> sort spamassassin tagged mails in a folder called 'Junk'.
>>
>> I have this folder on my dovecot server and i'd like to use the
>> recipient_delimiter feature to get my spam/junk mails directly to this
>> folder.
>>
>> what i have done yet:
>>
>> dovecot.conf:
>>
>> plugin {
>>   recipient_delimiter = +
>> }
>>
>> postfix: master.cf
>>
>> dovecot   unix  -       n       n       -       -       pipe
>>    flags=DRhu user=vmail:vmail null_sender=
>> argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
>> -e -m ${extension}
>>
>> postfix: main.cf
>>
>> recipient_delimiter = +
>>
>>
>> what i get:
>>
>> Apr 14 13:46:50 mule postfix/pickup[22664]: 71ED53C05EE: uid=0
>> from=<testuser at testdomain.test>
>> Apr 14 13:46:50 mule postfix/cleanup[1408]: 71ED53C05EE:
>> message-id=<552cfe2a.tR3wZK7y16RgA548%testuser at testdomain.test>
>> Apr 14 13:46:50 mule postfix/qmgr[12559]: 71ED53C05EE:
>> from=<testuser at testdomain.test>, size=465, nrcpt=2 (queue active)
>> Apr 14 13:46:50 mule dovecot: lda(testuser at testdomain.test):
>> msgid=<552cfe2a.tR3wZK7y16RgA548%testuser at testdomain.test>: save
>> failed to junk: Mailbox doesn't exist: junk
>> Apr 14 13:46:50 mule dovecot: lda(testuser at testdomain.test):
>> msgid=<552cfe2a.tR3wZK7y16RgA548%testuser at testdomain.test>: saved mail
>> to INBOX
>> Apr 14 13:46:50 mule postfix/pipe[10898]: 71ED53C05EE:
>> to=<testuser+Junk at testdomain.test>, relay=dovecot, delay=0.04,
>> delays=0.02/0/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot
>> service)
>> Apr 14 13:46:50 mule postfix/qmgr[12559]: 71ED53C05EE: removed
>>
>> here is my complete dovecot -n output:
>>
>>  dovecot -n
>> # 2.0.9: /etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.32-504.12.2.el6.x86_64 x86_64 CentOS release 6.6
>> (Final) ext4
>> auth_cache_negative_ttl = 0
>> auth_cache_size = 50 M
>> auth_verbose = yes
>> base_dir = /var/run/dovecot/
>> imap_id_log = *
>> imap_id_send = *
>> log_timestamp = "%Y-%m-%d %H:%M:%S "
>> login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e
>> %c %k
>> mail_gid = 5000
>> mail_home = /DATEN/vmail/%d/%n
>> mail_location = maildir:/DATEN/vmail/%d/%n/mail/
>> mail_plugins = " zlib"
>> mail_uid = 5000
>> 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
>> passdb {
>>   args = /etc/dovecot/dovecot-ldap.conf
>>   driver = ldap
>> }
>> plugin {
>>   autocreate = Junk
>>   autosubscribe = Junk
>>   recipient_delimiter = +
>>   sieve = /DATEN/vmail/%d/%n/.dovecot.sieve
>>   sieve_dir = /DATEN/vmail/%d/%n/sieve
>>   zlib_save = gz
>>   zlib_save_level = 6
>> }
>> protocols = sieve imap
>> service auth {
>>   unix_listener /var/spool/postfix/private/auth {
>>     group = postfix
>>     mode = 0660
>>     user = postfix
>>   }
>>   unix_listener auth-userdb {
>>     group = vmail
>>     mode = 0660
>>     user = vmail
>>   }
>>   user = root
>> }
>> service imap-login {
>>   chroot = login
>>   executable = /usr/libexec/dovecot/imap-login
>>   inet_listener imap {
>>     port = 0
>>   }
>>   process_min_avail = 4
>>   user = dovecot
>> }
>> service imap {
>>   executable = /usr/libexec/dovecot/imap
>> }
>> service managesieve-login {
>>   chroot = login
>>   user = dovecot
>> }
>> service pop3-login {
>>   chroot = login
>>   user = dovecot
>> }
>> ssl = required
>> ssl_cert = </shared/config/dovecot/certs/dovecot.pem
>> ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL:!EXPORT
>> ssl_key = </shared/config/dovecot/private/dovecot.pem
>> userdb {
>>   args = /etc/dovecot/dovecot-ldap.conf
>>   driver = ldap
>> }
>> valid_chroot_dirs = /var/spool/vmail
>> protocol lda {
>>   mail_plugins = sieve
>>   postmaster_address = postmaster
>> }
>>
>> any hints on what i do wrong here?
>>
>> thanks
>>
>> juergen
>
> as always i asked my question and figured it out, i only had to change
>
> dovecot   unix  -       n       n       -       -       pipe
>     flags=DRhu user=vmail:vmail null_sender=
> argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -e
> -m ${extension}
>
> to
>
> dovecot   unix  -       n       n       -       -       pipe
>     flags=DR user=vmail:vmail null_sender=
> argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -e
> -m ${extension}
>

Should not need to alter flags, eg:
dovecot   unix  -       n       n       -       -       pipe
   flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda
-f ${sender} -e -d ${user}@${nexthop}

works perfectly good.


More information about the dovecot mailing list