per user procmail filtering and dovecot-lda
Hi all,
I recently migrated my system (postfix/Dovecot)from mbox to Maildir.
Almost everything is working (phone and thunderbird show all my mail and folders with mail)
However I am stuck on my .procmailrc rules
# cat /etc/procmailrc
SENDMAIL=/usr/sbin/sendmail
SENDMAILFLAGS=-oi
LOGFILE=/var/log/procmail.log
ORGMAIL=${HOME}/Maildir/
DEFAULT=${ORGMAIL}
MAILDIR=${HOME}/Maildir/
DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME"
# next line is to support user .procmailrc files
INCLUDERC=$HOME/.procmailrc
:0 w
| $DELIVER
# cat ~/.procmailrc
:0 w
* ^List-ID:.*jenkinsci-dev.googlegroups.com
| $DELIVER -m mailing-lists/jenkinsci-dev
:0 w
* ^List-ID:.*jenkinsci-users.googlegroups.com
| $DELIVER -m mailing-lists/jenkinsci-users
However dovecot-lda complains that the mailboxes "mailing-lists/jenkinsci-users", "mailing-lists/jenkinsci-dev" etc do not exist so delivers to the INBOX.
Everything I have read says that the mailbox specified by -m is the name as seen by the mail client, and this is what the client sees (see image).
I have tried changing the mailbox to INBOX/mailing-lists/... inbox/mailing-lists/... but the same still happens. So I am missing something somewhere and my google foo is unfortunately letting me down this time.
Is there someone that can help me?
(I'm not subscribed to the list so a CC to me would be appreciated)
Regards
/James
Quoting James Nord teilo@teilo.net:
Hi all,
I recently migrated my system (postfix/Dovecot)from mbox to Maildir.
Almost everything is working (phone and thunderbird show all my mail
and folders with mail)However I am stuck on my .procmailrc rules
:0 w * ^List-ID:.*jenkinsci-dev.googlegroups.com | $DELIVER -m mailing-lists/jenkinsci-dev
I have tried changing the mailbox to INBOX/mailing-lists/...
inbox/mailing-lists/... but the same still happens. So I am missing
something somewhere and my google foo is unfortunately letting me
down this time.
This is how I did it (qmail/vpopmail here).
At least I think that worked.. I've moved to LMTP, but I'm pretty
sure deliver to folder was working.
# Anything marked as Spam to user's Spam folder :0
- ^X-Spam-Status: Yes |/usr/lib/dovecot/deliver -d $EXT@$HOST -m Spam
My guess, for subfolders, is that you'd want to use a period delimiter. | $DELIVER -m mailing-lists.jenkinsci-users
Rick
So I'm confused as to why you're piping back from procmail to dovecot LDA, rather than having procmail be the final LDA.
Why not use:
:0 w
- ^List-ID:.*jenkinsci-dev.googlegroups.com mailing-lists/jenkinsci-dev/
(The trailing slash tells procmail that jenkinssci-dev is a maildir, not an mbox)
Also, procmail is way out of date, no longer maintained, and there are "semi" known vulnerabilities that haven't been fixed. See http://marc.info/?l=openbsd-ports&m=141634350915839&w=2 & the wikipedia page.
Adam
On Wed, May 17, 2017 at 06:10:13PM +0100, James Nord wrote: | Hi all, | | I recently migrated my system (postfix/Dovecot)from mbox to Maildir. | | Almost everything is working (phone and thunderbird show all my mail and | folders with mail) | | However I am stuck on my .procmailrc rules | | # cat /etc/procmailrc | SENDMAIL=/usr/sbin/sendmail | SENDMAILFLAGS=-oi | LOGFILE=/var/log/procmail.log | ORGMAIL=${HOME}/Maildir/ | DEFAULT=${ORGMAIL} | MAILDIR=${HOME}/Maildir/ | | DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME" | | # next line is to support user .procmailrc files | INCLUDERC=$HOME/.procmailrc | | :0 w | | $DELIVER | | | # cat ~/.procmailrc | | :0 w | * ^List-ID:.*jenkinsci-dev.googlegroups.com | | $DELIVER -m mailing-lists/jenkinsci-dev | | :0 w | * ^List-ID:.*jenkinsci-users.googlegroups.com | | $DELIVER -m mailing-lists/jenkinsci-users | | However dovecot-lda complains that the mailboxes | "mailing-lists/jenkinsci-users", "mailing-lists/jenkinsci-dev" etc do not | exist so delivers to the INBOX. | | Everything I have read says that the mailbox specified by -m is the name as | seen by the mail client, and this is what the client sees (see image). | | | I have tried changing the mailbox to INBOX/mailing-lists/... | inbox/mailing-lists/... but the same still happens. So I am missing | something somewhere and my google foo is unfortunately letting me down this | time. | | Is there someone that can help me? | | (I'm not subscribed to the list so a CC to me would be appreciated) | | Regards | | /James |
HI Adam,
Thanks for the pointers on procmail.
As for why not letting procmail be the LDA then this is if procmail is the final lda then dovecots database/index will not be updated from what I read meaning there will be some performance issues.
/James
On 5/17/2017 7:26 PM, Adam Shostack wrote:
So I'm confused as to why you're piping back from procmail to dovecot LDA, rather than having procmail be the final LDA.
Why not use:
:0 w
- ^List-ID:.*jenkinsci-dev.googlegroups.com mailing-lists/jenkinsci-dev/
(The trailing slash tells procmail that jenkinssci-dev is a maildir, not an mbox)
Also, procmail is way out of date, no longer maintained, and there are "semi" known vulnerabilities that haven't been fixed. See http://marc.info/?l=openbsd-ports&m=141634350915839&w=2 & the wikipedia page.
Adam
On Wed, May 17, 2017 at 06:10:13PM +0100, James Nord wrote: | Hi all, | | I recently migrated my system (postfix/Dovecot)from mbox to Maildir. | | Almost everything is working (phone and thunderbird show all my mail and | folders with mail) | | However I am stuck on my .procmailrc rules | | # cat /etc/procmailrc | SENDMAIL=/usr/sbin/sendmail | SENDMAILFLAGS=-oi | LOGFILE=/var/log/procmail.log | ORGMAIL=${HOME}/Maildir/ | DEFAULT=${ORGMAIL} | MAILDIR=${HOME}/Maildir/ | | DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME" | | # next line is to support user .procmailrc files | INCLUDERC=$HOME/.procmailrc | | :0 w | | $DELIVER | | | # cat ~/.procmailrc | | :0 w | * ^List-ID:.*jenkinsci-dev.googlegroups.com | | $DELIVER -m mailing-lists/jenkinsci-dev | | :0 w | * ^List-ID:.*jenkinsci-users.googlegroups.com | | $DELIVER -m mailing-lists/jenkinsci-users | | However dovecot-lda complains that the mailboxes | "mailing-lists/jenkinsci-users", "mailing-lists/jenkinsci-dev" etc do not | exist so delivers to the INBOX. | | Everything I have read says that the mailbox specified by -m is the name as | seen by the mail client, and this is what the client sees (see image). | | | I have tried changing the mailbox to INBOX/mailing-lists/... | inbox/mailing-lists/... but the same still happens. So I am missing | something somewhere and my google foo is unfortunately letting me down this | time. | | Is there someone that can help me? | | (I'm not subscribed to the list so a CC to me would be appreciated) | | Regards | | /James |
On 5/17/2017 11:26 AM, Adam Shostack wrote:
Also, procmail is way out of date, no longer maintained, and there are "semi" known vulnerabilities that haven't been fixed. See http://marc.info/?l=openbsd-ports&m=141634350915839&w=2 & the wikipedia page.
What alternatives exist for server-side filtering into folders? Is there anything as powerful?
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
On 5/18/17, 3:06 PM, "dovecot on behalf of Kenneth Porter"
On 5/17/2017 11:26 AM, Adam Shostack wrote:
> Also, procmail is way out of date, no longer maintained, and there are
> "semi" known vulnerabilities that haven't been fixed. See
> http://marc.info/?l=openbsd-ports&m=141634350915839&w=2 & the
> wikipedia page.
What alternatives exist for server-side filtering into folders? Is there
anything as powerful?
https://wiki2.dovecot.org/Pigeonhole
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: larryrtx@gmail.com US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281
Quoting Kenneth Porter shiva@sewingwitch.com:
On 5/17/2017 11:26 AM, Adam Shostack wrote:
Also, procmail is way out of date, no longer maintained, and there are "semi" known vulnerabilities that haven't been fixed. See http://marc.info/?l=openbsd-ports&m=141634350915839&w=2 & the wikipedia page.
What alternatives exist for server-side filtering into folders? Is
there anything as powerful?
Sieve works great. I currently do some header modification in
Procmail, then pipe to a LMTP script to deliver to Dovecot-LMTP and
then filter into the Spam folder via Sieve...
It cuts down on NFS writes on ZFS pools.
Rick
participants (5)
-
Adam Shostack
-
James Nord
-
Kenneth Porter
-
Larry Rosenman
-
Rick Romero