Skip to content

Configuration ​

Every setting and environment variable Mailroom reads. The defaults come from the package, so all of it works without publishing anything.

Publish only what you mean to change. The config, to config/mailroom.php:

bash
php artisan vendor:publish --tag=mailroom-config

The views, to resources/views/vendor/mailroom:

bash
php artisan vendor:publish --tag=mailroom-views

The migrations are deliberately not publishable. They are loaded from the package only while Mailroom is enabled, which is what stops a production deploy from gaining the tables. A published copy would sit in database/migrations and run regardless, quietly removing that guarantee. Table names and the connection are config-driven already, and schema changes belong in your own ALTER migration.

Settings ​

KeyDefault
enablednot productionMaster switch
pathmailroomMailbox URL path
domainnullServe the mailbox on its own domain
middleware['web', Authorize::class]Add auth to require login
storage.disklocalWhere .eml and attachment bytes go
storage.pathmailroomDirectory within that disk
storage.max_attachment_sizenullSkip storing bytes above this size, in bytes
database.connectiondefaultKeep captured mail off your main database
database.messages_tablemailroom_messages
database.attachments_tablemailroom_attachments
database.reads_tablemailroom_reads
database.addresses_tablemailroom_addressesEvery address on every message, one row per role
forward.mailernullMailer the Forward button sends through; null leaves it explaining the setup
forward.require_authenticated_usertrueOutside local, forwarding needs a signed-in user
forward.allowed[]Addresses or @domain entries a forward may target; empty means anywhere
forward.rate_limit10Forwards a minute, per user then per IP; null removes the limit
spam.drivernullpostmark adds the spam check; null leaves the pane explaining the setup
spam.endpointPostmark's APIWhere a check is posted
spam.require_authenticated_usertrueOutside local, checking needs a signed-in user
spam.rate_limit10Checks a minute, per user then per IP; null removes the limit
spam.timeout15Seconds to wait for a score
prune.retention_days7Default age cutoff for mailroom:prune
prune.schedulenullCron expression or frequency name to auto-schedule pruning
ui.per_page25Messages per page
ui.poll_interval5Seconds between new-mail checks; null disables polling
preview.enabledtrueAttachment previews
preview.max_inline_bytes512 KBCap on text-shaped previews
preview.max_csv_rows200Rows shown before truncating a table

Environment variables ​

Every environment variable Mailroom reads:

VariableConfig keyDefault
MAILROOM_ENABLEDenabledtrue outside production
MAILROOM_PATHpathmailroom
MAILROOM_DOMAINdomainnull
MAILROOM_DISKstorage.disklocal
MAILROOM_STORAGE_PATHstorage.pathmailroom
MAILROOM_DB_CONNECTIONdatabase.connectionyour default connection
MAILROOM_FORWARD_MAILERforward.mailernull
MAILROOM_FORWARD_REQUIRE_AUTHforward.require_authenticated_usertrue
MAILROOM_FORWARD_ALLOWEDforward.allowedempty
MAILROOM_FORWARD_RATE_LIMITforward.rate_limit10
MAILROOM_SPAM_DRIVERspam.drivernull
MAILROOM_SPAM_ENDPOINTspam.endpointPostmark's SpamCheck API
MAILROOM_SPAM_REQUIRE_AUTHspam.require_authenticated_usertrue
MAILROOM_SPAM_RATE_LIMITspam.rate_limit10
MAILROOM_SPAM_TIMEOUTspam.timeout15
MAILROOM_RETENTION_DAYSprune.retention_days7
MAILROOM_PRUNE_SCHEDULEprune.schedulenull
MAILROOM_PREVIEWpreview.enabledtrue

Message metadata lives in the database so the list stays fast. Raw MIME and attachment bytes go to a disk, so the table stays small even with large attachments.

Released under the MIT License.