Top-level procedure: -------------------- - Don't respond if NOW < STARTTIME or NOW > ENDTIME - Lookup SENDER - Don't respond if: - SENDER is not set - SENDER is <> - SENDER is <#@[]> - SENDER starts with "mailer-daemon" - SENDER contains no "@" - Check SENDER rate - Don't respond if: - SENDER exceded the rate limit (defaults to 1 message every hour) - Read in header - Don't respond if: - header "List-ID:" (as per RFC 2919) - header "Mailing-List:" - header "X-Mailing-List:" - header "X-ML-Name:" - header "List-(Help|Unsubscribe|Subscribe|Post|Owner|Archive):" (as per RFC 2369) - header "Precedence:" value junk, bulk, or list - my own "Delivered-To:" header - Start inject process to sender - Copy autoresponse message to sender Check SENDER rate (directory method) ------------------------------------ - For each entry in directory listing: - split filename into TIMESTAMP, PID, ADDRESS parts - ignore filenames that don't match these parts - if (NOW-TIMESTAMP) > INTERVAL: remove file and ignore - if ADDRESS == SENDER: - add one to Rate - if Rate is above maximum, fail without creating another file - Create a new file in the directory, named as above, optionally using a link instead of a new file to preserve inodes. - Return RATE+1 (add one for the current message)