Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->网络应用 ->邮件服务器 ->Qmail ->正文

在FreeBSD上使用minimalist组建邮件列表

来源:Linuxdby.com 作者:Webmaster 时间:2007-05-28 点击: [收藏] [投稿]
1、Postfix的安装

这里我们使用手动编译的方式安装postfix,当然,你也可以使用ports来进行安装,首先是建立postfix用户,postfix和postdrop用户组,同时将postfix用户加到postdrop组中:


# pw groupadd postfix
# pw groupadd postdrop
# pw useradd postfix -g postifx -G postdrop

下载编译postfix

# fetch ftp://postfix.cn99.com/postfix/official/postfix-2.2.9.tar.gz
# tar -zxvf postfix-2.2.9.tar.gz
# cd postfix-2.2.9
# make tidy %26amp;%26amp; make %26amp;%26amp; make install

在make install的时候会提示一些问题,直接按回车,全部用默认的即可。

2、配置postfix

Postfix安装好后,需要配置的不多,只需修改(或添加)/etc/postfix/main.cf中的以下几处即可(中文部分为说明):


#这里假设我们的机器名是 lists.cnfug.org
myhostname = lists.cnfug.org
#这里假设我们的域是 cnfug.org
mydomain = cnfug.org
#设置发出去的邮件默认域名为 myhostname,即lists.cnfug.org
myorigin = $myhostname
#设置aliases的类型和路径
alias_maps = hash:/etc/postfix/aliases

生成aliases Hash文件,启动postfix

# postalias /etc/postfix/aliases
# postfix start

3、Minimalist的安装

Minimalist的安装非常简单,只需将下载回来的文件解包,复制里面的minimalist.pl到安装目的地即可,这里我们假设安装到/usr/local/bin中,分别执行以下命令:


# tar -zxvf minimalist.tar.gz
# cp minimalist-2.5.3/minimalist.pl /usr/local/bin/minimalist.pl
# chmod 0755 /usr/local/bin/minimalist.pl
# cp minimalist-2.5.3/minimalist.conf-sample /usr/local/etc/minimalist.conf

这里minimalist.conf是minimalist.pl的配置文件,它的默认路径为/usr/local/etc/minimalist.conf。
接下来就是让minimalist与postfix一同工作,编辑/etc/postfix/aliases文件,新增一行:

minimalist: "|/usr/local/bin/minimalist.pl"

重新生成postfix的aliases Hash文件,刷新postfix配置:

# postalias /etc/postfix/aliases
# postfix reload

4、配置Minimalist和新增一个邮件列表

首先要做的就是为minimalist建立一个工作目录,这里我们的工作目录为/home/maillist,并将目录的所有者设置为minimalist.pl执行时的用户,在postfix中,该用户就是nobody:


# mkdir /home/maillist
# chown nobody /home/maillist

在建立了minimalist的工作目录后,我们需要对minimalist的配置文件/usr/local/etc/minimalist.conf进行一些修改,以下是本文中使用的配置文件,修改了的部分都用中文注明了,请根据自己的需要修改:

############## Main configuration file for Minimalist ################

#--------------------------------------------------------------------#
# These directives can be used only in global config #
#--------------------------------------------------------------------#

# The directory for Minimalist's files - default to /var/spool/minimalist
#
# 设置minimalist的工作目录,默认为/var/spool/minimalist
directory = /home/maillist

# Administrator password. It applies to all lists, regardless to
# authentication settings in these lists. For per-list authentication see
# directive 'auth' below.
#
# Password must be in very first line and first column of message's body,
# as follows (without quotes): '*password: this_secret_password'
#
# By default this password isn't empty, but undefined, so if you want use
# it, you must define it here.
#
#password = this_secret_password

# Time while authentication request is valid, in hours
# Default to 24 hours
#
#request valid = 12

# Access control list, used for limiting access to Minimalist. Delimiter
# for items is ':'. Item, which begins with '@', means path to filename
# with items list, one item per row.
#
# Default is empty
#
#blacklist = !small.domain.com:domain.com:spamdomain.org:@/path/to/blacklist.txt
#
# In this example mails from small.domain.com will be allowed to work with
# Minimalist, mails from domain.com will be disallowed, and further, on the
# 'first match' basis.

# Robots (like MLM=mailing list managers) usually should be blocked
# otherwise two minimalists could be ping-ponging help/subscribe messages
# to each other infinitely. Delimiter is '|'.
#
#blocked robots = 'X-List-Server|List-Id|List-Subscribe|X-Yahoo-Newman-Property';

# Log requests to Minimalist. Can be either "none" or path to logfile.
#
# Default to none
#
#logfile = /var/log/Minimalist.log

# Log info about messages, passed through Minimalist. Can be 'yes' or 'no'
#
# Default to 'no'. logfile (see above) to 'none' implies 'no'
#
#log messages = yes

# Run in background. If 'yes', Minimalist uses fork for detach from MTA and
# continues execution in background.
#
# Default to 'no'
#
# 开启在后台运行minimailist,默认关闭
background = yes

#-------------------------------------------------------------------#
# These directives can be used either in global and local configs #
#-------------------------------------------------------------------#

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:在Linux平台上安装基于Postfix、Courier-imap、Extmail的邮件系统 V 0.2.2   下一篇:架构基于FreeBSD和Postfix的IGENUS Webmail邮件系统

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号