邮件系统 设为首页
加入收藏
总编信箱
| 第一邮局 | 免费邮箱 | 邮箱评测 | 企业邮局 | 移动邮件 | 邮件系统 | 邮件营销 | 反垃圾邮件 | 邮件客户端 | 邮件安全 |
当前位置:第一邮局>邮件系统>SendMail>文章内容

FreeBSD Virtual Mail How-To

来源:Mail1.com.cn 编辑:Mail 发布时间:2007-05-21 [收藏] [推荐] [评论(0条)]
Preface
Ed's FreeBSD postfix cyrus sasl2 mysql Virtual Mail How-To

This how-to will describe the steps required to create a virtual mail email server using FreeBSD, postfix (SMTP server), cyrus (POP3 and IMAP server), sasl2 (auth server), and MySQL (holds all addresses, passwords, aliases, and domains). Additionally it will use MD5 hashed/crypted passwords for security, and provide access to administer the users, domains, aliases, passwords via a web front-end as well as provide web access to email.

While I have a fully working virtual mail setup that this document describes, and others have successfully followed it as well, this is still a work in progress as I fill in any blanks left over and fix other minor errors. As it stands, it'll get you something like ~99% there if not completely. Everything seems to be here and accurate, but don't be surprised if something is missing or somewhat different when you attempt it. -

Why would you want to read/follow this how-to?
This is for anyone who wants to, or plans to, host one or more domains on a single machine and have bob@domain1.tld and bob@domain2.tld be completely different accounts. Most people will only host one domain, perhaps a couple, just for themselves and have no need for seperate bob@ users. But if you do need a seperate bob@ user for each domain, or want a "sealed system" w/o real user logins on the system, then this is for you. To do all of this we'll be using postfix, cyrus, sasl2, mysql, apache ( php4), squirrelmail ( vlogin, quota, and avelsieve plugins), and postfixadmin.

So will I have to have a bunch of CNAMEs and virtual hosts and stuff?
No, aside from the web interface portion if desired. Your users login names will be stuff like fu@domain1.tld and bar@domain2.tld. This isn't a wholly uncommon practice at any other ISP your users may have used before.
One of the other how-tos on this I read they stored the passwords as plaintext. What about this one?
Nope. There is a patch for sasl2 which allows the use of DES, MD5, and Blowfish crypted/hashed passwords. The MD5 hashed passwords you'll end up using from this are compatible with the FreeBSD passwords in the system passwd file.
I want to use Courier IMAP instead of Cyrus. Is that covered? Can you help me with that?
No, I can't help you with that and it isn't covered. If you want to use Courier IMAP with Postfix for a virtual mail system there are dozens of how-tos on that already. In fact, going that route is quite a bit easier.
I'd like to use PostgreSQL instead of MySQL. Can I and how?

Yes and No. Postfix can be made to use pgsql easily. Cyrus itself doesn't use either, but cyrus-sasl2 does. A friend tried to use pgsql and had errors compiling cyrus-sasl2 with the "frost" patches applied. Postfixadmin, as of 2.1.0, supports both MySQL and PgSQL. The big stumbling block to using PgSQL instead of MySQL is support in cyrus-sasl2. If anyone goes the PgSQL route mostly following this and gets it all to work feel free to email me the changes you needed to do so I can add them as a footnote or something.
Wow, this takes a lot of work!
Sure does, but following this how-to reduces the amount of work due to research and troubleshooting by more than 50%. No wonder it is so much easier to, you know, pay someone else to host your email and deal with all of the upgrade hassles.
I have users in my default domain (somedomain.com) and they can login using just their name (bob) in addition to their full email address (bob@somedomain.com). Is there a way to force them to use their full email address?
None that I am aware of short of using a different default domain. You might be able to use some sort of proxy for your remote pop3/imap connections, but that would very likely break SSL/TLS which would be even worse.
I want to use one installation of SquirrelMail and just point a bunch of different Apache virtual hosts at it (webmail.domain1.tld, www.domain2.tld/mail/, etc.). Can I do that, and how?
In this how-to we use Apache, SquirrelMail, and the SquirrelMail plugin vlogin to enable just that. I don't cover the addition of several Apache virtual hosts, but that's really all that needs to be done.
Some things to keep in mind
You got this off the internet - don't trust everything you find on the internet. Buyer beware. You might get what you paid for. You might get a whole lot more than what you paid for.
Your mileage will vary.
If you lose data, your job, or whatever, don't blame me - this is all at your own risk.
I use FreeBSD whenever possible and wrote this document for FreeBSD. If you use Linux this will still help you, but things will be Different and I won't help you - It can be done on Linux with minor changes, but you're on your own.
A lot of this document glosses over tons of stuff hardly ever mentioning the actualy install and/or readme documents that come with each piece of software mentioned here. We're basicly just blowing through things assuming that the defaults will be the same for you as they are for me right now. When in doubt, read the install, readme, and upgrading docs. In fact, you should read those anyway even if you follow this and it works right the first time.
Security is a problem in some cases here. Like I said, we're going to blow through some things just to get your virtual mail setup up and running. As an admin it is your job to understand your system and to take the needed steps to make it as secure as possible. This document isn't going to tell you all of those steps and it isn't meant for n00bs.
If you find a typo, or that something has changed since some piece of software has been upgraded, feel free to send me you're notes on that and I'll try and get this updated ASAP.
If you've used this before, or are just curious, you might find the Change Log to be of value.
What you'll need
A working FreeBSD 6.0 (or newer) system. FreeBSD 6.1 is highly recommended.
An up-to-date perl (5.8.6 ) just because upgrading perl later will be a pain in the ass. If using FreeBSD 5.3.x you'll very likely have to install a full perl from ports anyway.
sudo - If you don't know what this is you need to stop right here and not even consider this undertaking. At all. Period.
joe - Because I like it, vi bothers me, and emacs is the wrong answer.
MySQL 4.1.x
cyrus-sasl2
Cyrus 2.3.x
postfix 2.3.x
apache
PHP
phpMyAdmin - Optional though generally handy in case you need a quick peek at the tables and don't have shell access.
postfixadmin
squirrelmail
compatibility
vlogin
quota_usage
avelsieve
Happy fun compile/install/configure time
FreeBSD
You should be installing FreeBSD 6 these days. This how-to was originally written using 4.11-Rel and updated for 5.4-Rel, but everything applies to 6-Rel (and newer) with almost no exceptions. You're pretty much on your own with this step, but a base no-frills install with ports is all you need. You won't be needing X11 for any of this so don't install that unless you have some other need.

Be sure to CVSup your system to get the latest fixes and a current ports collection. Rebuild at least your kernel if there were any source changes (and trust me, there will have been some). For maximum security you should buildworld as well to make sure you get all updates to the system installed at once. Documenting how to cvsup the system and build the kernel and world are way beyond the scope of this document.

You're also going to probably want to setup a basic firewall on the system. I recommend using pf but ipfw and ipf both will do all of the basics. Again, this step is totally beyond the scope of this document.

perl
Get perl updated/installed if needed.

sudo
sudo allows you to run things as the super user (hence the name) or even as another user. It's very handy. Compile and install:

QUOTE:
cd /usr/ports/security/sudo
make install
上一篇:Redhat 7.1下的Sendmail SASL认证的实现   下一篇:十分钟快速架设Linux系统下WebMail
[365Key收藏] [雅虎收藏+] [返回顶部] [打印本页] [关闭窗口]  
邮箱   相关文章
·Redhat 7.1下的Sendmail SASL认
·十分钟快速架设Linux系统下WebMa
·Sendmail: localhost.localdomai
·Redhat8下Sendmail(邮件)的配
·Sendmail MailScanner ClamA
·Linux下高可用/可伸缩Sendmail研
·Fedora Core Sendmail 開放遠端
·部分sendmail中的高级设置
·Linux 架设 sendmail MAIL
·“挑”灯看故障 sendmail服务器
·在Sendmail中实现用户认证
·在Linux系统下面架设Sendmail服
免费邮箱 163邮箱  21CN邮箱  Gmail  Hotmail  QQ邮箱  SoGou邮箱  新浪邮箱  雅虎邮箱  
邮箱评测 企业邮箱评测  
企业邮局 企业邮箱  企业邮箱资讯  
移动邮件 技术前沿  手机邮件  
邮件系统 CMail Server  WinMail  SendMail  Qmail  Postfix  MDaemon Server  Lotus Notes  IMail Server  Foxmail Server  Exchange Server  Domino  Winwebmail  
邮件营销 网络营销  营销案例  营销技巧  邮件营销  
反垃圾邮件 Anti-Spam技术产品  新闻资讯  
邮件客户端 DreamMail  Foxmail  IncrediMail  KooMail  Outlook  The Bat!  
邮件安全
用户名: 新注册) 密码: 匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论
  热点文章
·Redhat8下Sendmail(邮件)的配
·配置高效的Sendmail服务器
·中小企业服务器配置-邮件服务器
·如何监控sendmail邮件系统中的用
·为 Sendmail 建立虚拟邮件域
·Sendmail MailScanner ClamA
·Linux 架设 sendmail MAIL
·在Linux系统下面架设Sendmail服
·部分sendmail中的高级设置
·Sendmail的安全解决方案
·十分钟快速架设Linux系统下WebMa
·如何选择代替Sendmail的邮件服务
网站首页 -  网站地图 -  域名注册 -  虚拟主机 -  企业邮箱  -  网站投稿  -  广告联系 -  帮助中心  -  

Copyright 2007-2008 Mail1.com.cn All Rights Reserved
本站内容均来自网络,如果侵犯版权请来信告知,核实后我们会在24小时删除 联系方式:
第一邮局QQ群:14743955 E-mail:www@onlinex.com.cn