Thanks to everyone for the answers about my recipes and logging problems.
It seems my problem is even more basic than this. I have procmail set up
and working on the main domain on my server running FreeBSD 2.2.6-Release
and sendmail 8.9.1. I have followed the testing guides on the Filtering
Mail FAQ at http://www.faqs.org/faqs/mail/filtering-faq/preamble.html and
everything works fine for the first account I tried it on.
Now I have followed all the same steps for this new account which is for a
different domain name on the server. The problem I think relates to the
home directory. Using vipw, the home directories and shells are:
user1 /home/user1 /usr/local/bin/bash
user2 /www/user2name /bin/ftponly
I have things set up this way to chroot everyone when they log in to keep
them jailed in specific directories when using ftp to log in. Only user1
has ssh access to the machine, no telnet accesses are allowed. And
/bin/ftponly is in /etc/shells
user2 does have a home directory in /home and that is where I set up the
.forward and .procmailrc files, as well as the .procmail directory for rc
files and logs. I created a mail directory under /home/user2 I also
tried copying the .forward file to /www/user2name which didn't work either.
I have simplified all my recipes down to just one now for testing. In
user2 procmailrc's file I have the following
VERBOSE=off
MAILDIR=/usr/home/user2/mail
PMDIR=/usr/home/user2/.procmail
LOGFILE=$PMDIR/log
INCLUDERC=$PMDIR/rc.testing
I have tried changing the home directories to /home/user2/ as well and that
didn't work either.
rc.testing is very simple
:0:
* ^Subject:.*test
IN.testing
I have sent numerous emails with the subject test and nothing seems to get
caught. Nothing is getting written to /usr/home/user2/log and nothing is
in the /usr/home/user2/mail directory. Mail seems to be stored in the
/var/mail/user2 file
My goal is to ultimately use procmail for all mail delivery in conjunction
with sendmail 8.9.1. There will be some server-wide rc files to reduce
spam, but all of the domains on the site are mine with a few that belong to
clients. My biggest problem is that I also have about 150 user accounts
for web sites and most have aliases that simply forward to their own
personal email accounts. Only 1 or 2 others besides me on that domain have
pop accounts. This site seems to get spidered a bit by people extracting
email addresses and I personally get quite a bit of spam in that mail account.
I will most likely be posting somewhere all the filtering rules so people
will be able to see what's being filtered and to start I am going to simply
forward all of it to a separate pop account just for spam until I'm sure
that the filters are working fine. I may even keep it that way since I can
scan the subjects pretty quickly and see what's real and what's not (I
think).
Jerry