Welcome to Islandnet.com  
Locally owned and operated since 1993  
Live Help
LOG IN:  Username:    Password:    

PEP Documentation

Return to the help index

Pages: QuickstartActionsHeadersTestsCommandsAttachment HandlingReply FilesMailing ListsChild AccountsDNS BlocklistsSpamAssassinChallengesM-ScriptGlossarySpam FAQSMTP TutorialPEP Quick SetupPEP WizardPEP Editor

PEP and Child Accounts

By default, PEP will look for a file named "mailrule" in the top level of an account's file area, even if it is a "child account" (ie: one that belongs to another account). There are certain scenarios where it may be desirable for the parent account to have more control of the mailrule file for any and all child accounts.

Scenario 1: The parent account wants to have a single mailrule file for ALL of their child accounts, and the child accounts should not be able to specify their own rules

The parent account should create a file named "mailrule.all" in the parent account's root directory. If this file exists, then the mailrule file that is in a child account's directory, if any, is ignored.

Scenario 2: The parent account wants to have different mailrule files for each child account, and the child accounts should not be able to specify their own rules

The parent account should create a separate mailrule file for each child account, named "mailrule.username" (where the "username" part is replaced with the child account's username). If a file like this exists for the child account, then any mailrule file in their own account is ignored.

Scenario 3: The parent accounts wants to have a set of rules that is applied to ALL child accounts, but still allow them to have their own rules that are applied afterwards

The parent account should create a file named "mailrule.all" as in scenario #1 above, but make the last line of that file say "include mailrule". If a message makes it that far, then the mailrule file that it in the child's account, if any, is processed. You could put the "include mailrule" file at the top of the "mailrule.all" file, or anywhere else if you prefer (but keep in mind that this changes the order that rules are applied).

Example: delete anything that scores higher than 10 for spam, then continue with any rules that the child account has created:
delete if sascore > 10
include mailrule

Scenario 4: The parent account wants to have a set of rules that applies to ALL child accounts, plus custom rules for each child account that the parent maintains, and the child account should not be able to specify their own rules

The parent account should create a "mailrule.all" file as in scenario #1, plus a "mailrule.username" file for each child as in scenario #2. The last line of the "mailrule.all" file should say "include ~mailrule.{USERNAME}". After the mailrule.all file is processed, PEP will then look for a file named "mailrule.{USERNAME}" (it will automatically replace the {USERNAME} part with the username of the child account). Because the file to be included starts with a '~' character, it looks for this file in the parent's account instead of the child's account. Any mailrule file that exists in the child's account is ignored.

Example: delete anything that scores higher than 10 for spam, then continue with any custom rules for the child account in question:
delete if sascore > 10
include ~mailrule.{USERNAME}

Scenario 5: The parent account wants to have a set of rules that applies to ALL child accounts, plus custom rules for each child, plus allow child accounts to have their own rules.

The setup for this is the same as scenario #4, except that the "mailrule.all" file should have an additional line at the end that says "include mailrule". Because the filename does not start with a '~' character, PEP will look for it in the child's account. Alternatively, this line could be added at the end of each individual "mailrule.username" file.

Example: delete anything that scores higher than 10 for spam, then continue with any custom rules for the child account in question, then any rules that the child account has created:
delete if sascore > 10
include ~mailrule.{USERNAME}
include mailrule

Notes:

It's ok if a file doesn't exist, it will simply be ignored. So if you have a lot of child accounts, but only one or two need custom rules, you only need to create those files and don't create files for the other accounts.

When you want to include a file from the parent's account, make sure the filename starts with a '~' (tilde) character. This is what tells PEP to look for it in the parent's account and not the child's account.

Don't forget: if a "mailrule.all" file exists, or a "mailrule.username" (where "username" is the child account's username), then that takes precedence. Any mailrule file in the child's account will be completely ignored unless you explicitly "include mailrule" in one of these files. If you delete these files then it returns to looking for "mailrule" in the child's account.



Page generation time: 0.10 seconds