Pro,
Please see my inline comments:
Professional Software Engineering wrote:
At 10:03 2002-07-10 -0800, Matthew Schumacher did say:
Quick question, is it possible to define an procmailrc file to use
when procmail is set to delivery mode?
'man procmail'
no. -d and -m are mutually exclusive -d expects only usernames to
follow it, and -m expects only an rcfile and variable arguments to
follow it.
Is there any work around to this? Perhaps call procmail with -m and
pass the user then instruct it to deliver to a user inside of the RC?
Here is my current Mlocal syntax (watch for wrap):
(actually, to those familiar with the sendmail configuration file, the
line wrap for Mlocal isn't particularly significant - all those
components CAN be put one long line, or separated across multiple lines)
The reason why I want this is because I want to call one of two
different mailers with a sendmail rule each with it's own procmail
recipe.
I'm unclear - if procmail is the LDA, it'll parse /etc/procmailrc as
well as ~/.procmailrc for the user being delivered to. How do you
propose you'd be invoking it as "lda-but-different" ? Would your
manually specified rcfile be invoked FIRST, followed by the standard
rcfiles? Why not use /etc/procmailrc to do your filter normally (or is
it some sendmail-only determination of the need to filter in this fashion)?
Yes, I want to make two mailers so that one will deliver normally and
the other will do some spam filtering. The determining factor to which
user gets which mailer is actually stored in the users LDAP record as
the aptMailSpam attribute. I have the LDAP database setup in sendmail
so writing a rule to pick a mailer based on the attribute is easy.
If you want to call a procmail rule from a sendmail rule, you should
consider using the procmail "mailer" (which is a TOTALLY different thing
from local_procmail - procmail as LDA). Or, deliver to an Mprog alias:
user "|/usr/local/bin/procmail -m somercfile.rc"
Both of which preclude LDA delivery.
Yes I know I can do this, but I feel that I am calling procmail twice
when I should only need to do it once.
If you get your alternate delivery hack working, you might want to
document it and share it for others - the basic job of invoking procmail
from a sendmail rule is rarely undertaken by users, and so the available
pool of experience is limited.
Where do I post my comments? This list?
Thanks for your help,
schu
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail