exp:mailbounces
Read the bounce mailbox: hard bounces and spam complaints go on the suppression list (dry run unless --apply).
Script bin/php/mailbounces.php, code in kernel/private/classes/commands/mailbounces.php. Run it from the installation root, as the user the web server runs as:
./console exp:mailbounces --help
./console exp:mail:bounces --help
php bin/php/mailbounces.php --helpHelp text
Bounce mailbox
Reads the mailbox of mailpreferences.ini [BounceSettings] (IMAP or POP3, set in a settings
override): hard bounces (delivery status notifications with a permanent failure of
HardStatusCodes[]) and spam complaints (feedback loop reports) put the address on the
suppression list. Soft bounces, delay notices (delayed) and other mail are counted only. No address is shown in full.
Without --apply nothing is changed: the messages are read and reported, no address is suppressed,
no message is marked or deleted and the status is not written. --dry-run is still accepted and
means the same as no flag; --apply together with --dry-run is a usage error (exit 2).
./console exp:mail:bounces show what reading the mailbox would do
./console exp:mail:bounces --apply read the mailbox and suppress the addresses
./console exp:mail:bounces --file=dsn.eml read saved messages (a file or a directory of .eml)
./console exp:mail:bounces --status the last run
Ends with PASS, SKIP (the reader is disabled or not configured) or FAIL (exit 1).Options
| Option | Value | Help |
|---|---|---|
--apply | Suppress the addresses, handle the messages and write the status (the default is a dry run) | |
--dry-run | The default, kept for scripts that pass it: report only, nothing is suppressed, no message is changed, the status is not written | |
--file | required | Read these saved messages (.eml file, or a directory of them) instead of the mailbox |
--status | Show the last run and stop | |
--json | One JSON object instead of the text |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Related
Generated by ./console exp:help:examples from bin/php/mailbounces.php, kernel/private/classes/commands/mailbounces.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.