Abuse handling plugin for the MyAdmin control panel. This plugin monitors IMAP mailboxes for incoming abuse complaints (spam reports, blacklist notifications, phishing alerts), matches the offending IP addresses to customer services, and automatically notifies the responsible account holders.
- IMAP Abuse Monitoring -- Connects to configurable IMAP mailboxes and parses abuse complaint emails using regex pattern matching to extract offending IP addresses.
- IP-to-Customer Resolution -- Looks up IP addresses against the server inventory and client IP pools to identify the responsible customer.
- MailBaby Integration -- Detects outbound mail abuse through ZoneMTA / MailBaby user matching and message ID correlation.
- Admin Dashboard -- Provides an admin interface for manually reporting abuse, importing UCEProtect CSV data, and importing Trend Micro blocklist entries.
- Client Self-Service -- Allows customers to view and respond to abuse complaints via authenticated or token-based URLs.
- Automated Notifications -- Sends templated email notifications to affected customers with complaint details and response links.
Install with Composer:
composer require detain/myadmin-abuse-pluginThe plugin registers itself with the MyAdmin event dispatcher and adds:
system.settings-- IMAP credential configuration fieldsui.menu-- Admin menu entry for the abuse dashboardfunction.requirements-- Page and class autoload registrations
The plugin hooks are registered automatically when loaded by the MyAdmin plugin system:
$hooks = \Detain\MyAdminAbuse\Plugin::getHooks();
// Returns: ['system.settings' => ..., 'ui.menu' => ..., 'function.requirements' => ...]The ImapAbuseCheck class processes abuse mailboxes from cron:
$abuse = new ImapAbuseCheck($imapServer, $username, $password, $db);
$abuse->register_preg_match('/pattern with %IP%/', 'headers', 'ip');
$abuse->process('spam', 100);Navigate to the abuse admin page in MyAdmin to:
- View abuse statistics (24-hour, 3-day, 7-day breakdowns)
- Submit individual abuse reports by IP
- Bulk-report multiple IPs
- Import UCEProtect CSV files
- Import Trend Micro blocklist data
composer install
vendor/bin/phpunitTo generate a coverage report:
vendor/bin/phpunit --coverage-textThis package is licensed under the LGPL-2.1 license.