Dovecot,seive and postfix master.cf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dovecot,seive and postfix master.cf

Ian Evans
Background: Have a postfix/dovecot/amavisd-new system that has been running smoothly for several years. Just a handful of virtual users, ie:
/home/vmail/example.com/ianevans/Maildir

As we are starting to use multiple devices finally, decided to move away from pop3/imap to all imap.

sieve plugin has been configured. All that's left is to have postfix use dovecot lda. Just wanted to make sure that this is all I need to do on the postfix end in master.cf:

dovecot   unix  –       n       n       –       –       pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}

Any other config info I should post here to make sure that the dovecot line will not step on any config toes.

Many thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Dovecot,seive and postfix master.cf

Ian Evans
On Wed, Feb 22, 2017 at 4:21 PM, Ian Evans <[hidden email]> wrote:
Background: Have a postfix/dovecot/amavisd-new system that has been running smoothly for several years. Just a handful of virtual users, ie:
/home/vmail/example.com/ianevans/Maildir

As we are starting to use multiple devices finally, decided to move away from pop3/imap to all imap.

sieve plugin has been configured. All that's left is to have postfix use dovecot lda. Just wanted to make sure that this is all I need to do on the postfix end in master.cf:

dovecot   unix  –       n       n       –       –       pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}

Any other config info I should post here to make sure that the dovecot line will not step on any config toes.

Many thanks.

And forgot to say: As well as run these two commands:

postconf -e virtual_transport=dovecot
postconf -e dovecot_destination_recipient_limit=1
Reply | Threaded
Open this post in threaded view
|

Re: Dovecot,seive and postfix master.cf

btb-2
In reply to this post by Ian Evans
On Feb 22, 2017, at 16.21, Ian Evans <[hidden email]> wrote:

>
> Background: Have a postfix/dovecot/amavisd-new system that has been running smoothly for several years. Just a handful of virtual users, ie:
> /home/vmail/example.com/ianevans/Maildir
>
> As we are starting to use multiple devices finally, decided to move away from pop3/imap to all imap.
>
> sieve plugin has been configured. All that's left is to have postfix use dovecot lda. Just wanted to make sure that this is all I need to do on the postfix end in master.cf:
>
> dovecot   unix  –       n       n       –       –       pipe
> flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}
>
> Any other config info I should post here to make sure that the dovecot line will not step on any config toes.

i would relay to dovecot via lmtp(8), rather than via pipe(8).  additionally, personally, i prefer to use the relay address class for arrangements like this, rather than the virtual address class.  lastly, you reference amavis, so i'll mention that, in basic setups [which most are] i'd also suggest relaying from postfix to amavis, via lmtp, and then from amavis to dovecot, also via lmtp, rather than going back through postfix first, which is often how it's been done, traditionally.

imo, this simplifies the configuration, and simplifies the flow, conceptually.  some might point out a caveat regarding constraints on alias expansion or the like when not passing mail back to postfix, which is true, but imo, doing alias expansion in front of the content filter is the desirable of the two anyway, outside of the exception here or there, like anything else.
Reply | Threaded
Open this post in threaded view
|

Re: Dovecot,seive and postfix master.cf

chaouche yacine
If this helps, here's my config :


in main.cf :

virtual_transport = lmtp:unix:private/dovecot-lmtp


I didn't touch anything in master.cf (I let the default lmtp as Ian mentionned).


master.cf :

lmtp      unix  -       -       -       -       -       lmtp






in dovecot's 10-master.cf :
# This is for dovecot-postfix conversation
service lmtp {  
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}


# I don't remember what's this for but apparently I needed it

unix_listener /var/spool/postfix/private/auth {
mode = 0666
}



That's about it I think.

-- Yassine.


On Thursday, February 23, 2017 12:46 AM, "[hidden email]" <[hidden email]> wrote:



On Feb 22, 2017, at 16.21, Ian Evans <[hidden email]> wrote:

>
> Background: Have a postfix/dovecot/amavisd-new system that has been running smoothly for several years. Just a handful of virtual users, ie:
> /home/vmail/example.com/ianevans/Maildir
>
> As we are starting to use multiple devices finally, decided to move away from pop3/imap to all imap.
>
> sieve plugin has been configured. All that's left is to have postfix use dovecot lda. Just wanted to make sure that this is all I need to do on the postfix end in master.cf:
>
> dovecot   unix  –       n       n       –       –       pipe
> flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}
>
> Any other config info I should post here to make sure that the dovecot line will not step on any config toes.

i would relay to dovecot via lmtp(8), rather than via pipe(8).  additionally, personally, i prefer to use the relay address class for arrangements like this, rather than the virtual address class.  lastly, you reference amavis, so i'll mention that, in basic setups [which most are] i'd also suggest relaying from postfix to amavis, via lmtp, and then from amavis to dovecot, also via lmtp, rather than going back through postfix first, which is often how it's been done, traditionally.

imo, this simplifies the configuration, and simplifies the flow, conceptually.  some might point out a caveat regarding constraints on alias expansion or the like when not passing mail back to postfix, which is true, but imo, doing alias expansion in front of the content filter is the desirable of the two anyway, outside of the exception here or there, like anything else.
Reply | Threaded
Open this post in threaded view
|

Re: Dovecot,seive and postfix master.cf

Ian Evans
In reply to this post by btb-2


On Feb 22, 2017 6:46 PM, <[hidden email]> wrote:
On Feb 22, 2017, at 16.21, Ian Evans <[hidden email]> wrote:
>
> Background: Have a postfix/dovecot/amavisd-new system that has been running smoothly for several years. Just a handful of virtual users, ie:
> /home/vmail/example.com/ianevans/Maildir
>
> As we are starting to use multiple devices finally, decided to move away from pop3/imap to all imap.
>
> sieve plugin has been configured. All that's left is to have postfix use dovecot lda. Just wanted to make sure that this is all I need to do on the postfix end in master.cf:
>
> dovecot   unix  –       n       n       –       –       pipe
> flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}
>
> Any other config info I should post here to make sure that the dovecot line will not step on any config toes.

i would relay to dovecot via lmtp(8), rather than via pipe(8).  additionally, personally, i prefer to use the relay address class for arrangements like this, rather than the virtual address class.  lastly, you reference amavis, so i'll mention that, in basic setups [which most are] i'd also suggest relaying from postfix to amavis, via lmtp, and then from amavis to dovecot, also via lmtp, rather than going back through postfix first, which is often how it's been done, traditionally.

imo, this simplifies the configuration, and simplifies the flow, conceptually.  some might point out a caveat regarding constraints on alias expansion or the like when not passing mail back to postfix, which is true, but imo, doing alias expansion in front of the content filter is the desirable of the two anyway, outside of the exception here or there, like anything else.

Thanks. I'll take a look at your workflow suggestions.