PEP: Commands
Please consider switching to our new and improved hosting service: Islandhosting.com
For support call:     778-410-2454

PEP: Commands

Commands are not rules: they don't test the current message in any way. Instead they control various settings and affect how PEP processes your mailrule file.

 

ENABLE/DISABLE LOGGING
These commands enable or disable the logging option. When enabled, time stamped entries are written to a log file in your account. This is disabled by default. The default log file name is "pep.log".

 

CYCLE
If you enable logging, the log file will grow in size indefinitely and you will need to remember to delete it periodically so your disk space does not fill up. This command can be used to cycle the log file. That is, it will rename the log file and start a new one.

o This command takes three parameters. The first is the name of the file you wish to cycle, the second is the maximum size it may grow to before it is cycled, and the third is the number of copies to keep.

This example means that once the "pep.log" file exceeds 5,000,000 bytes in size, it should be cycled, and up to 3 copies of older files should be kept. So "pep.log" will be renamed to "pep.log.1", while the former "pep.log.1" will become "pep.log.2", and the former "pep.log.2" will become "pep.log.3". Any former "pep.log.3" file is simply deleted.

cycle pep.log 5000000 3

 

ENABLE/DISABLE REPLYCACHE
These commands enable or disable the caching option on reply files. Caching is enabled by default. It is unlikely that you'll need to disable it (and not recommended unless you know what you're doing). Caching means that PEP remembers which reply files were sent to which addresses and avoids sending the same file more than once in a given time period. The default time period is one day.

Examples:

enable replycache
disable replycache

 

RESOLVE
This command does a reverse lookup on the IP address of the machine that passed the message to our server and stores the result in the HOSTNAME "header" value, which you can then test. DNS lookups like this can often take a long time to complete, which is why it isn't done automatically. Use this option carefully and try to use it after you've taken other steps to delete unwanted mail.

This example deletes any mail that comes from an apparent dialup pool:

resolve
delete if hostname matches *.dialup.*

 

RESET
This command is used to reset or initialize the internal SCORE value. Without a parameter it sets the score to zero, which is also the default when PEP starts up. You can optionally provide a number to set the score to.

 

DATERANGE
This command checks to see if the current date (on the mail server) falls between two dates. If it does, then things proceed normally. If the current date falls outside the two dates then all subsequent lines (both rules and commands) are ignored up to the next DATERANGE command.

You must specify both dates and the must be separated with a space. Each date must use the YYYY-MM-DD format (A four digit year, a dash, a two digit month, a dash, and a two digit day). Months and days less than 10 must start with a zero. Do not insert any spaces within each date.

This example sends a vacation notice, but only between August 15th and September 5th:

daterange 2002-08-15 2002-09-05
keep if * matches * with "vacation.txt"
daterange

 

TIMEFRAME
This command checks to see if the current time (on the mail server) falls within the specified time frame. If it does, then everything proceeds normally. If the current time falls outside the specified time frame then all subsequent lines (both rules and commands) are ignored up to the next TIMEFRAME command. This allows you to have rules that are only valid during certains days of the week or hours of the day.

The timeframe value is a string containing day indicators (Su = Sunday, Mo = Monday, Tu = Tuesday, We = Wednesday, Th = Thursday, Fr = Friday, Sa = Saturday, Wk = Weekdays Monday through Friday, and Al = All days) and hour ranges (24 hour format with hours and minutes but no colon).

If you specify only an hour range and no day indicators, then it is assumed to apply to all days of the week. You cannot specify day indicators without a time range. If you specify no time frame at all, it is the same as "Al 0000-2359" (ie: any day, any time).

This example forwards all mail to bob@aol.com, but only on the weekends (Saturday and Sunday, all day):

timeframe SaSu -
forward if * matches * to bob@aol.com
timeframe

This example sends a page, but only between 9:00am and 5:00pm on weekdays, and 10:00am and 3:00pm on Saturdays:

timeframe Wk 0900-1700, Sa 1000-1500
page if * matches * to "RADIOWORKS-12345" timeframe

 

ENABLE/DISABLE MULTIMATCH
These commands enable or disable "multimatch". PEP normally stops processing your rule file after the first matching rule is found. If multimatch is enabled then it will continue comparing the message against all the rules in your rule file, activating each one that matches.

A message is appended to your mailbox on the first matching rule that would normally "keep" the message. A subsequent matching "delete" rule cannot undo this. Multiple matching "keep" rules will not result in multiple kept copies however. If none of the matching rules keep the message, it is deleted.

MULTIMATCH is disabled by default.

NOTE: multimatch is always turned off during the inclusion of global rule files.