[prev in list] [next in list] [prev in thread] [next in thread]
List: procmail
Subject: Re: using procmail for LUSER_RELAY in sendmail
From: Collin Park <collin () cup ! hp ! com>
Date: 2000-11-30 0:30:42
[Download RAW message or body]
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@lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic