CentOS 6 mail Server 設定 (三) openwebmail 安裝

安裝  OpenWebmail

官方網站 http://www.openwebmail.org

版本是openwebmail 2.53

在官網上下載有關於openwebmail的套件如下

openwebmail-2.53-1.i386.rpm
openwebmail-2.53-2.i386.rpm
openwebmail-2.53-3.i386.rpm

openwebmail-data-2.53-1.i386.rpm
openwebmail-data-2.53-2.i386.rpm
openwebmail-data-2.53-3.i386.rpm

安裝所需套件利用Yum 安裝

yum install perl-suidperl perl-Compress-Zlib perl-Text-Iconv

安裝openwebmail

rpm -ivh –force – -nodeps openwebmail-*

rpm -ivh –force – -nodeps openwebmail-data-*

設定 openwebmail

修改  /var/www/cgi-bin/openwebmail/etc/dbm.conf

dbm_ext  .pag
dbmopen_ext  none
dbmopen_haslock  no

修改 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

domainnames  pmail.idv.tw ( 修改為自己的domain name)

default_iconset  Cool3D.Chinese.Traditional (讓openwebmail 介面ICOM 變成中文的)

修改 /var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf

smtpserver 192.168.1.5 (修該為子己的smtp IP位址)

初始化openwebmail

下達只令 /var/www/cgi-bin/openwebmail/openwebmail-tool.pl –init

最後會問你要不要傳 report

Send the site report?(Y/n) y 選y即可

啟動 Apache server –>  service httpd start

openwebmail 連線位址  http://yourdomain or  ip /cgi-bin/openwebmail/openwebmail.pl

簡化登openwebmail 登入網址的長度

在openwebmail 2.53 若是以rpm安裝方式就不須手動在 /etc/httpd/conf/httpd.conf 加入

ScriptAlias /webmail /var/www/cgi-bin/openwebmail/openwebmail.pl

因rpm安裝時就會自動再 /etc/httpd/conf.d 目錄下面產生 openwebmail.conf 裡面就已包含簡化的設定

重新啟動Apache 服務 service httpd restart

設定 Aapche 開機自動啟動 chkconfig httpd on

連線位址就變成  http://yourdomain or  ip /webmail

PS:

1. 之前dbm.cof  設定如下

dbm_ext  .db
dbmopen_ext  .db
dbmopen_haslock  yes

此次我在CentOS 6 設定時他出現訊息要我換成

dbm_ext  .pag
dbmopen_ext   none
dbmopen_haslock   no

這樣他才讓我順利初始化openwebmail

2. 如果在http log 中有出現下列的error 訊息

Can’t locate CGI.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5) at /var/www/cgi-bin/openwebmail/openwebmail.pl line 32.

應該就是少安裝了 perl-CGI 套件

利用指令  yum install perl-CGI  安裝即可



本篇瀏覽人數: 9704
分類: Cent OS篇。這篇內容的永久連結

在〈CentOS 6 mail Server 設定 (三) openwebmail 安裝〉中有 12 則留言

  1. Ringo表示:

    奇怪
    他要我 dbmopen_haslock no –>變做yes
    才可以
    執行指令
    /var/www/cgi-bin/openwebmail/openwebmail-tool.pl –init

    我調整成yes了,將來會出現什麼大問題嗎??

  2. Ringo表示:

    呃~ 文章末 有說明是centos 6

    我是5.8呢

    5.8 要yes 才能繼續運行-_-~

    不過已經設定好了

    • 榮哥表示:

      您好

      這個情況是當時我在安裝時出現的
      所以分享給大家,我相信您也知道
      Linux 總是會有些怪怪的問題 哈哈

      • Ringo表示:

        我目前的情況好奇怪
        之前是用squirrel mail 收發郵件都正常的
        但是因為不同時支援繁簡中文信件(語言,亂碼問題)
        所以轉成架設為open webmail
        本來是想架roundcube的…架到一頭霧水

        現在是,smtp 發信正常
        透過telnet / open webmail介面,皆可將信件寄出去
        馬上可以在 /home/收件者/Maildir/new 找的到
        但是透過open webmail 登入,收件匣 一直都沒看到信件
        其他(spam,trash 等資料夾皆為 0/0)

        我自己隱約察覺到,信件好像沒經過mailscanner 就寄了= =…

        很多教學都有提到
        postfix 先安裝, telnet 測試 , 之後postfix 保持開啓
        但之後安裝mailscanner, 都有指導使用者 chkconfig postfix off 去關掉 重開機啓動的功能

        但是就沒有提及到 mailscanner安裝之後,
        究竟是 只需要chkconfig postfix off ,還是更需要將postfix 整個關掉?
        因為mailscanner裡面也有postfix的incoming 和outgoing

        不知道自己錯在那裡…暈了

        • 榮哥表示:

          您好
          1.聽您的說明,您的郵件格式是使用maildir ,就我知道openwebmail 不支援maildir的格式喔
          我想這應該是您在openwebmail 看不到郵件的主因吧

          2.如果您是mailscanner + postfix , mailscanner 再啟動時會自動呼叫postfix,所以建議將postifx 設定開啟部啟動
          service postfix off 即可

  3. clemond表示:

    我照著榮哥的步驟做一遍的確成功裝起openwebmail 2.53,但我發現雖然我在openwebmail.conf中有設定default_language zh_TW.UTF-8,但使用者頭一次登入介面仍然是big5編碼,必須要進入使用者個人設定頁面將字集改為utf-8,之後登入才是utf-8.不知是否這是常態還是我那裏沒設定好?謝謝!

  4. jiing0819表示:

    大大您好,請問一下,依照教學文安裝完畢,輸入網址也有出現openwebmail登入畫面,可是會出現以下訊息,請問要如何修改呢?
    Not Found

    The requested URL /cgi-bin/openwebmail/openwebmail.pl was not found on this server.
    Apache/2.2.15 (CentOS) Server at 172.16.100.60 Port 80

    • 榮哥表示:

      您好

      請先看看您的apache log 的錯誤訊息

      • jiing0819表示:

        大大您好,錯誤訊息如下
        [Wed Nov 25 09:07:58 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
        [Wed Nov 25 09:07:58 2015] [notice] Digest: generating secret for digest authentication …
        [Wed Nov 25 09:07:58 2015] [notice] Digest: done
        [Wed Nov 25 09:07:58 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured — resuming normal operations
        [Wed Nov 25 09:07:58 2015] [warn] ./mod_dnssd.c: No services found to register
        [Wed Nov 25 09:09:20 2015] [notice] caught SIGTERM, shutting down
        [Wed Nov 25 09:09:20 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
        [Wed Nov 25 09:09:20 2015] [notice] Digest: generating secret for digest authentication …
        [Wed Nov 25 09:09:20 2015] [notice] Digest: done
        [Wed Nov 25 09:09:20 2015] [warn] ./mod_dnssd.c: No services found to register
        [Wed Nov 25 09:09:20 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured — resuming normal operations
        [Wed Nov 25 09:09:37 2015] [error] [client 172.16.100.60] File does not exist: /var/www/html/cgi-bin, referer: http://172.16.100.60/
        [Wed Nov 25 09:09:37 2015] [error] [client 172.16.100.60] File does not exist: /var/www/html/favicon.ico
        [Wed Nov 25 09:09:37 2015] [error] [client 172.16.100.60] File does not exist: /var/www/html/favicon.ico

發佈回覆給「jiing0819」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *