Download the PHP package onlime/sendmail-wrapper without Composer
On this page you can find all versions of the php package onlime/sendmail-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download onlime/sendmail-wrapper
More information about onlime/sendmail-wrapper
Files in onlime/sendmail-wrapper
Package sendmail-wrapper
Short Description A powerful sendmail wrapper to log and throttle emails sent by PHP
License GPL-3.0-or-later
Homepage https://github.com/onlime/sendmail-wrapper
Informations about the package sendmail-wrapper
sendmail-wrapper
A powerful sendmail wrapper to log and throttle emails sent by PHP
Advantages
- Lets you monitor any mail traffic from PHP scripts
- Allows throttling (limiting) emails sent by PHP's
mail()
function - Throttle by sent email and/or recipient count per day
- Logs both to syslog and database with message metadata
- Logs common mail headers like
From
,To
,Cc
,Bcc
,Subject
- Fixes
Return-Path
header on the fly for users who did not correctly set it - Highly secured setup, customers cannot access the logging/throttling database
- Standalone PHP application without any external library dependencies
- Built for shared webhosting environments where PHP runs in PHP-FPM (FastCGI Process Manager) mode
- No cronjobs required, sendmail-wrapper will reset counters automatically every day
Requirements
- PHP 7.4+
- sendmail compatible MTA: Exim, Postfix,...
- sudo 1.8+
Currently, sendmail-wrapper is tested and actively used by Onlime GmbH on shared webhosting environments with PHP 8.0, 8.1, and 8.2.
Installation
Initial Setup
Clone repository from GitHub:
Setup system user for sendmail-wrapper:
Quick Install
The installer script install.sh will correctly set up permissions and symlink the wrapper scripts:
If you wish to run this manually, check the following instructions...
Manual Install
Set correct permissions:
Create symlinks:
Setup sudo
Add the following lines to your /etc/sudoers:
Setup PHP
Add/modify the following in your php.ini:
NOTE: It is recommended to put the default
-t -i
options in thesendmail_path
directive of your php.ini instead of appending them directly to thesendmailCmd
config option in yourconfig.local.ini
.This way, it won't break any projects that use Symfony Mailer component which actually checks for
-bs
or-t
insendmail_path
. (see SendmailTransport.php)
Setup MySQL
Import the sendmailwrapper database schema:
Create a MySQL user with the following permissions:
Configuration
Default configuration can be found in config.ini:
You should not change any of the above values. Create your own config.local.ini
instead to overwrite some values, e.g.:
Never put your database password in any of the above configuration files. Use another configuration file called config.private.ini
instead, e.g.:
Upgrading
Upgrade from 1.0.x to 1.1.x
To avoid problems with projects that use Symfony Mailer (Laravel's Mail component also uses Symfony Mailer under the hood!), we have moved the default sendmail command-line options -t -i
from Sendmail-wrapper's configuration config.ini
to the recommended sendmail_path
directive in php.ini
.
If you stick with our default configuration, you need to update your php.ini
:
If you don't care about Symfony Mailer or any other mailer components that check for -t
existence in sendmail_path
, you can keep the old php.ini
configuration and add this to your config.local.ini
:
All versions of sendmail-wrapper with dependencies
ext-mbstring Version *
ext-pdo Version *
ext-imap Version *
ext-json Version *