Dennis Nichols wrote:
How do I call procmail from send mail under the condition of an unknown
local user *and* get the 2 arguments passed?
The sendmail book would have me believe that I should add the following to
my sendmail.mc
define(`LUSER_RELAY',`agent:host')
OK, please anybody, exactly what do I provide for agent:host to get
procmail to run with the expected arguments.
Do you have a procmail mailer in your sendmail.cf file? (iow do you
have a
MAILER(`procmail')dnl
line in your foo.mc file? If not, you need to add it I guess.
Then, do this:
define(`LUSER_RELAY',`procmail:/etc/procmailrcs/some.rc')
and rebuild foo.cf . Once you've done that, then this is what
happens to unknown users:
$ /usr/sbin/sendmail -bt -Cfoo.cf
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 5 foobar
rewrite: ruleset 5 input: foobar
rewrite: ruleset 95 input: < procmail : / etc / procmailrcs / some . rc
foobar < @ / etc / procmailrcs / some . rc >
rewrite: ruleset 95 returns: $# procmail $@ / etc / procmailrcs / some .
rc $: foobar < @ / etc / procmailrcs / some . rc >
rewrite: ruleset 5 returns: $# procmail $@ / etc / procmailrcs / some .
rc $: foobar < @ / etc / procmailrcs / some . rc >
whereas a known user will be handled like this:
> 5 root
rewrite: ruleset 5 input: root
rewrite: ruleset 5 returns: root
>
Well, that might provide a starting point but I haven't tested it...
You may have $f rather than $g in your mailer definition (look at your
procmail manpage and p.593 of the "bat book" (2/e) and decide whether
you need to change $f to $g in there, etc.
hth,
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail