Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enh] Specify -a parameter on dovecot lda for Sieve #709



None yet
2 participants
Copy link

commented Apr 13, 2019

The problem

If you want to use Sieve filter with subaddress it doesn't work unless you change postfix lda configuration.


This change in /etc/postfix/ will fix the problem

-# Dovecot LDA
-dovecot    unix  -       n       n       -       -       pipe
-    flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -m ${extension}
+# Dovecot LDA
+dovecot    unix  -       n       n       -       -       pipe
+    flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -m ${extension} -a ${recipient}

PR Status

How to test

Update file /etc/postfix/ to mirrot this line

dovecot    unix  -       n       n       -       -       pipe
    flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -m ${extension} -a ${recipient}

Reload postfix

sudo postfix reload

Edit your sieve script to use subadress

require ["variables", "envelope", "fileinto", "subaddress"];

if envelope :is :user "to" "exploit" {
  if envelope :matches :detail "to" "*" {
    /* Save name in ${name} in all lowercase except for the first letter.
     * Joe, joe, jOe thus all become 'Joe'.
    set :lower "name" "${1}";

  if string :is "${name}" "" {
    /* Default case if no detail is specified */
    fileinto "INBOX";
  } else {
    /* For exploit+joe@ this will become exploit/joe */
    fileinto "exploit.${name}";

Now send an email

mail -s "Check subaddress"
To: exploit+log@<your domain>
Check mail in subfolder log !


  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 1/1 :
  • Deep review 0/1 :

@alexAubin alexAubin added this to the 3.6.x milestone Apr 16, 2019

Copy link

left a comment

Uh okay I have little knowledge about this but this looks like a small legit change


This comment has been minimized.

Copy link

commented Apr 22, 2019

Planning to merge in a few days

@alexAubin alexAubin merged commit 63de414 into YunoHost:stretch-unstable Apr 25, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.