procmail
[Top] [All Lists]

Re: procmailization of vacation/forwarding CGIs

2001-05-24 14:28:42
Okay, I didn't get any response (how'd it get so quiet here?)
but I hope this makes more sense.  If you ignore the perl below,
it's all comes out procmail (in the 'print' lines).  

What I did was use these lines for the vacation CGI:

    open(OUTPUT,">$tmp") || html_page("<em>$alert Cannot save message</em>");
    print OUTPUT ":0c: vacation.lock"
    print OUTPUT "* !^X-Loop: $user$fqdn"
    print OUTPUT "* !^Precedence.*(junk|bulk|list)"
    print OUTPUT "|/usr/ucb/vacation -t1w $user";  
    close OUTPUT;

and these lines for the forwarding CGI:

    open(OUTPUT,">$tmp") || html_page("<em>$alert Cannot save list</em>");
    print OUTPUT "$init_line";
    print OUTPUT "* !^X-Loop: $user$fqdn"
    print OUTPUT "! $where";
    close(OUTPUT);

where 
    $init_line is either ":0" or ":0 c"
and
    $where is the email address to which incoming mail should be forwarded.

Is there anything I'm not considering in this?
Thanks.

Dave Robbins
_______________________________________________
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>