phplist 安装配置向导

打开 phplist-X.X.x/public_html 会看到里面的 lists 文件夹,对,这就是我需要的.

如果本地没有 mail 测试环境的话,就先把这个文件夹上传到服务器.
phplist
OK,完了,我们修改配置文件 /lists/config/config.php ,这是文件位置.

首先是语言和数据库的基本设置.

# 这个是设置前台普通用户界面的语言,管理界面的语言可以在后台自由选择
$language_module = "english.inc";

# Mysql database server 数据库地址,一般情况这儿不需更改
$database_host = "localhost";

# 数据库名
$database_name = "phplistdb";

# 数据库用户名
$database_user = "phplist";

# 用户密码
$database_password = 'phplist';

# if you use multiple installations of PHPlist you can set this to
# something to identify this one. it will be prepended to email report
# subjects 这项没有试过
$installation_name = 'PHPlist';

# 表前缀
$table_prefix = "phplist_";

#用户表前缀
# read README.usertables for more information
$usertable_prefix = "phplist_user_";

# 安装地址和管理界面地址
$pageroot = '/lists';
$adminpages = '/lists/admin';

bounces 处理设置

“Bounces” 处理是 phplist 的一个强大的功能, Bounce 是制一些邮件因为某些原因不能递送而返回的信息.这些原因可能是:收件人信箱满了,有限公司地址可能不再生效或暂时关闭,或者邮件地址被拼错等等.Bounce 是不同于自动回复的,For more info, see this Wikipedia article on bounces[http://en.wikipedia.org/wiki/Bounce_message].

消息邮箱

在 config.php 文件里,你可以特别设置一个叫”消息信箱地址”的邮箱地址.这个地址将包含在邮件头信息的”Return-Path”里.

他将可以用来接受 bounces,但是首先你得确认已经建立了这个邮箱地址而且他工作正常.还有不要忘记去掉 “$message_envelope” 前面的确”#”

$message_envelope = "mybounces@yourdomain.com";

Bounce threshold

这是一个附加的设定,规定一个邮箱地址连续几次发送失败后,系统自动将该地址屏蔽(unconfirmed)

$bounce_unsubscribe_threshold = 5;

发送速率设置

很多用户在使用phplist运行的主机空间并不是他们所拥有主权的,通常会是共享主机:很多网站放在一台电脑上.

这就意味这如果一个网站突然占用大量CPU资源或者是什么不正常的举动,占用资源,其他人都会蒙受损失.

因此,大多数主机提供商会限制一个网站可以发出的邮件的数量.或者是每小时、每天的数量。来确保一个人的操作不会央及同一主机上的其他网站。

示例 Example

# Send a batch of 360 messages per batch period:
# 每批次发出360封信
define("MAILQUEUE_BATCH_SIZE",360);

# batch period is set to 3600 seconds (=1 hour):
# 一批次为 3600 秒(1小时)
define("MAILQUEUE_BATCH_PERIOD",3600);

# Pause between messages (in seconds) to avoid overloading the server:
# 每封信发送间隔1秒,以避免服务器过载。
define('MAILQUEUE_THROTTLE',1);

信息跟踪Message Tracking

phplist 提供2种方式来检测邮件是否被打开或被操作:user tracking 和 click tracking.

User tracking 可以用来查看 HTML 邮件是否被打开。开启 user tracking,你只需要在邮件模板的底部加上一个 [USERTRACK]这样的符号。这将插入一个隐藏的图片展你的邮件里。但接收者打开邮件,这个图片从你的phplist系统里下载,这将可以记录谁打开了这个邮件。
注意:User tracking 有一些限制,接收者打开邮件必须是在线状态才能起作用。还有记住,接收者邮件客服端的设置或者是webmail程序可能会阻止图片载入。 User tracking 只能用于 html 邮件。

Click tracking 可以监控 html 或 text 邮件里的 链接是否被点击。但开启,邮件里的所有链接将被phplist替换成跳转链接。这样可以保证点击可以被跟踪并记录进数据库, Click tracking 一次可以简单且可靠的监控有多少人点击了您email里的链接而访问了您的网站。
注意:记住 Click tracking 仍然是试验性的。欢迎您的反馈信息,或许可以帮助我们在未来提高完善该功能。

如果你想使用 click tracking,你需要在config.php文件里开启clicktrack设置。

# Click tracking
# If you set this to 1, all links in your emails will be converted to links that
# go via phplist. This will make sure that clicks are tracked. This is experimental and
# all your findings when using this feature should be reported to mantis
# for now it's off by default until we think it works correctly
define('CLICKTRACK',1);

# Click track, list detail
# if you enable this, you will get some extra statistics about unique users who have clicked the
# links in your messages, and the breakdown between clicks from text or html messages.
# However, this will slow down the process to view the statistics, so it is
# recommended to leave it off, but if you're very curious, you can enable it
define('CLICKTRACK_SHOWDETAIL',0);

Experimental settings: auto throttle and domain throttle

# 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
# it still needs tweaking, so send your feedback to mantis.tincan.co.uk if you find
# any issues with it
define('MAILQUEUE_AUTOTHROTTLE',0);

# Domain Throttling
# You can activate domain throttling, by setting USE_DOMAIN_THROTTLE to 1
# define the maximum amount of emails you want to allow sending to any domain and the number
# of seconds for that amount. This will make sure you don't send too many emails to one domain
# which may cause blacklisting. Particularly the big ones are tricky about this.
# it may cause a dramatic increase in the amount of time to send a message, depending on how
# many users you have that have the same domain (eg hotmail.com)
# if too many failures for throttling occur, the send process will automatically add an extra
# delay to try to improve that. The example sends 1 message every 2 minutes.

define('USE_DOMAIN_THROTTLE',0);
define('DOMAIN_BATCH_SIZE',1);
define('DOMAIN_BATCH_PERIOD',120);

Experimental Features

邮件地址验证等级 Email address validation level

# 0 = No email address validation. So PHPList can be used as a non-email-sending registration system.
# 1 = 10.4 style email validation.
# 2 = RFC821 email validation without escaping and quoting of local part.
# 3 = RFC821 email validation.
# This is an experimental email address validation based on the original RFC. It will validate all kind
# of 'weird' emails like !#$%&'*+-/=.?^_`{|}~@example.com and escaped\ spaces\ are\ allowed@[1.0.0.127]
# not implemented are:
#   Length of domainPart is not checked
#   Not accepted are CR and LF even if escaped by \
#   Not accepted is Folding
#   Not accepted is literal domain-part (eg. [1.0.0.127])
#   Not accepted is comments (eg. (this is a comment)@example.com)
# Extra:
#   topLevelDomain can only be one of the defined ones

define("EMAIL_ADDRESS_VALIDATION_LEVEL",2);

List exclude

# list exclude will add the option to send a message to users who are on a list
# except when they are on another list.
# this is currently marked experimental

define("USE_LIST_EXCLUDE",0);

额外技巧

原本发出去的邮件尾部都会带着一个 PHPLIST 的签名,把这改成自己公司的特征非常重要.
如何修改呢?
dreamweaver 在程序代码中搜索 “$html[“signature”]“,修改之即可以.
还有找到 define (”TEST”,1);改成 define (”TEST”,0); 否则系统将处与测试状态,不会真正发出 email.
如果您是VPS 用户,您还可以参考这篇文章.VPS Ubuntu 上安装配置 Postfix + Courier ,来配合 PHPLIST。