邮件系统升级为 postfix+ sasl2+ courier-imap+ mailscanner+ webmail

前两天完成了系统从FreeBSD4.10Stable升级到6.1Release,在内核里面增加了对ipfw和xeon处理器的超线程支持,并在这基础上把以前基于sendmail和sasl的邮件系统升级到了postfix,增加了对垃圾邮件、病毒检测的支持,还配置了一套免费的webmail系统,可以通过http://mail.toplee.com访问。

这次升级过程可以说费时费力,中间经历了若干次各种问题,最终的结果还是比较满意的,在这里把此次升级的笔记整理一下。由于整个升级的过程非常复杂,这里就把最关键的几个部分整理出来。

1、升级内核源文件后编译自己定制的内核
在使用cvsup -g -L 2 xxxx升级完源码树和ports树后执行下面的命令
#cd /sys/i386/conf/
#cp ./GENERIC ./TOPLEE (这个名字自己随便改)
#vi ./TOPLEE
下面是我在文件中增加和修改的部分,其他内核定制部分使用了默认的数据

#Michael
cpu I686_CPU #指定我的机器cpu类型
ident TOPLEE-SMP
options SMP #对xoen至强CPU超线程的支持
options SC_DISABLE_REBOOT #屏蔽ctrl+alt+del重启机器的功能
options QUOTA #支持磁盘配额

options IPFIREWALL #支持防火墙
options DUMMYNET
options HZ=3000
options IPDIVERT
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100
options IPSTEALTH
options TCP_DROP_SYNFIN
options IPFIREWALL_DEFAULT_TO_ACCEPT
#options ICMP_BANDLIM
options ACCEPT_FILTER_DATA
options ACCEPT_FILTER_HTTP
#options IPFILTER
#options IPFILTER_LOG
#options IPFILTER_DEFAULT_BLOCK
#END Michael

#/usr/sbin/config TOPLEE
#cd /sys/comile/TOPLEE
#make depend
#make
#make install
在这里,也可使用另外的方法编译新的内核,在修改好TOPLEE文件后
# cd /usr/src
# make buildkernel KERNCONF=TOPLEE
# make installkernel KERNCONF=TOPLEE

到此完成升级,输入reboot重启服务器,在启动过程中可以看到类似下面的提示信息
FreeBSD 6.1-RELEASE #0: Wed May 24 13:32:37 CST 2006
root@www.toplee.com:/usr/src/sys/i386/compile/TOPLEE
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 3.00GHz (2991.18-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0xf29 Stepping = 9
Features=0xbfebfbff
Features2=0x4400>
Logical CPUs per core: 2
real memory = 1073676288 (1023 MB)
avail memory = 1041567744 (993 MB)
ACPI APIC Table: < A M I OEMAPIC >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID: 0
cpu1 (AP): APIC ID: 1
可以看到系统使用了刚新定制的内核TOPLEE启动,并且支持了至强CPU的超线程。

接下来需要安装下列软件(具体的根据您的需要选择)
Apache
MySQL
php
php-extension
phpmyadmin
proftpd
mrtg
awstats
logrotate
djbdns
net-snmp
openssl

这些软件全部使用FreeBSD的prts进行自动安装,过程都很简单,不多说,有关proftpd、mrtg、awstats、djbdns以及snmp的安装配置可以参照我另外的BLOG。下面重点记录一下postfix相关的部分。

2、postfix 相关安装和关键配置文件记录(待续。。。)

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
2 Responses
  1. 随风 says:

    呵呵,期待Michael大哥做一个postfixr的完全安装文档

  2. Michael says:

    [Comment ID #1395 Will Be Quoted Here]

    嗯,要不是兄弟提醒,差点忘了这个文档还没有写完,这两天抽空给整理出来:)大家相互学习和交流,共同进步。

  3. gamefly says:

    Thanks for finally talking about >邮件系统升级为 postfix+ sasl2+ courier-imap+ mailscanner+
    webmail | 李俊麟的平凡生活 <Liked it!

  4. Pretty nice post. I just stumbled upon your weblog and wanted to say
    that I have truly enjoyed surfing around your blog posts.
    In any case I’ll be subscribing to your feed and I
    hope you write again very soon!

  5. g says:

    Hi to all, as I am in fact keen of reading this blog’s post to
    be updated regularly. It consists of good material.

  6. Wow, this piece of writing is nice, my sister is analyzing such
    things, therefore I am going to let know her.

  7. I know this site offers quality depending posts and other information, is there any other website which
    gives these kinds of information in quality?

  8. Its like you learn my mind! You seem to understand a lot about this, such as you wrote the book in it or something.
    I believe that you simply could do with a few percent to force the message house a bit, however instead of that, this is
    wonderful blog. A great read. I will definitely be back.

  9. Hola! I’ve been reading your web site for some time now and finally got the bravery to go ahead and
    give you a shout out from Kingwood Texas! Just wanted to say keep up
    the good work!

  10. Hi, I read your blogs daily. Your humoristic style is witty,
    keep doing what you’re doing!

  11. Thanks for sharing your thoughts on gamefly free trial.
    Regards

  12. Magnificent goods from you, man. I have understand your stuff previous to and
    you’re just extremely excellent. I really like what you’ve acquired here, really like what you
    are saying and the way in which you say it. You make it entertaining and you still
    take care of to keep it smart. I cant wait to read far more from you.
    This is actually a tremendous web site.

  13. I am actually thankful to the holder of this web site
    who has shared this fantastic article at at
    this place.

  14. Hi, i think that i saw you visited my weblog so i
    came to “return the favor”.I am trying to find
    things to enhance my web site!I suppose its ok to use some of your ideas!!

  15. Hello Dear, are you in fact visiting this site regularly, if so after that you will absolutely take pleasant knowledge.

  16. It’s amazing to go to see this website and reading the views of all mates about this paragraph, while I am also eager of getting
    familiarity.

  17. I must thank you for the efforts you’ve put in penning this website.
    I’m hoping to see the same high-grade content by you later on as well.
    In truth, your creative writing abilities has encouraged me to get
    my own site now 😉

  18. Hi there, this weekend is pleasant for me, because
    this time i am reading this fantastic informative piece of writing here at my
    home.

  19. smore.com says:

    Wow, that’s what I was looking for, what a data! existing here at this website, thanks
    admin of this web site. pof natalielise

  20. dating site says:

    What’s up, yup this article is genuinely nice and I have learned
    lot of things from it on the topic of blogging. thanks.

  21. Hi there are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started
    and set up my own. Do you need any coding knowledge
    to make your own blog? Any help would be really appreciated!

  22. dating site says:

    Asking questions are in fact pleasant thing if you are not understanding anything fully, however
    this post gives fastidious understanding even.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image