Display Rules
The Display Rules functionality in JMailLog provides an advanced mechanism for managing how your mail logs are displayed in the logs list and included in statistics. By defining specific conditions, you can control which logs are shown while keeping all logs stored in the database for future reference. This ensures that you can streamline your workflow by focusing on relevant logs without permanently removing any data.
With Display Rules, you can filter logs based on criteria such as sender, recipient, subject, or body content, using a variety of matching conditions (e.g., contains, equals, starts with). This feature is particularly useful for large-scale email systems where log management is critical to maintain efficiency and clarity.
Let's see How to Use the "JMailLog - Display Rules" Functionality
- Locate the Display Rules Section
- Navigate to the JMailLog configuration screen in your Joomla! administrator panel.
- Find the JMailLog - Display Rules section.
- Configure the Match Type
- Label:
Show only Mail Logs that match All (AND) or Any (OR) of the following:
- Description: Select whether the conditions should be matched using AND logic (
All
) or OR logic (Any
):- All (AND): Only logs that match all conditions will be displayed.
- Any (OR): Logs that match any condition will be displayed.
- Label:
- Define Filtering Rules
- Click the Add (+) button to create a new rule.
- Configure each rule with the following fields:
- Filter By:
- Select the log field to filter by, such as:
- Subject: Filter based on the email subject.
- Message Body: Filter based on the body content.
- Recipient Email: Filter by the recipient's email address.
- Sender Email: Filter by the sender's email address.
- Select the log field to filter by, such as:
- Condition:
- Define how the selected field should be matched:
- Contains: The field contains the specified value.
- Does Not Contain: The field does not contain the specified value.
- Equals: The field exactly matches the specified value.
- Not Equals: The field does not exactly match the specified value.
- Starts With: The field starts with the specified value.
- Ends With: The field ends with the specified value.
- Is Empty: The field is empty.
- Is Not Empty: The field is not empty.
- Define how the selected field should be matched:
- Match Value:
- Enter the value to be used for matching based on the selected condition.
- Filter By:
- Manage Rules
- Use the Remove button to delete any rule.
- Reorder rules as needed using the drag-and-drop functionality.
Example Use Cases
- Hide Logs from a Specific Sender
- Filter By:
Sender Email
- Condition:
Equals
- Match Value:
no-reply@example.com
- Filter By:
- Show Only Logs Containing Specific Keywords
- Filter By:
Message Body
- Condition:
Contains
- Match Value:
urgent
- Filter By:
- Exclude Logs with Empty Subjects
- Filter By:
Subject
- Condition:
Is Empty
- Filter By:
Notes
- Database Retention: Logs that do not meet the defined conditions are still stored in the database. These logs can be displayed again if you change the rules later.
- Stats Impact: Logs excluded by the rules are not counted in the statistics, ensuring that your stats only reflect the displayed logs.
By using these settings, you can effectively manage your mail logs and focus on the information that matters most to you.