Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:mailbounces

Read the bounce mailbox: hard bounces and spam complaints go on the suppression list (dry run unless --apply).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/mailbounces.md

On this page

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 --help

Help 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 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

OptionValueHelp
--applySuppress the addresses, handle the messages and write the status (the default is a dry run)
--dry-runThe default, kept for scripts that pass it: report only, nothing is suppressed, no message is changed, the status is not written
--filerequiredRead these saved messages (.eml file, or a directory of them) instead of the mailbox
--statusShow the last run and stop
--jsonOne 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 ...).


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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x