postfix--benet3--编译安装webmail
编译安装webmail
[root@mail benet]# rpm -qa | grep httpd
httpd-2.2.15-29.el6.centos.x86_64
httpd-manual-2.2.15-29.el6.centos.noarch
httpd-tools-2.2.15-29.el6.centos.x86_64
[root@mail benet]# tar jxf squirrelmail-1.4.13.tar.bz2 -C /var/www/html/
[root@mail benet]# cd /var/www/html/
[root@mail html]# mv squirrelmail-1.4.13 webmail
[root@mail html]# cd webmail
[root@mail webmail]# tar jxf /benet/zh_CN-1.4.13-20071220.tar.bz2
[root@mail webmail]#
创建及调整数据目录、附件目录 79
[root@mail webmail]# mkdir -p attach data
[root@mail webmail]# chown -R daemon:daemon attach/ data/
[root@mail webmail]# chmod 730 attach/
[root@mail webmail]#
建立并调整 config.php 配置文件
需要更改的配置文件
$squirrelmail_default_language = 'zh_CN';
$default_charset = 'zh_CN.UTF-8';
$domain = 'benet.com';
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$imap_server_type = 'dovecot';
$imapPort = 143;
$data_dir = '/var/www/html/webmail/data/';
$attachment_dir = '/var/www/html/webmail/attach/';
更改配置文件后查看
[root@mail webmail]# cat config/config.php | grep -v "#" | grep -v "^$" | grep -v "*" | grep -v "theme"
<?php
global $version;
global $config_version;
$config_version = '1.4.0';
$org_name = "SquirrelMail";
$org_logo = SM_PATH . 'images/sm_logo.png';
$org_logo_width = '308';
$org_logo_height = '111';
$org_title = "SquirrelMail $version";
$signout_page = '';
$frame_top = '_top';
$provider_name = 'SquirrelMail';
$provider_uri = 'http://www.squirrelmail.org/';
$domain = 'benet.com';
$invert_time = false;
$useSendmail = false;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$encode_header_key = '';
$sendmail_path = '/usr/sbin/sendmail';
$sendmail_args = '-i -t';
$imapServerAddress = 'localhost';
$imapPort = 143;
$imap_server_type = 'dovecot';
$use_imap_tls = false;
$use_smtp_tls = false;
$smtp_auth_mech = 'none';
$smtp_sitewide_user = '';
$smtp_sitewide_pass = '';
$imap_auth_mech = 'login';
$optional_delimiter = 'detect';
$pop_before_smtp = false;
$default_folder_prefix = '';
$show_prefix_option = false;
$default_move_to_trash = true;
$default_move_to_sent = true;
$default_save_as_draft = true;
$trash_folder = 'INBOX.Trash';
$sent_folder = 'INBOX.Sent';
$draft_folder = 'INBOX.Drafts';
$auto_expunge = true;
$delete_folder = false;
$use_special_folder_color = true;
$auto_create_special = true;
$list_special_folders_first = true;
$default_sub_of_inbox = true;
$show_contain_subfolders_option = false;
$default_unseen_notify = 2;
$default_unseen_type = 1;
$noselect_fix_enable = false;
$data_dir = '/var/www/html/webmail/data/';
$attachment_dir = '/var/www/html/webmail/attach/';
$dir_hash_level = 0;
$default_left_size = '150';
$force_username_lowercase = false;
$default_use_priority = true;
$hide_sm_attributions = false;
$default_use_mdn = true;
$edit_identity = true;
$edit_name = true;
$hide_auth_header = false;
$allow_thread_sort = false;
$allow_server_sort = false;
$allow_charset_search = true;
$uid_support = true;
$session_name = 'SQMSESSID';
$config_location_base = '';
// Add your ldap server options here
$default_use_javascript_addr_book = false;
$abook_global_file = '';
$abook_global_file_writeable = false;
$abook_global_file_listing = true;
$abook_file_line_length = 2048;
$motd = "";
// Add list of enabled plugins here
$addrbook_dsn = '';
$addrbook_table = 'address';
$prefs_dsn = '';
$prefs_table = 'userprefs';
$prefs_key_field = 'prefkey';
$prefs_user_field = 'user';
$prefs_val_field = 'prefval';
$addrbook_global_dsn = '';
$addrbook_global_table = 'global_abook';
$addrbook_global_writeable = false;
$addrbook_global_listing = false;
$squirrelmail_default_language = 'zh_CN';
$default_charset = 'zh_CN.UTF-8';
$lossy_encoding = false;
$no_list_for_subscribe = false;
$config_use_color = 2;
@include SM_PATH . 'config/config_local.php';
[root@mail config]# service httpd status
httpd is stopped
[root@mail config]# service httpd start
Starting httpd: [ OK ]
[root@mail config]#
[root@mail webmail]# getenforce
Enforcing
[root@mail webmail]# setenforce 0
更改data attach权限
[root@mail webmail]# chmod 777 -R data attach
[root@mail webmail]# ls -l
total 252
drwxrwxrwx. 2 daemon daemon 4096 Jul 23 01:12 attach
-rw-r--r--. 1 1000 users 8289 Jun 26 2007 AUTHORS
-rw-r--r--. 1 1000 users 83531 Dec 15 2007 ChangeLog
-rw-r--r--. 1 1000 1000 10011 Dec 20 2007 ChangeLog.locales
drwxr-xr-x. 5 1000 users 4096 Dec 15 2007 class
drwxrwxr-x. 2 1000 users 4096 Jul 23 03:04 config
-rwxr-xr-x. 1 1000 users 102 Aug 3 2005 configure
drwxr-xr-x. 3 1000 users 4096 Dec 15 2007 contrib
-rw-r--r--. 1 1000 users 15228 Sep 12 2005 COPYING
-rw-r--r--. 1 1000 1000 15129 Dec 20 2007 COPYING.locales
drwxrwxrwx. 2 daemon daemon 4096 Dec 15 2007 data
drwxr-xr-x. 3 1000 users 4096 Dec 15 2007 doc
drwxr-xr-x. 4 1000 users 4096 Dec 15 2007 functions
drwxr-xr-x. 4 1000 users 4096 Jul 23 01:11 help
drwxr-xr-x. 2 1000 users 4096 Dec 15 2007 images
drwxr-xr-x. 3 1000 users 4096 Dec 15 2007 include
-rw-r--r--. 1 1000 users 672 Jan 14 2007 index.php
-rwxr-xr-x. 1 1000 1000 221 Dec 20 2007 install
-rw-r--r--. 1 1000 users 8810 Jul 17 2007 INSTALL
drwxr-xr-x. 3 1000 users 4096 Jul 23 01:11 locale
drwxr-xr-x. 20 1000 users 4096 Dec 15 2007 plugins
drwxr-xr-x. 2 1000 users 4096 Dec 15 2007 po
-rw-r--r--. 1 1000 users 3214 May 31 2007 README
-rw-r--r--. 1 1000 users 4141 Dec 15 2007 ReleaseNotes
-rw-r--r--. 1 1000 1000 2092 Dec 20 2007 ReleaseNotes.locales
drwxr-xr-x. 2 1000 users 4096 Dec 15 2007 src
drwxr-xr-x. 3 1000 users 4096 Dec 15 2007 themes
-rw-r--r--. 1 1000 users 4718 Jul 17 2007 UPGRADE
-rw-r--r--. 1 1000 1000 22 Dec 20 2007 version
更改data、attach的权限后可以正常登陆