




已阅读5页,还剩10页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
As it is now, Ive split the FreeBSD qmail installation up into 20 sections which are listed below. Simply start at step 1and follow it all the way to completion. By the time you reach step 20, you should have a smokin qmail installation of qmail blazing away on your server.For a quick look at what this installation will provide you with, click here. Before You Start! - When installing qmail, I would STRONGLY reccomend that you first conduct a test installation on a test server if you have one available. I cannot stress this enough. If youre new to qmail, chances are you will probably screw the install up the first time through. Do yourself a favor and screw up on a test server that has no importance to you! I had to learn this the hard way. ;)Part 1 - Download All the Needed Items for the Qmail installationPart 2 - Installing qmail itselfPart 3 - Installing EZmlm and EZmlm-idxPart 4 - Installing Qmail-AutoresponderPart 5 - Installing VpopmailPart 6 - Installing VQadminPart 7 - Installing maildrop Part 8 - Installing QmailAdminPart 9 - Finalizing the qmail installationPart 10 - Uninstalling Sendmail Part 11 - Starting up qmailPart 12 - Installing Courier imap/imaps with courierpassd Part 13 - Installation of the Squirrelmail web mail programPart 14 - Installing Clam Antivirus & SpamAssassin Part 15 - Installing qmail-scanner w/qms-analog Part 16 - Installing Qmailanalog w/qlogtools & qms-analog Part 17 - Installing QtrapPart 18 - Maintaining your qmail serverPart 19 - Mail client configuration Part 20 - FeedbackPart 1 - Download the SoftwareThe first thing youll need to do to get started is to download all the needed software packages for the entire qmail installation process. To make things easier for everyone, Ive combined all the needed packages into 1 giant tarball (.tar.gz) bundle that you can download in one easy step. All of the included packages are the latest versions as of March, 2005 (there are a few intentional exceptions) and I will make efforts keep the software bundle up to date as new versions are released. If your going to be using the Qmailrocks installation guide to install qmail, I would strongly reccomend that you download my software bundle. Ive included several ready-made scripts and so forth, so everything will make more sense if youre on the same page as I am when going through the install.So lets start the installation by getting the needed software. You will notice that below I create a new directory called /downloads and I place the Qmailrocks tarball in that directory before unpacking it. I would strongly reccomend you do this as the rest of the instructions on this site are geared toward this source directory structure. Anyway, lets get down to business.mkdir /downloadscd /downloadsNow download the Q software bundle. The command below will download the bundle from the main server in Texas, USA. You can also download the bundle from a qmailrocks mirror site, if you wish) wget /downloads/qmailrocks.tar.gz(Alternatively, if youd like to download individual packages or view a listing of all the packages, you may do so right here.)Once youve downloaded qmailrocks.tar.gz, were going to place in a directory called downloads and then unpack it.tar zxvf qmailrocks.tar.gzProceed to Part 2 Part 2 - Installing Qmail ItselfNow that youve downloaded all the needed packages, we can start the install. At this point you should have a qmailrocks source directory located at /downloads/qmailrocks. If you dont, go back to step 1.To start things off, Ive created a handy little shell script that takes care of the first portion of getting qmail, ucspi-tcp and daemontools intalled. Simply run this script from the command prompt of your Solaris box and you should be golden. The script will tell you what its doing along the way./downloads/qmailrocks/scripts/install/qmr_install_freebsd-s1.script (click here to view this script)If all goes well, you should have all the needed user and groups created as well as all the needed directories, permissions and ownership settings needed for the installation of qmail, ucspi-tcp and daemontoolsLastly, we apply 3 patches to qmail before we compile it. Ive included a handy little script to apply all 3 patches at once. The 3 patches we are going to apply are: 1) The standard qmail-1.03 patch 2) The qmailqueue patch to enable the use of qmail-scanner later in this installation and 3) The auth-jms1.4a patch to enable SMTP authentication. Please note that if you downloaded the qmailrocks.tar.gz package before February 15th, 2004, you will need to download it again as the script below is a new feature in the qmailrocks package as of this date.So lets patch qmail./downloads/qmailrocks/scripts/util/qmail_patches.script (click here to view this script)Now we build Qmail.cd /usr/src/qmail/qmail-1.03make manmake setup check./config-fast your_fqdn_hostname (ex: ./config-fast )If there are no errors, Qmail has been built successfully!Now we build ucspi-tcp.cd /usr/src/qmail/ucspi-tcp-0.88/make make setup checkIf you dont get any errors, thats it for ucspi-tcp!Now we build the daemontools.cd /package/admin/daemontools-0.76package/installIf no errors are reported, youve successfully compiled the daemontools package!Note: You may notice that after you install daemontools, the install script will tell you to reboot your server in order to start the svcscan service. Take this advise and reboot your server now. rebootWhen your server comes back online, a ps -aux command should reveal that the daemontools svcscan service is now running. Woohoo!OK, Qmail is almost totally installed but were going to pause right here and install a bunch of handy tools and features that will make Qmail pretty and fun! After that, well make some final changes to Qmail and then crank it up!Proceed to Part 3 Part 3 - EZmlmEZmlm is a nice mailing list add-on to Qmail. Ive used it several times myself and its actually one of the better mailing list programs out there. When we install Qmailadmin later on, youll see that EZmlm integrates seamlessly into Qmailadmin to provide a very user friendly mailing list management interface. As an added bonus, Vpopmail (which we will install as well) will let you control what users can and cannot use mailing lists! Cant beat that!So lets install it.cd /downloads/qmailrocks/tar zxvf ezmlm-0.53-idx-0.41.tar.gzcd ezmlm-0.53-idx-0.41makemake setupIf you dont get any errors, then ezmlm is all set up and ready to go!Proceed to Part 4 Part 4 - AutoresponderQmail-Autoresponder does exactly what you think it does. It allows us to set up autoresponders for mailboxes and so forth. Ive pre-compiled a FreeBSD package that should make the install a breeze. If you dont want to use the package Ive got, you can always install Qmail-autoresponder from the FreeBSD ports collections. However, my package was made directly from the ports collection, so there should be no difference.So lets install it.The easiest way to install qmail-autoresponder is to use the FreeBSD package management tool.pkg_add -r autorespondif unable to fetch 按下面的方法安装:cd /downloads/qmailrockspkg_add qmail-autoresponder-0.96.1.tbzWow, that was easy. If you dont get any errors, then qmail-autoresponder is all set up and ready to go!Proceed to Part 5 Part 5 - Vpopmail w/mysql Vpopmail is one of the major components of this installation. Vpopmail allows us to do virtual domain mail hosting. Its got a lot of built in tools and features that make it a dream to work with. Even if you dont want to host mail for multiple domains, I would still recommend installing Vpopmail. It just makes the whole mail game easier. Plus, my installation centers around it, so if you dont install it youre going to have a headache.This page details the configuration and installation of vpopmail with MySQL functionality. When used with mysql, all domain information (domain name, email users, passwords etc.) are all stored in a handy mysql database. The actual mail messages are NOT stored in the database and are still kept in the same areas as a standard vpopmail build. I would not recommend integrating mysql into vpopmail if youre only going to be hosting a few domains on your email server, but if you plan on hosting great numbers of domains then the mysql component is a practical solution. It also makes it easy to port your mail server to another machine if you ever have to upgrade or recover from a crash. A note for NEWBIES: If you are a newbie to qmail and especially to mysql, I would strongly recommend that you NOT mess with this section and that you simply install a standard build of vpopmail. Im not going to hold your hand on how to install mysql, how to configure mysql and how to administer a mysql server. You should only proceed with this section is you are very comfortable with mysql. I will ignore any and all newbie related questions to this section. In general, on a linux build, you will want to have both mysql-server and mysql-devel installed (along with any dependencies), but thats all lm gonna say on the matter. So lets install it.If you recall, we already created a vpopmail system user and a vchkpw system group in step 2 when all the needed users and groups were created. So, now we will set up the vpopmail mysql connection config file under the vpopmail users home directory.mkdir /usr/home/vpopmail/etc chown vpopmail:vchkpw /usr/home/vpopmail/etc Obviously, you will want to substitute in your own vpopmail username and password below. You can make the username and password anything you wish. echo localhost|0|vpopmailuser|password|vpopmail /usr/home/vpopmail/etc/vpopmail.mysqlNow we set the proper ownership/permissions on the new mysql connection config file. chown vpopmail:vchkpw /usr/home/vpopmail/etc/vpopmail.mysql chmod 640 /usr/home/vpopmail/etc/vpopmail.mysql The next step is to log into your mysql server as the root mysql user and create the vpopmail database as well as a vpopmail user with proper rights on that new database. mysql -u root -pEnter your mysql servers root password when prompted.And now we create the new vpopmail database.CREATE DATABASE vpopmail; And we create a vpopmail user that will have access to that database.The username and password that you create here MUST match the information that you entered in the config file above. GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmailuserlocalhost IDENTIFIED BY password; And now lets quit.quitAnd lets test the new user we just created.mysql -u vpopmailuser -pEnter the vpopmail users password when prompted. If you get in, youre golden. If you are denied access, you screwed up. Go back and repeat the above steps.Ok, so that does it for the mysql setup portion. Now lets configure vpopmail to actually user the mysql functionality and then install it.cd /downloads/qmailrocks tar zxvf vpopmail-5.4.13.tar.gz cd vpopmail-5.4.13./configure -enable-logging=p -enable-auth-module=mysql -disable-passwd -enable-clear-passwd -disable-many-domains -enable-auth-logging -enable-sql-logging -enable-valias -disable-mysql-limitsmake & make install-stripIf you dont get any errors, then Vpopmail is good to go! Further ahead in the installation, well create domains under vpopmail. At that time, if you wish, you can log back into mysql and confirm that the mysql entries have been created for the domain(s) you add.Wait! Im getting an error! What do I do?If you are using GCC version 3.x, you may get a compilation error similar to this:In file included from vconvert.c:35:vmysql.h:53:22: missing terminating charactervmysql.h:60:35: missing terminating charactermake2: * vconvert.o Error 1If you get this error, you will need to apply a patch to Vpopmail:patch /downloads/qmailrocks/patches/vmysql.patchOnce youve applied the patch, try running make and make install again and you should be ok.So now lets go on to part 6.Proceed to Part 6 Part 6 - VqadminVqadmin is simply a nice web based interface that will let us manage Vpopmail. Through the interface we can create new domains, new users, net quotas, enable services and much more.So lets install it.cd /downloads/qmailrockstar zxvf vqadmin-2.3.6.tar.gzcd vqadmin-2.3.6./configure -enable-cgibindir=/path/to/your/cgi-bin -enable-htmldir=/path/to/your/html/directory./configure -enable-cgibindir=/usr/local/www/apache22/cgi-bin -enable-htmldir=/usr/local/www/apache22/data(Example: ./configure -enable-cgibindir=/usr/local/www/cgi-bin -enable-htmldir=/usr/local/www/html )make & make install-stripIf the installation is successfull, Vqadmin should install itself in the cgi-bin directory of your default website. Unless you tell it otherwise, that usually defaults to /var/www/cgi-bin. You can specify another location in the ./configure command above.Now you will need to add the following to your servers Apache configuration file (usually called httpd.conf) deny from allOptions ExecCGIAllowOverride AuthConfigOrder deny,allowdeny from allOptions ExecCGIAllowOverride AuthConfigOrder deny,allowcd /path/to/your/cgi-bin/vqadminNow you will want to create a .htaccess file to password protect the Vqadmin interface. There should already be a .htaccess file in the vqadmin directory, so all you need to do is configure it.vi .htaccess AuthType BasicAuthUserFile /path/to/where/you/want/to/store/the/password/file/.htpasswdAuthName vQadminrequire valid-usersatisfy anychown www .htaccess (you may need to change the chown to either nobody, apache or www etc., depending on what user your installation of Apache is running as)chmod 644 .htaccessNow you need to create a corresponding .htpasswd file thats going to contain the username and encrypted password for the Vqadmin administrator.htpasswd -bc /path/to/where/you/want/to/store/the/password/file/.htpasswd admin admin_passwordhtpasswd -bc /usr/local/www/apache22/cgi-bin/vqadmin/vqadmin.passwd admin adminchmod 644 /path/to/where/you/want/to/store/the/password/file/.htpasswdchmod 644 /usr/local/www/apache22/cgi-bin/vqadmin/vqadmin.passwdQuestion: But what if I want to user another username other than admin?Answer: You will notice that in the above line, Im adding an admin user called admin. The name of the user needs to be admin because that is the username which Vqadmin sets up by default to have full admin rights. If you want to use a username other than admin, you will need to edit the /cgi-bin/vqadmin/vqadmin.acl file and add your custom user to that file along with whatever rights you want it to have. Within that file, you will see where the user called admin is already set up to have all rights. That line looks like this:admin VIMUDCA admin1userIn this line, the admin part specifies the username, the VIMUDCA part specifies that users rights (a chart of all the possible rights is right above this line), and the admin1user part specifies the common name for the user which will be displayed when you log into Vqadmin. The common name is purely for aesthetic purposes.Now restart Apache.apachectl stopapachectl startIf all has gone well, you should now be able to browse (in your web browser) to:/cgi-bin/vqadmin/vqadmin.cgi 记住! 在创建域的时候就规定每个用户的邮箱大小!Note: make sure you include vqadmin.cgi in the path or you will get a 403 forbidden error!Enter the user admin and whatever password your assigned it. You should now see the Vqadmin interface. Go ahead and add a new domain to your server! Pretty cool, huh? The postmaster user serves as the admin user for any new domain and we will use it to log into Qmailadmin, when we install that. As soon as we complete the install, that domain will be instantly able to get mail (assuming the MX is correctly pointing to your server). The nice thing about Vpopmail and Vqadmin is that you do not need to restart anything after you add a domain. Once you add it, it simply works! Troubleshooting Vqadmin If you have tried to install Vqadmin and are having a problem of some sort getting it working, the best advice is usually just to remove it and start over. Chances are that you missed a step somewhere and/or screwed something up. Simple remove the vqadmin folder from the cgi-bin directory, re-unpack the tarball and start the install over. If you have tried reinstalling Vqadmin and still cant get results, you should also pay close attention to your Apache configuration. Check the httpd.conf entries shown above and make sure they are correct. Also, make sure that Apache is correctly configured to handle perl scripts and allow for the execution of perl scripts in the proper directories.If youve got Vqadmin running, lets go to step 7. Proceed to Part 7 Part 7 - MaildropMaildrop is a mail filtering agent which can be used to filter messages as they arrive on the server.Lets install it.cd /downloads/qmailrockstar zxvf maildrop-1.6.3.tar.gz cd maildrop-1.6.3./configure -prefix=/usr/local -exec-prefix=/usr/local -enable-maildrop-uid=root -enable-maildrop-gid=vchkpw -enable-maildirquotamake & make install-strip & make install-manIf you didnt get any errors, maildrop should be all set!Proceed to Part 8 Part 8 - QmailadminQmailadmin is going to provide us with a nice web based interface for
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 自主创新战略合作协议的重心
- 2025国家电网电力安全事故警示教育考试及答案
- 2026年中考语文热点备考方向 新国潮新中式(含答案)
- 2024河南省偃师市中考数学题库及参考答案详解(综合题)
- 2024自考专业(工商企业管理)真题标准卷附答案详解
- 2024-2025学年度社区工作人员试题附完整答案详解(典优)
- 医师定期考核考试彩蛋押题含答案详解(A卷)
- 2024临床执业医师模考模拟试题及完整答案详解【历年真题】
- 2024年注册公用设备工程师模考模拟试题及参考答案详解【夺分金卷】
- 注册公用设备工程师考前冲刺测试卷含答案详解【黄金题型】
- 塑造五种心态培训课件4
- 《印刷工艺》课件 4 印后加工
- 乳腺健康培训课件
- EPC工程总承包项目部人员岗位职责
- 物业6S目视化管理
- 2024年中国创新方法大赛考试题库(含答案)
- 产能提升改善报告
- 形成性评价指导性规范:SOAP病例汇报评价
- 《召公谏厉王弭谤》详细课件
- 高等数学教材(文科)
- 歌词:半生雪(学生版)
评论
0/150
提交评论