PHP code example of altzone / sievefilter-apply
1. Go to this page and download the library: Download altzone/sievefilter-apply library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
altzone / sievefilter-apply example snippets
$config['plugins'] = [
// ...
'managesieve', // Required dependency
'sievefilter_apply',
];
// Maximum number of messages to process per operation (default: 500)
$config['sievefilter_apply_max_messages'] = 500;
// IMAP header fetch batch size (default: 50)
$config['sievefilter_apply_batch_size'] = 50;
// Skip redirect actions in retroactive mode (default: true)
// Prevents email storms when applying filters to existing messages
$config['sievefilter_apply_skip_redirect'] = true;
// Skip reject/ereject actions in retroactive mode (default: true)
// Reject is meaningless for already-received messages
$config['sievefilter_apply_skip_reject'] = true;