+0 000-000-00-00

phplist настройка

Давно и успешно использую phplist для управления списком рассылки. На каждом хостинге свои ограничения по количеству отсылаемых писем. Общий мануал по phplist. Мануал по настройке скорости рассылки тут.

На предыдущем хостинге было 10 писем в минуту. Поэтому настройки были такие

# define the amount of emails you want to send per period. If 0, batch processing
# is disabled and messages are sent out as fast as possible
define('MAILQUEUE_BATCH_SIZE', 9);

# define the length of one batch processing period, in seconds (3600 is an hour)
define('MAILQUEUE_BATCH_PERIOD', 30);

# to avoid overloading the server that sends your email, you can add a little delay
# between messages that will spread the load of sending
# you will need to find a good value for your own server
# value is in seconds, and you can use fractions, eg "0.5" is half a second
# (or you can play with the autothrottle below)
define('MAILQUEUE_THROTTLE', 5);

# Mailqueue autothrottle. This will try to automatically change the delay
# between messages to make sure that the MAILQUEUE_BATCH_SIZE (above) is spread evently over
# MAILQUEUE_BATCH_PERIOD, instead of firing the Batch in the first few minutes of the period
# and then waiting for the next period. This only works with mailqueue_throttle off
# and MAILQUEUE_BATCH_PERIOD being a positive value
# it still needs tweaking, so send your feedback to mantis.phplist.com if you find
# any issues with it
define('MAILQUEUE_AUTOTHROTTLE', 0);

На новом хостинге добился поднятия лимитов со 100 до 500 писем в час. Поэтому настройки такие 

define('MAILQUEUE_BATCH_SIZE', 230);
define('MAILQUEUE_BATCH_PERIOD', 1800);
define('MAILQUEUE_THROTTLE', 0);

define('MAILQUEUE_AUTOTHROTTLE', 1);

Как видим, экспериментирую с экспериментальной функцией Autothrottle. Оставил запас на 40 писем в час для всяких уведомлений, писем из магазина и пересылок. В дневное время, думаю, запас нужно еще больше. 

Настройка запуска phplist по cron

How to set up phpList command-line interface (CLI)

По ссылке описано, как сделать bash файл и как его запускать, если хостинг позволяет запускать php скрипты через командную строку. Но на предыдущем хостинге у меня так не работало.

На хостинге fozzy заработал следующий скрипт? который я назвал phplist.sh

#!/bin/bash
/usr/local/bin/php /home/.../list.solarhome.ru/admin/index.php -c /home/.../list.solarhome.ru/config/config.php $*

запуск из командной строки

phplist.sh -pprocessqueue > sendlog.txt

В файл sendlog.txt записываются результаты рассылки по последнему запуску команды. Если вывод делать не надо, то команда такая

phplist.sh -pprocessbounces > /dev/null 2>&1

В cron сделал такую команду

*/15	*	9-10	11	*	/home/.../phplist.sh -pprocessqueue > sendlog.txt

каждые 15 минут 9-10 ноября
       

числа и месяц устанавливаю вручную когда нужно сделать рассылку.

Настойка правил обработки возвратов

Мануал тут. В регулярное выражение можно записывать точную фразу ошибки в скобках. Можно писать несколько условий с разделителем |

Примеры правил:
 

(Archived recipient.) Delete subscriber

(delivery error: dd This user doesn't have a yahoo.fr account|This user doesn't have a yahoo\.fr account) Delete subscriber

(type=MX: Host not found) Delete subscriber. No mail records for the domain.

(sorry, no mailbox here by that name|Mailbox disabled|address not found in table|User mailbox is not local|mailbox not allowed|Mailbox syntax incorrect|RESOLVER\.ADR\.RecipNotFound) Delete subscriber and bounce. No ambiguity here, we can also delete the bounce message.

(account is disabled|This mailbox has been blocked due to inactivity|This account has been disabled|The email account that you tried to reach does not exist|This is a permanent error .* local delivery failed) Delete subscriber and bounce. Same as above

(User unknown|Unknown user|Unknown address|No such recipient|No such user|The email account that you tried to reach is disabled|Recipient not found|Recipient unknown|Invalid recipient|Address unknown|Recipient address rejected) Delete subscriber and bounce. Same as above

Полезные ссылки

  1. phplist -pprocessqueue fails to login in commandline mode?
  2. How to setup phpList for background delivery on a linux server

    Опубликовано

    Menu