procmail: not sorting properly and cannot write to file
Running 14.2/x86_64 and using mbox mail storage format. On this new desktop procmail is no longer sorting some incoming messages to the proper folder despite having multiple recipes in ~/.procmailrc. And for some folders the log shows an error writing to it despite all files in ~/mail/ having 666 permissions.
Here's an example for one mail list and what the log shows: ~/.procmailrc [code] :0: * \[GRASS-user\] spatial-analyses :0: * ^List-Id:.*<grass-user\.lists\.osgeo\.org> spatial-analyses :0: * ^(From|Cc|To).*osgeo\.org spatial-analyses [\code] ~/procmail/log: [code] procmail: Match on "\[GRASS-user\]" procmail: Locking "spatial-analyses.lock" procmail: Assigning "LASTFOLDER=spatial-analyses" procmail: Opening "spatial-analyses" procmail: Acquiring kernel-lock procmail: Error while writing to "spatial-analyses" procmail: Truncated file to former size [\code] The file's permissions: -rw-rw-rw- 1 rshepard users 54142630 Nov 5 14:03 spatial-analyses As I don't know what other information to provide I'll wait for someone to ask for more. I want to resolve these issues as soon as possible Regards, Rich |
Quote:
If that's the case, take a look here to see what the problem is and what you can do BTW, change the spatial-analyses file attributes to just 600 (rw-------) for security reasons. Regards |
Quote:
Thank you very much. Best regards, Rich |
I changed mailbox_size_limit to about 9G and the permissions in ~/mail/ to 600. Then I stopped and restarted postfix-3.4.7-x86_64-1. But, all mail list messages are now being placed in spatial-analyses. Here are the recipes in ~/.procmailrc:
# Catch SPAM :0 * ^X-Spam-Flag: YES * ^X-Spam-Level: \*\*\*\*\*\* /dev/null ## Call SpamAssassin :0fw: spamassassin.lock * < 256000 | spamassassin ## Flagged as SPAM by spamassassin? :0 * ^X-Spam-Status: Yes /dev/null :0: * ^Subject: *****SPAM***** /dev/null :0: * ^(To|Cc).*twodogs.us personal :0: * ^TO_.*appl-ecosys.com $DEFAULT :0: * \[GRASS-user\] spatial-analyses :0: * ^List-Id:.*<grass-user\.lists\.osgeo\.org> spatial-analyses :0: * ^(From|Cc|To).*osgeo\.org spatial-analyses :0: * ^(From|Cc|To).*postgresql\.org database :0: * ^(From|Cc|To).*gnucash\.org accounting :0: * ^(From|Cc|To).*jpilot\.org pda-jpilot :0: * ^(From|Cc|To).*lists\.lyx\.org typesetting :0: * ^List-ID:.*<plug.*\.pdxlinux\.org> * ^(From|Cc|To).*pdxlinux\.org PLUG :0: * ^(From|Cc|To).*tug\.org typesetting :0: * ^List-Id:.*<python-list\.python\.org> programming :0: * \[sqlalchemy\] programming :0: * ^(From|Cc|To).*sqlite\.org database :0: * \[R\] stats :0: * ^(From|Cc|To).*r-project\.org stats :0: * \[R-sig-Geo\] stats :0: * \[Slackbuilds-users\] slackware :0: * ^(From|Cc|To).*slackbuilds\.org slackware :0: * \[slackware\] slackware :0: * ^(From|Cc|To).*mailman\.lug\.org\.uk slackware :0: * ^(From|Cc|To).*@slackware\.com slackware :0: * ^(From|Cc|To).*cups\.org office :0: * \[taskjuggler-users\] office :0: * postfix-users mailhelp :0: * ^(From|Cc|To).*postfix\.org mailhelp :0: * ^(From|Cc|To).*cloud9\.net mailhelp Despite my reading the man page and procmail configuration web pages I must still not have the recipes correctly written. I want to learn how to do them correctly. |
Quote:
To do so, add in top of .procmailrc the following: Code:
SHELL=/bin/sh |
Quote:
[CODE] From r-help-bounces@r-project.org Fri Nov 8 08:38:42 2019 Subject: Re: [R] Folder: programming 13895 procmail: [5911] Fri Nov 8 08:48:20 2019 procmail: Assigning "LOGABSTRACT=all" procmail: Assigning "MAILDIR=/home/rshepard/mail" procmail: Assigning "DEFAULT=/var/spool/mail/rshepard" procmail: Assigning "ORGMAIL=/var/spool/mail/rshepard" procmail: Assigning "LOGFILE=/home/rshepard/procmail/log" procmail: Opening "/home/rshepard/procmail/log" procmail: Assigning "COMSAT=no" procmail: Assigning "COMSAT=no" procmail: No match on "^X-Spam-Flag: YES" procmail: Match on "< 256000" procmail: Locking "spamassassin.lock" procmail: Executing "spamassassin" procmail: [5911] Fri Nov 8 08:48:21 2019 procmail: Unlocking "spamassassin.lock" procmail: No match on "^X-Spam-Status: Yes" procmail: No match on "^Subject: *****SPAM*****" procmail: No match on "^(To|Cc).*twodogs.us" procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?).*appl-ecosys.com" procmail: No match on "^(From|Cc|To).*postgresql\.org" procmail: No match on "^(From|Cc|To).*gnucash\.org" procmail: No match on "^(From|Cc|To).*jpilot\.org" procmail: No match on "^(From|Cc|To).*lists\.lyx\.org" procmail: No match on "^List-ID:.*<plug.*\.pdxlinux\.org>" procmail: No match on "^(From|Cc|To).*tug\.org" procmail: No match on "^List-Id:.*<python-list\.python\.org>" procmail: Match on "\[sqlalchemy\]" procmail: Locking "programming.lock" procmail: Assigning "LASTFOLDER=programming" procmail: Opening "programming" procmail: Acquiring kernel-lock procmail: Unlocking "programming.lock" [\CODE] The maibox_size_limit is huge so that's no longer the reason messages were mis-sorted. How procmailrc finds a match on sqlalchemy from r-help-bounces escapes me. Thanks, Rich |
Are you certain that's properly escaped? Otherwise, it'll match on finding any of s, q, l, a, c, h, e, m, or y.
|
Quote:
I don't know either why procmail finds a match with "[sqlalchemy]". Perhaps that string exists in the mail headers. You may put that recipe last in procmailrc and see what you get. |
Bathory/Richard:
I have it fixed now. First, mailbox_size_limit was an issue. The default is 45M and the three folders that were originally not correctly sorted were larger. That was fixed but multiple mis-filings still existed. Second, I replaced the multiple regex match strings for mail lists by a single recipe and tweaked that until I found one that consistently worked correctly. For some it was ^(From|Cc|To). and for others it was ^List-ID:.*. mbox-by-mbox they began sorting properly. This morning none were in the wrong folder. My thanks to both of you. Regards, Rich |
All times are GMT -5. The time now is 03:37 PM. |