Lets be optimists, Dallman.
As noted below I've gone with Ruud's example so you are
really criticising his work.
The system log is working (named 'etc-procmail.log' in
/home/adam/Mail) but there is no sign of the user log
(named 'adam-procmail.log').
Essentially it contains the following with the only
thing changing being the pid.
---
pid(7452) rc(/etc/procmailrc) user(adam)
home(/home/adam)
maildir(/home/adam/Mail)
default(/home/adam/Mail/.Inbox/)
formail()
sendmail(/usr/sbin/sendmail)
path(/home/adam/bin:/usr/local/bin:/usr/bin:/bin)
---
procmail: Couldn't create or rename temp file "backup/y-spam"
Folder: cd backup && rm -f dummy 'ls -t msg.* | sed -e 1,200d'
/bin/sh: bin/sh: No such file or directory
.. which is a bit strange as I've commented that section
out in /etc/procmailrc, see below ..
#Creates a backup cache of 200 most recent messages.
#--> Make sure that $HOME/Mail/backup/ exists!
# :0 c
# backup
# :0 i
# |cd backup && rm -f dummy `ls -t msg.* | sed -e 1,200d`
#--> I suppose that those quotes need to be `strong` ones.
I've also renamed my forward file to eliminate it from the
possibilities and mail keeps flooding my inbox.
/etc/procmailrc has created 'bounced' and 'etc-procmail.log'
in /home/adam/Mail, but there is no sign of 'Trash' nor
of the entities (files ? boxes ?) specified in
/home/adam/.procmailrc
Happy New Year,
Adam.
Thanks .. Dallman & Ruud.
I've rewritten /etc/procmailrc and $HOME/.procmailrc using Ruud's
example - which I appreciate due to uncluttered layout - but (not
having rebooted) - it's still not filtering.
I attach the above and output of ./procdiag.sh both as root and as user.
The file permissions appear to be ok (dallman ?).
Could the cause be something outside procmail ?
Happy new year.
Adam Bogacki,
afb(_at_)paradise(_dot_)net(_dot_)nz
(1) /etc/procmailrc
[Ruud: I don't understand why Mailman has 2 spaces around the '.*' in
the Subject-header.]
# This is the /etc/procmailrc
# It is run just before the user's ~/.procmailrc
DROPPRIVS = 'yes'
SHELL = 'bin/sh'
MAILDIR = "$HOME/Mail"
DEFAULT = "$MAILDIR/.Inbox/"
LINEBUF = '4096'
LOGABSTRACT = 'all'
#--> should be writable by the user
LOGFILE = "$MAILDIR/etc-procmail.log"
NL = '
' # contains only a literal newline
SPACE = ' ' # contains only a literal space
TAB = ' ' # contains only a literal tab
WSP = "$SPACE$TAB"
LOG = "$NL---
pid($$) rc($_) user($LOGNAME)
home($HOME)
maildir($MAILDIR)
default($DEFAULT)
formail($FORMAIL)
sendmail($SENDMAIL)
path($PATH)
---$NL$NL"
VERBOSE = 'no'
#Deletes duplicate messages
:0 Wh: msgid.lock
|formail -D 8192 .msgid.cache
#Spamassassin
:0 fw : spamassassin.lock
* < 256000
| /usr/bin/spamc
# Work around procmail bug: any output on stderr will cause the "F" in
# "From"
# to be dropped. This will re-add it.
# NOTE: This is probably NOT needed in recent versions of procmail
:0 fhw
* ^^rom( )
| sed -e '1s/^/F/'
:0A
{ LOG = "--> inserted F at the start.$NL" }
:0:
* ^X-Spam-Level:[^*]*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
almost-certainly-spam
:0:
* ^X-Spam-Status: Yes
probably-spam
#Mailman reminders
#--> Has 2 spaces around the '.*' in the Subject-header.
#--> Is that OK?
:0:
* ^From: .*mailman-owner@
* ^Subject: .* mailing list memberships reminder
Trash
#Pipes headers into the lbdb message grabbing program
#:0 hc
#|$LBDBFETCH
#Creates a backup cache of 200 most recent messages.
#--> Make sure that $HOME/Mail/backup/ exists!
:0 c
backup
:0 i
|cd backup && rm -f dummy 'ls -t msg.* | sed -e 1,200d'
#--> I suppose that those quotes need to be `strong` ones.
#Regenerates "From" lines to make sure they are valid.
:0 fhw
* ! ^^From( )
|formail -I "From " -a "From "
:0A
{ LOG = "--> regenerated From-line.$NL" }
#Store mail from postmaster or mailer-daemon into file 'bounced'
:0:
* ^FROM_MAILER
bounced
(2) ~/.procmailrc
# This is the user's ~/.procmailrc
# It is run (automatically) after the /etc/procmailrc.
VERBOSE = 'no'
SHELL = 'bin/sh'
MAILDIR = "$HOME/Mail"
DEFAULT = "$MAILDIR/.Inbox/"
LINEBUF = '4096'
LOGABSTRACT = 'all'
#--> should be writable by the user
LOGFILE = "$MAILDIR/procmail.log"
NL = '
' # contains only a literal newline
SPACE = ' ' # contains only a literal space
TAB = ' ' # contains only a literal tab
WSP = "$SPACE$TAB"
OR = '9876543210^0'
LOG = "${NL}$$ $_ u:${LOGNAME} h:${HOME} m:${MAILDIR} d:${DEFAULT}${NL}"
VERBOSE = 'yes'
<snip>
(3) './procdiag.sh' output as user
adam(_at_)Tux:~09:31:50$ ./procdiag.sh
# procdiag v20031105.1723
# procdiag run at Sun Jan 2 21:31:59 EST 2005
# general account information:
USER: adam (adam)
GROUPS: adam audio src scanner
SHELL: /bin/bash
MAIL:
hostname: tux (Tux)
FQDN: tux.paradise.net.nz
HOME: /home/adam
# user info from /etc/passwd (password is masked):
adam:x:1000:1000:Adam Bogacki,,,:/home/adam:/bin/bash
# system identifiers (if discernible):
OSTYPE: linux-gnu
MACHTYPE: i386-pc-linux-gnu
UNAME: Linux Tux 2.6.5-1-686 #5 Fri Apr 30 20:26:13 EST 2004 i686
GNU/Linux
# The current shell path is (not to be confused with the MTA-defined
# path):
PATH: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
# formail and procmail information (as per versions in the current
# path):
0755 1 root root 26260 Fri Dec 3 05:51:27 2004
/usr/bin/formail
formail v3.22 2001/09/10
6755 1 root mail 67496 Fri Dec 3 05:51:27 2004
/usr/bin/procmail
procmail v3.22 2001/09/10
Default rcfile: $HOME/.procmailrc
It may be writable by your primary group
Your system mailbox: /var/mail/adam
# various procmail configuration elements:
ORGMAIL="/var/mail/adam"
SENDMAIL="/usr/sbin/sendmail"
SENDMAILFLAGS="-oi"
HOST="Tux"
PROCMAIL_VERSION="3.22"
LINEBUF="2048"
PATH="/home/adam/bin:/usr/local/bin:/usr/bin:/bin"
SHELL="/bin/bash"
SHELLMETAS="&|<>~;?*["
# usage banner from grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
# sed version or other identifier
0755 1 root root 41048 Wed Dec 1 11:28:55 2004 /bin/sed
GNU sed version 4.1.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE,
to the extent permitted by law.
# sh info (intended to show whether sh is sh or a symlink to another
# shell)
lrwxrwxrwx 1 root root 4 Dec 20 13:42 /bin/sh -> bash
# sendmail program information (from procmail's $SENDMAIL):
4755 1 root root 644472 Wed Dec 8 00:01:21 2004
/usr/sbin/sendmail
exim: malformed debug_selector setting: + or - expected but found "0"
# Determining Mlocal via sendmail diagnostic invocation
exim: malformed debug_selector setting: + or - expected but found "0.15"
NOTE: procmail doesn't appear to be the LDA
# contents of /home/adam/.forward (if it exists)
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #adam"
# |sh -c "IFS=' ' && exec /usr/bin/procmail -f-||exit 75 #adam"
# An alternative .forward, not checked against the above, but merely
# offered here, is:
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #adam"
# file permissions and ownership:
0644 1 adam adam 2944 Sun Jan 2 20:45:20 2005
/home/adam/.procmailrc
0704 1 root root 125 Wed Dec 15 21:51:11 2004
/home/adam/.forward
0755 176 adam adam 12288 Sun Jan 2 20:45:20 2005 /home/adam/
0644 1 root root 2057 Sun Jan 2 17:34:20 2005
/etc/procmailrc
NOTE: There is no /etc/procmailrcs file.
0700 4 adam adam 4096 Sun Jan 2 19:26:07 2005
/home/adam/Mail/
0755 2 adam adam 4096 Mon Jan 19 21:11:19 2004
/home/adam/mail/
NOTE: There is no /home/adam/.procmail file.
0660 1 adam mail 1 Sun Dec 26 22:08:51 2004
/var/mail/adam
CAUTION: /var/mail/adam perms exceed 7755: curb back to 0640
2775 2 root mail 4096 Sun Dec 26 22:08:51 2004 /var/mail/
# procdiag report end
(4) './procdiag.sh' as root
Tux:/home/adam# ./procdiag.sh
# procdiag v20031105.1723
# procdiag run at Sun Jan 2 21:36:19 EST 2005
# general account information:
USER: root (root)
GROUPS: root
SHELL: /bin/bash
MAIL:
hostname: tux (Tux)
FQDN: tux.paradise.net.nz
HOME: /root
# user info from /etc/passwd (password is masked):
root:x:0:0:root:/root:/bin/bash
# system identifiers (if discernible):
OSTYPE: linux-gnu
MACHTYPE: i386-pc-linux-gnu
UNAME: Linux Tux 2.6.5-1-686 #5 Fri Apr 30 20:26:13 EST 2004 i686
GNU/Linux
# The current shell path is (not to be confused with the MTA-defined
# path):
PATH:
/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin
# formail and procmail information (as per versions in the current
# path):
0755 1 root root 26260 Fri Dec 3 05:51:27 2004
/usr/bin/formail
formail v3.22 2001/09/10
6755 1 root mail 67496 Fri Dec 3 05:51:27 2004
/usr/bin/procmail
procmail v3.22 2001/09/10
Default rcfile: $HOME/.procmailrc
It may be writable by your primary group
Your system mailbox: /var/mail/root
# various procmail configuration elements:
ORGMAIL="/var/mail/root"
SENDMAIL="/usr/sbin/sendmail"
SENDMAILFLAGS="-oi"
HOST="Tux"
PROCMAIL_VERSION="3.22"
LINEBUF="2048"
PATH="/root/bin:/usr/local/bin:/usr/bin:/bin"
SHELL="/bin/bash"
SHELLMETAS="&|<>~;?*["
# usage banner from grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
# sed version or other identifier
0755 1 root root 41048 Wed Dec 1 11:28:55 2004 /bin/sed
GNU sed version 4.1.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE,
to the extent permitted by law.
# sh info (intended to show whether sh is sh or a symlink to another
# shell)
lrwxrwxrwx 1 root root 4 Dec 20 13:42 /bin/sh -> bash
# sendmail program information (from procmail's $SENDMAIL):
4755 1 root root 644472 Wed Dec 8 00:01:21 2004
/usr/sbin/sendmail
exim: malformed debug_selector setting: + or - expected but found "0"
# Determining Mlocal via sendmail diagnostic invocation
exim: malformed debug_selector setting: + or - expected but found "0.15"
NOTE: procmail doesn't appear to be the LDA
# contents of /root/.forward (if it exists)
"|IFS=' ' && p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit
75 #adam"
# An alternative .forward, not checked against the above, but merely
# offered here, is:
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #root"
# file permissions and ownership:
NOTE: There is no /root/.procmailrc file.
0704 1 root root 81 Sat Dec 25 18:36:06 2004
/root/.forward
0755 62 root root 3072 Sun Jan 2 21:21:44 2005 /root/
0644 1 root root 2057 Sun Jan 2 17:34:20 2005
/etc/procmailrc
NOTE: There is no /etc/procmailrcs file.
0700 3 root root 1024 Sun Jan 2 19:27:28 2005 /root/Mail/
NOTE: There is no /root/mail file.
NOTE: There is no /root/.procmail file.
0600 1 root mail 4 Sat Dec 25 19:56:18 2004
/var/mail/root
2775 2 root mail 4096 Sun Dec 26 22:08:51 2004 /var/mail/
# procdiag report end
------------------------------
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
End of procmail Digest, Vol 24, Issue 2
***************************************
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail