In my setup the mail folders are owned by a system user per domain (eg sam:sam for @sam.com) with permissions 750 which I would like to keep this way. To redirect spam to the Junk folder, it is often recommended to use the

spamassassin unix -      n       n       -       -       pipe
    flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e
    /usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}

line in master.cf (with dovecot-sieve etc.), but this will run as vmail:vmail and is unable to deliver mail in the mailboxes.

  1. Can the user=vmail:vmail be set dynamically from the virtual user table in MySQL (which contains the system user name per domain)?
  2. Or can I use a different delivery binary that runs as root for example? LMTP?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.