你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 9.04下架构Extmail邮件系统

[日期:2009-11-05] 来源:forum.ubuntu.org.cn  作者:阳光 [字体:大 中 小]

MDA配置
概念:MDA mail deliver agent其实就是邮件投递代理,postfix本身有很多邮件投递代理,由于我们的环境虚拟域所以可以使用postfix自己的virtual 这个代理,但是它必须创建一个用户来执行投递操作,main.cf中有记录象这样:
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
virtual_transport = virtual

下面介绍另一种MDA maildrop

安装Maildrop
apt-get install maildrop
gedit /etc/maildropmysql.config

//创建一个文件

hostname 127.0.0.1
port 3306
database extmail
dbuser extmail
dbpw extmail
dbtable mailbox
default_uidnumber 1000
default_gidnumber 1000
uidnumber_field uidnumber
gidnumber_field gidnumber
uid_field username
homedirectory_field concat('/home/vmail/',homedir,'/')
maildir_field concat('/home/vmail/',maildir)
quota_field quota
mailstatus_field active

修改/etc/maildroprc
logfile "/var/log/maildrop.log"


手动创建日志
gedit /var/log/maildrop.log
chown vmail:vmail /var/log/maildrop.log
chmod 766 /var/log/maildrop.log

创建 /etc/logrotate.d/maildrop

内容为下面:

/var/log/maildrop.log {
daily
notifempty
missingok
rotate 5
compress
create 766 vmail vmail
sharedscripts
}


编辑/etc/postfix/master.cf,注释掉原来maildrop的配置内容并改为:
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${extension} {nexthop}

由于maildrop不支持一次接收多个收件人,因此必须在/etc/postfix/main.cf增加如下参数:

###### Maildrop config ########
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop:

创建 /etc/quotawarnmsg,为邮箱空间超过配额时的警告邮件内容
X-Comment: Rename/Copy this file to quotawarnmsg, and make appropriate changes
X-Comment: See deliverquota man page for more information
From: Mail Delivery System <Mailer-Daemon@example.com>
Reply-To: support@example.com
To: Valued Customer:;
Subject: Mail quota warning
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Your mailbox on the server is now more than 90% full. So that you can continue
to receive mail you need to remove some messages from your mailbox.

linux
相关资讯       Ubuntu服务器  Extmail 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款