| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The purpose of Journaling is to save copies of sent and received messages, keep them for some time period, and automatically delete them when the period expires. This guarantees you will have a backup in the event of an accidental incoming mail deletion from the user's side. Compared to other methods of saving copies of messages (via a Rule or Legal Intercept) Journaling has the following advantages:
Installation
Make sure you have Perl language installed. Type this in the OS commans shell:
perl -V
For Windows OS a free Perl interpreter may be downloaded from ActiveState.
CommuniGate Pro version 6.0.11 or newer is required. Download the Journaling script Journaler.pl
The script requires CLI.pm Perl module, get one from old.communigatepro.ru/CGPerl/CLI.pm and store the file into same directory with the Journaler.pl file.
cd /var/CommuniGate/
wget http://old.communigatepro.ru/CGPJournaler/Journaler.pl chmod +x Journaler.pl wget http://old.communigatepro.ru/CGPerl/CLI.pm ConfigurationConfigure the Journaling script:Open the script in a text editor and change this line:
my $PostmasterPassword='pass';
Specify your postmaster password.Launch the script:Open the General page in the Settings section of the WebAdmin Interface and click the Helpers link. Create a Helper with the following settings:
Note: In a Cluster environment the above should be done on all nodes which process the message queue, normally on Frontends. To invoke the Helper create a server-wide (or cluster-wide) Rule in Settings->Mail->Rules page with the arbitrary name/priority and the following contents:
On first launch the script will create journals.local domain (shared domain if you're in Dynamic Cluster environment) with some pre-defined settings and account defaults, and with a sample Journal account inside. Configure the Journal:Open the journals.local domain, open the j-mydomain sample Journal account settings page. Change the AddPattern, SkipPattern and days to retain values.
Wait for 10 minutes or restart the helper to make the changes take effect.
The AddPattern and SkipPattern are Perl regular expressions where If a message's Return-Path address or any of the envelope recipients match the AddPattern and don't match the SkipPattern then the message is stored into the Journal. Use SkipPattern to exclude messages from certain users from being journaled; however those messages will be journaled if they're sent from/to another user who is journaled. Examples of patterns:
You may create multiple journaling accounts with different AddPattern and SkipPattern to serve different domains or users within same domain. A journaling account must be in the journals.local domain and the account name must start with j- characters. Restoring messages from JournalsDownload the restoring script:
Configure the restoring script:Open the script in a text editor and change these lines:
my $CGServerAddress='127.0.0.1'; #IP or domain name;
Specify the postmaster password and CommuniGate server address.my $Password='pass'; The script can work over network, i.e. no need to launch it directly from the server machine. Launch the script:Usage:
nohup ./jRestore.pl user@mydomain.com &
Only error messages are printed; the information about search progress is written into
jRestore.log file which you can watch while the script is running.
SupportTo contact authors please email to support@old.communigatepro.ru address. CommuniGate Pro Guide. Copyright © 2020, AO SBK
|