procmail
[Top] [All Lists]

Re: problem

1997-04-07 23:35:00


On Tue, 8 Apr 1997, Lars Kellogg-Stedman wrote:

(1) Exactly how are you invoking procmail (what does the command 
    line look like)?

I type ./proc-script at the unix prompt.


(2) What does the procmail script look like?

This is the proc-script file:

          #!/bin/sh                                                            
                                                                               
          ORGMAIL=/mount/var/spool/mail/$LOGNAME
                                                                               
          if cd $HOME &&                                                       
           test -s $ORGMAIL &&                                                 
           lockfile -r0 -l3600 .newmail.lock 2>/dev/null                       
          then                                                                 
            trap "rm -f .newmail.lock" 1 2 3 15                                
            umask 077                                                          
            umask 077                                                          
            lockfile -l3600 -ml                                                
            cat $ORGMAIL >>.newmail &&                                         
             cat /dev/null >$ORGMAIL                                           
            lockfile -mu                                                       
            formail -s procmail <.newmail &&                                   
             rm -f .newmail                                                    
            rm -f .newmail.lock                                                
          fi                                                                   
          exit 0

**********************************

Thanks for your help.

Ben

<Prev in Thread] Current Thread [Next in Thread>