PHP email log & limit

  • Hello,

    I updated my old phpwrapper script and maybe someone needs this feature too :)


    This phpwrapper helps prevent the sending of large amounts of spam and identifies the script used to send it.


    Installation instruction:

    1, create the database with the install.sql which will create the phpmail database.

    2, create a sql user for this database.

    3, copy the files in the /usr folder to the server's /usr folder

    4, set the mysql password in /usr/sbin/sendmail-wrapper-php

    5, modify the template /etc/imscp/php/fcgi/php.ini


    find:

    Code
    1. sendmail_path = "/usr/sbin/sendmail -t -i -f webmaster@{DOMAIN_NAME}"



    replace with:

    Code
    1. ;sendmail_path = "/usr/sbin/sendmail -t -i -f webmaster@{DOMAIN_NAME}"
    2. sendmail_path = "/usr/sbin/sendmail-wrapper-php -t -i -f webmaster@{DOMAIN_NAME}"
    3. auto_prepend_file = /usr/share/php/php_set_envs.php


    If you use php-fpm than you will found the php.ini in the /etc/imscp/php/fpm


    6, If you want to modify the default daily mail limit than you could modify the default value of the daily_limit column in the mail_domains table. The default limit is 2000 email / day.


    7, rebuild customer's configuration files

    Code
    1. perl /var/www/imscp/engine/setup/imscp-reconfigure -da

    Files

    OS: Debian Buster

    i-MSCP: GIT 1.5.3-maintenance branch

    Edited once, last by Kika ().

  • Welcome.

    Could you help me make this change work for you? i made the changes but no data is mapped to the created sql database.

    Thank you in advance for your help.

    hello: istván


    Üdvözlöm. tudna nekem segíteni hogy ez a módosítás önnél hogy müködik? meg csináltam a módosításokat,de a létrehozott sql adatbázisban nem képződnek le adatok.

    segítségét előre is köszönöm.

    üdv: István

    Dankó István