procmail
[Top] [All Lists]

Can I have multiple .procmailrc files in my home?

2003-08-19 06:56:41
Hello,

I've been setting up fetchmail/procmail/spamassassin the last few days. I have a working ~/.procmailrc with everything working nicely and mail collected, scanned and delivered to my user mail spool. But what I'd like to do is feed mail fetchmailed from some of my pop accounts to one mailbox and pop mail from other accounts to a different mailbox. This tip <http://www.unixan.com/sylpheed/social-engineering/fetchmail- procmail.html> seems to suggest it's possible to call procmail from fetchmail using specific .procmailrc files, something like this:

poll pop.myisp.com user "myuser" with password "mypass"
        is "adrian" here
        and wants mda "procmail ~/.procmailrc.mozilla"
poll pop.myisp2.com user "myuser2" with password "mypass2"
        is "adrian" here
        and wants mda "procmail ~/.procmailrc.mailapp"

With my first attempts at this procmail gave a suspicious rcfile error and dumped all mail to my root user spool. I checked permissions on the relevant file and directory, and played about with them to no avail, here's what they are now:

-rw-r--r-- 1 adrian staff 1734 Aug 19 11:09 .procmailrc.mozilla
drwxr--r--  120 adrian   staff        4080 Aug 19 04:01 adrian

Since these seem to be fine as far as my reading of the procmail manual goes, it led me to wonder about the user which procmail is running under when it tries to read the .procmailrc files - it needs to setuid adrian right? Which it does happily if I have a ~/.procmailrc. I reasoned that I need to specify the user from fetchmail too:

poll pop.myisp.com user "myuser" with password "mypass"
        is "adrian" here
        and wants mda "procmail -d adrian ~/.procmailrc.mozilla"

This resulted (IIRC) in procmail trying to find the .procmailrc.mozilla in roots $home.
So I specified the full path:
poll pop.myisp.com user "myuser" with password "mypass"
        is "adrian" here
and wants mda "procmail -d adrian /users/adrian/.procmailrc.mozilla"

This generated an unknown user error, after reading the manual I thought this might be related to OS X's use of netinfo rather than /etc/passwd (my user accound wasn't listed in /etc/passwd), so I used nidump to copy the netinfo entries to /etc/passwd and tried again.
Still got an error:
unknown user "/users/adrian/.procmailrc.mozilla"
Which rather looks like it is taking the file path as a user name?

Right now I'm kind a lost, is my syntax for procmail wrong?
"procmail -d adrian /users/adrian/.procmailrc.mozilla"
Any ideas on why this isn't working?

What I'm aiming for is a chain something like this:

PopAccount1 > fetchmail > procmailrc.mailapp > uw-imapd > mail.app
PopAccount2 > fetchmail > procmailrc.mozilla > qpopper > thunderbird

FYI I'm on OS X 10.2.6

I can think of ways around this problem - a lot of rules in .procmailrc, or hijacking the mail spool of another user. But I'd really like to know why I can't seem to specify an rc file in fetchmail, because it seems like such a simple solution.

Thanks in advance.

Adrian

e-mail <mailto:adrian(_dot_)simmons(_at_)ntlworld(_dot_)com>
AOL, Yahoo or MicroSoft Messenger ID: perlucida
Personal Web Site <http://homepage.ntlworld.com/simmo33/>
Company Web Site <http://www.perlucida.com>
Company e-mail <adrian(_at_)perlucida(_dot_)com>


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Can I have multiple .procmailrc files in my home?, Adrian Simmons <=