Now that we are able to manually send messages and process bounces, it would be handy to be able to automate these actions so that they happen at regular intervals.
The requirements are as follows:
Before we can use the scheduling tools to set up automated phpList processing, we need to customize the "wrapper" bash shell which we can run on our host, that'll do the CLI-based phpList work.
phpList's source code includes a bin
subfolder containing a file called phplist
(this file will be set as executable if you unpacked the phpList source on a POSIX-based host).
Copy the bin
directory to a location outside of your publicly-accessible phpList files (that is, at the same level in the directory hierarchy as your public_html
folder or the folder where all your web-accessible files are).
Edit the phplist
file inside the bin
directory.
You will need to customize the following lines to suit your installation:
CONFIG=/home/website/public_html/lists/config/config.php
Change this to reflect the filesystem path to your phpList installation:
/usr/bin/php /home/website/public_html/lists/admin/index.php $*
Change this to reflect both the filesystem path (again) and the PHP binary location on our host (/usr/bin/php
may well be correct).
Having updated the bin/phplist
file, open your config/config.php
file and look for the line containing commandline_users:
$commandline_users = array("admin");
Edit this line by replacing admin
with the user under which your web host processes run as.
This username might be difficult to determine, especially in a shared environment. If you can access a shell session, run the whoami
command to determine this. If you are using a dedicated server, this will be the user under which your web server runs. Your web hosting provider can supply you with this information.
Now that you have prepared phpList's config and your wrapper script, use whatever interface you have at your disposal to schedule tasks as follows:
Process bounces: /path/to/bin/phplist p processbounces
Process queue : /path/to/bin/phplist p processqueue
Process RSS : /path/to/bin/phplist p processrss
The author recommends you to run the processqueue
action every 30 minutes and the processbounces
and processrss
every day.
3.147.104.230