How to Limit Maximum Outgoing Emails Per Hour in WHM Cpanel

WHMCpanel

I’ve been getting a lot of bounced emails lately due to a client doing mass mailing with most of the recipient emails either does not exist or server is unreachable and it’s clogging the server’s mail queue. The server is using WHM/Cpanel that manages all the tweaks and settings of the server.

Below is a guide on how to put a limit on the number of outgoing emails allowed to be sent from the server per user, per hour.

Login to your WHM account, under Server Configuration, look for Tweak Settings then look for “Max hourly emails per domain” section and enter the number of outgoing emails you want to process per hour for every domain.

WHMCpanel Email Limit

Once you have the number of emails to process per hour set, go to “Mail” tab and look for the “The percentage of email messages (above the account’s hourly maximum) to queue and retry for delivery” and set it to how many percent of those that exceeds the number of emails to process per hour be placed on queue for delivery the next hour.

WHMCpanel Email Limit

Save your changes and restart your mail services.
More on How to Limit Maximum Outgoing Emails Per Hour in WHM Cpanel

Permalink • Print • Comment

Using mod_php_ruid2 with Apache2 on Kloxo

kloxo cp

mod_ruid2 is an SuExec module for Apache 2.x web server based on mod_ruid and mod_suid2 which is one of the PHP types supported by Kloxo web control panel for secure environment.

There are two main operating modes for mod_ruid2, namely stat and config.

Config mode is the default mode used by mod_ruid2 wherein you define the uid and gid that will be used as effective user for the executed/read file.

Stat mode is used when you have multiple sites owned by different users and every file being read or executed must be run through its effective user or group. This is commonly used in virtual hosting environment.

When you install Kloxo, mod_php_ruid2 is also installed together with other PHP types like suphp. In this tutorial we will be setting up mod_php_ruid2 for a shared hosting server or a virtual hosting environment using Apache 2 web server.

Let’s configure first our mod_php_ruid2 to use Stat mode by setting “RMode config” to “RMode stat” in our ruid2 config file

vi /etc/httpd/conf.d/ruid2.conf


LoadModule ruid2_module modules/mod_ruid2.so

<ifmodule mod_ruid2.c>
    RMode stat
    RDefaultUidGid apache apache
    RUidGid apache apache
    RGroups apache
</ifmodule>

Save and exit from the editor then restart your Apache web server.

service httpd restart

Kloxo Webserver config

Now, let’s setup our Kloxo to use mod_php_ruid2 by going to your server’s “Webserver config” . Under the PHP type section, select mod_php_ruid2 and under “Fix ownership and permissions”, select “fix-ALL”. Lastly, click on the Update button and wait for the operation to be completed.

When it’s finished, try to execute or access a file while running “top” command, you should see that the effective user of the executed file is used by the Apache web server.

file stat mod_php_ruid2

mod_php_ruid2 top

That’s it, you should have the mod_php_ruid2 setup and configured. Please do not hesitate to drop your comments and suggestions below.
More on Using mod_php_ruid2 with Apache2 on Kloxo

Permalink • Print • Comment

Error setting up swfmill on CentOS Linux

SWFMill

Here’s a short note on setting up swfmill on CentOS linux.

swfmill is an xml2swf and swf2xml processor with import functionalities.

It’s most common use is the generation of asset libraries containing images (PNG and JPEG), fonts (TTF) or other SWF movies for use with MTASC- or haXe-compiled ActionScript, although swfmill can be used to produce both simple and complex SWF structures.

Download and Install swfmill

wget -c http://swfmill.org/releases/swfmill-0.3.2.tar.gz

Untar the downloaded package and change to its directory.


cd swfmill-0.3.2
./configure

configure: error: Package requirements (libxslt) were not met:

No package 'libxslt' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables XSLT_CFLAGS
and XSLT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

If you encounter an error related to libxslt then you need to install it.


yum -y install libxslt libxslt-devel
Permalink • Print • Comment

How To Extend Your iPhone5 Battery Life

By specification an iPhone 5 battery life is Up to 8 hours on 3G (TalkTime) and Up to 225 hours (Standby Time). However if you experienced shorter battery life than what is said in its specification,perhaps it’s time to re-evaluate the features you are frequently using. May you find these tips helpful.

iphone5.jpg

Brightness Settings
Setting it to a not too bright when in use will help lower down the iPhone5 battery consumption. Go to Settings > Brightness > then move the slider as far left as you can while still being able to see everything.

Lock it Up

When not in use, be sure to lock it to save battery (click the top button for sleep/wake) or auto lock your iPhone5. Go to Settings > General > Auto-Lock.

Close applications
Leaving applications active will drain the battery even when the iPhone 5 is in the standby state. Make sure to close it after using.

Turn off unused networking
Turn 3G access, data roaming or Wi-Fi OFF when not in used. Go to Settings > General > Network and select options there.
More on How To Extend Your iPhone5 Battery Life

Permalink • Print • Comment