[Exim] Procmail/Exim Question

Top Page
Delete this message
Reply to this message
Author: Adam H Pendleton
Date:  
To: procmail, exim-users
Subject: [Exim] Procmail/Exim Question
I'm having to recover from a system failure, and I've got backup of all
my files, save one: /etc/procmailrc. So I'm having to re-create it by
guess-and-check. Here's what I know:

1. In exim.conf I have this line:
command = "/usr/bin/procmail -a \"${lookup pgsql{SELECT home_dir FROM
email_users \
         WHERE username='${local_part}@${domain}'}}\" \
         -a '${local_part}@${domain}'"


This calls procmail like this: /usr/bin/procmail -a
/var/spool/mail/vdomains/domain.com/user -a user@???.

2. My mail directory structure looks like this:

/var/spool/mail/vdomains/domain.com/user/
/var/spool/mail/vdomains/domain.com/user/.procmailrc
/var/spool/mail/vdomains/domain.com/user/Maildir
/var/spool/mail/vdomains/domain.com/user/new
...
/var/spool/mail/vdomains/domain.com/user/.Folder1.Folder2/

So my IMAP folder Folder1->Folder2 appears under Maildir, but the
.procmailrc that gets processed exists one directory above Maildir.

3. Spamassassin (spamc) is called from procmailrc and puts all mail in
a sub-folder called ".Spam".

4. The recipes in .procmailrc refer to folders like this:

:0:
* ^From:.*user2@???
.Folder1.Folder2/

My questions are this:
1) For some reason I can't get procmail to deliver messages to the
sub-folder under Maildir/, only to the directory above. So instead of
delivering to Maildir/.Folder1.Folder2/ it delivers to .Folder1.Folder2
(this is with the virtual user .procmailrc file in place).
2) What is the second -a variable for? I remember that it was required
for something, but I don't remember what.
3) What should my procmailrc look like? I realize this is a pretty
broad question, but I'm running out of patience with this problem. Can
anyone help me?

ahp