procmail
[Top] [All Lists]

[Q] Trying to improve procmailrc by /bin/true

2002-02-13 18:18:24

        I try to drop messages to /bin/true instead of /dev/null because
        the process still hold resources while send the output to /dev/null.
        Look at this:

Prompt# du -sk yoramg
19532   yoramg

Prompt# time cat yoramg > /dev/null

real    0m0.046s
user    0m0.000s
sys     0m0.040s

Prompt# time cat yoramg | /bin/true

real    0m0.005s
user    0m0.010s
sys     0m0.000s

        In the last command the time is independenced on the file size
        because the right side of the pipe will send the interrupt as it
        finish.   I try this:

VERBOSE=yes
LOGABSTRACT=all
SHELL=/bin/sh
DEFAULT=/var/tmp/Udi/XYZ

:0 fb
* sarit
| /bin/true

        Procmail ignores the return status and sends the message to $DEFAULT.

Prompt# procmail ./simple < letter
procmail: [374] Thu Feb 14 02:48:17 2002
procmail: Assigning "LOGABSTRACT=all"
procmail: Assigning "SHELL=/bin/sh"
procmail: Assigning "DEFAULT=/var/tmp/Udi/XYZ"
procmail: Match on "sarit"
procmail: Executing "/bin/true"
procmail: Locking "/var/tmp/Udi/XYZ.lock"
procmail: Assigning "LASTFOLDER=/var/tmp/Udi/XYZ"
procmail: Opening "/var/tmp/Udi/XYZ"
procmail: Acquiring kernel-lock
procmail: [374] Thu Feb 14 02:48:18 2002
procmail: Unlocking "/var/tmp/Udi/XYZ.lock"
From user(_at_)biosonix(_dot_)co(_dot_)il Wed Jul 11 09:37:47 2001
 Subject: Re: $outlook 
  Folder: /var/tmp/Udi/XYZ                                    1172 


        Any idea?  Is procmail has a keyword to say "drop the message"
        instead sending it to /dev/null?   Drop message with size ~50M 
        will takes about 0.100s  while pipe it to /bin/true still takes
        the same 0.006s. 

Thanks,
 Udi

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