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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmcnonhjniabbigo.png
Type: image/png
Size: 25956 bytes
Desc: not available
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20170517/956b4d70/attachment-0001.png>
Quoting James Nord <teilo at 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 7:12 PM, Rick Romero wrote:> My guess, for subfolders, is that you'd want to use a period delimiter. > | $DELIVER -m mailing-lists.jenkinsci-usersBingo! Thanks that did the trick. Now I have a verified working setup I can look at Sieve /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