sudo yum -y install epel-release
sudo yum -y update
Download repository
| pmta delete -queue=*/* | |
| pmta delete -queue=hotmail.com/* |
| smtp-listener 1.2.3.4:465 tls=yes | |
| smtp-server-tls-certificate /etc/pmta/certificate-generated-by-openssl.pem "YourPasswordHere" smtp-server-tls-ciphers "HIGH:MEDIUM:!ADH:@STRENGTH" | |
| <source 0/0> # matches all | |
| allow-starttls yes | |
| require-starttls-before-auth yes | |
| allow-unencrypted-plain-auth no | |
| </source> |
| <? | |
| /** | |
| * Example how to use it in PHPMailer | |
| */ | |
| //once initiated PHPMAiler before you can get_spam_socre you need to execute preSend() since is the way to get the RAW email that will be sent. | |
| $mail->preSend(); | |
| $spam_score = get_spam_score($mail->getSentMIMEMessage()); | |
| if ($spam_score >= 5 OR $spam_score === FALSE) |
| STARTTLS with Let's Encrypt and PowerMTA | |
| This is an update to my previous post. I tried using the same certificate to let PowerMTA secure our e-mail server using STARTTLS, but unfortunately, Let's Encrypt is still untrusted by our PHP front-end because Let's Encrypt is still a new certificate authority. The solution is to include IdentTrust's root certificate as it's already trusted by all clients. | |
| This setup is specific to a server with Apache and PowerMTA. You can probably make this work without a web server. Simply adjust the paths and other things as necessary. | |
| I'm pasting the previous steps in this post with some updates. | |
| First, log in as root. It's supposed to be a bad practice to work directly on root, but what the heck: | |
| # sudo su - |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
| phpbrew install --mirror=https://www.php.net 7.3.12 +default +mysql +mb +debug +fpm +openssl=/usr/local/opt/openssl +bz2=/usr/local/opt/bzip2 +zlib=/usr/local/opt/zlib -- --enable-maintainer-zts | |
| phpbrew ext install github:krakjoe/pthreads master |
| <?php | |
| /** | |
| * Split PDF file | |
| * | |
| * <p>Split all of the pages from a larger PDF files into | |
| * single-page PDF files.</p> | |
| * | |
| * @package FPDF required http://www.fpdf.org/ | |
| * @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/ |