天天看点

fedora11 安装qmail

fedora11装qmail  附件为脚本内容

1.yum -y uptade

2. vi /etc/sysconfig/network

改为hostname=mail.example.com

3.vi /etc/hosts  

[root@mail ~]# vi /etc/hosts

127.0.0.1       localhost.localdomain   localhost

::1             localhost6.localdomain6 localhost6     

192.168.0.252   mail.example.com mail

4.getenforce 查看selinux状态将SELINUX=disabled 设置为关闭

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#       enforcing - SELinux security policy is enforced.

#       permissive - SELinux prints warnings instead of enforcing.

#       disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

#       targeted - Targeted processes are protected,

#       mls - Multi Level Security protection.

SELINUXTYPE=targeted

5.reboot

[root@mail ~]#  mkdir -p /usr/src/qtms-install

6.

[root@mail ~]# chmod +x fedora11-deps.sh

[root@mail qtms-install]# sh fedora11-deps.sh

以下为fedora12-deps.sh 脚本的内容:

rpm -e --nodeps sendmail

yum -y remove evolution

rpm -e --nodeps exim

yum -y install aspell autoconf automake automake17 bzip2 bzip2-devel compat-gcc-34 compat-gcc-34-c++ curl curl-devel expect expect-devel gcc gcc-c++ gdbm gdbm-devel gmp gmp-devel httpd httpd-devel krb5-devel krb5-libs libidn libidn-devel libtool mysql mysql-devel mysql-server mrtg openssh openssh-clients openssh-server openssl openssl-devel pcre pcre-devel perl-Digest-HMAC perl-Digest-SHA1 perl-Net-DNS perl-CPAN perl-Net-DNS perl-Mail-SPF perl-IO-Zlib perl-Archive-Tar perl-libwww-perl php php-imap php-mysql php-pear redhat-rpm-config rpm-build rpm-devel rpm-libs rpm-python sed setup stunnel which libtool-ltdl libtool-ltdl-devel groff make diffutils perl-HTML-Parser pam-devel procmail ntp ncurses-devel

7.

[root@mail qtms-install]# chmod +x *.sh

vi fedora12-svcs.sh ---------修改MYSQLPW密码为example221

# Set mysql password

MYSQLPW=example221

8.vi firewall.sh------------修改IP地址为本机的192.168.0.60

## Set your IP address

MYIP="192.168.0.60"

9.

[root@mail ~]# sh fedora11-svcs.sh

10.我把安装包都下好放在 /usr/src/qtms-install下了所以可以直接执行下面的脚本

[root@mail qtms-install]# sh fedora_11-install-script.sh -----修改脚本中ARCH=i386为 ARCH=i686因为fedora12是i686, 如果是fedora11的话改为i586

Installing daemontools-toaster . . .

Shall we continue? (yes, skip, quit) [y]/s/q: ----------按回车

接下来都是按回车一直到最后

直到

Do you want to clean /root/rpmbuild/RPMS/* ?

Shall we continue? (yes, skip, quit) [y]/s/q: s

[root@mail qtms-install]# qmailctl stat--------------------------------启动

authlib: unable to open supervise/ok: file does not exist

clamd: unable to open supervise/ok: file does not exist

imap4: unable to open supervise/ok: file does not exist

imap4-ssl: unable to open supervise/ok: file does not exist

pop3: unable to open supervise/ok: file does not exist

pop3-ssl: unable to open supervise/ok: file does not exist

send: unable to open supervise/ok: file does not exist

smtp: unable to open supervise/ok: file does not exist

spamd: unable to open supervise/ok: file does not exist

submission: unable to open supervise/ok: file does not exist

authlib/log: unable to open supervise/ok: file does not exist

clamd/log: unable to open supervise/ok: file does not exist

imap4/log: unable to open supervise/ok: file does not exist

imap4-ssl/log: unable to open supervise/ok: file does not exist

pop3/log: unable to open supervise/ok: file does not exist

pop3-ssl/log: unable to open supervise/ok: file does not exist

send/log: unable to open supervise/ok: file does not exist

smtp/log: unable to open supervise/ok: file does not exist

spamd/log: unable to open supervise/ok: file does not exist

submission/log: unable to open supervise/ok: file does not exist

[root@mail qtms-install]# qmailctl start

Starting qmail-toaster: svscan.

[root@mail qtms-install]# qmailctl stat

authlib: up (pid 32435) 21 seconds

clamd: up (pid 32393) 21 seconds

imap4: up (pid 32429) 21 seconds

imap4-ssl: up (pid 32387) 21 seconds

pop3: up (pid 32440) 21 seconds

pop3-ssl: up (pid 32396) 21 seconds

send: up (pid 32404) 21 seconds

smtp: up (pid 32424) 21 seconds

spamd: up (pid 32432) 21 seconds

submission: up (pid 32433) 21 seconds

authlib/log: up (pid 32426) 21 seconds

clamd/log: up (pid 32399) 21 seconds

imap4/log: up (pid 32441) 21 seconds

imap4-ssl/log: up (pid 32389) 21 seconds

pop3/log: up (pid 32446) 21 seconds

pop3-ssl/log: up (pid 32401) 21 seconds

send/log: up (pid 32408) 21 seconds

smtp/log: up (pid 32428) 21 seconds

spamd/log: up (pid 32425) 21 seconds

submission/log: up (pid 32434) 21 seconds

[root@mail qtms-install]# qmailctl queue

messages in queue: 4

messages in queue but not yet preprocessed: 0

5 Jan 2010 00:30:47 GMT  #40094  1659  <[email protected]>

        remote  [email protected]

5 Jan 2010 00:30:47 GMT  #41983  1124  <[email protected]>

5 Jan 2010 00:30:47 GMT  #39871  1659  <[email protected]>

5 Jan 2010 00:30:47 GMT  #41439  1657  <[email protected]>

[root@mail control]# cat smtpgreeting

mail.foxitsoftware.com - Welcome to Qmail Toaster Ver. 1.3 SMTP Server

继续阅读