Horde (Webmail)
*******************************************************************************
Instalar e Configurar o Horde
Criado por: Alessandro C. M. Kuramoto
Data: 27/08/2010
Modificado em: 29/08/2010-16:10
v.20100829-1610
Palavras-chaves: Horde, Webmail, Groupware
Keywords: Horde, Webmail, Groupware
If you want to know something about this file, send an e-mail to me at the
sancmk@gmail.com or post a comment here (at the Word Press)
moshi kono fairu no koto wo shiteitakatara, boku ni email wo okutte kudasai,
matawa kono Word Press ni chuushaku mo shitte ii desu.
boku no email wa sancmk@gmail.com desu
Por favor, matenham o nome do autor deste arquivo.
*******************************************************************************
###############################################################################
# Avisos!!!
###############################################################################
http://memovirtual.worpress.com
## Atenção no site memovirtual:
## As opções passadas com – - (menos,menos) no site podem ter ficado
## com um — (travessão), assim use o “man” para confirmar a opção utilizada
## Desculpem-me pelos erros de português, mas vocês sabem…
## nossa lingua é fácil
… e às vezes ao escrever o pensamento está
## lá na frente, enquanto que a digitação…
|##########^ Avisos!!! #######################################################|
###############################################################################
# Temp:
###############################################################################
VER:
If your IMAP server is not on the server where is installed Horde, you need to edit the IMP configuration:
VER:
http://lists.horde.org/archives/ingo/Week-of-Mon-20050912/000926.html
|##########^ Temp ############################################################|
###############################################################################
# Servidor:
###############################################################################
|##########^ Servidor ########################################################|
###############################################################################
# Conceitos:
###############################################################################
>Conceitos
-
|##########^ Conceitos #######################################################|
###############################################################################
# Instalando:
###############################################################################
>Instalando
#### Neste tópico, temos:
#>>>>>Instalando o Horde no Red Hat 5.5
|<<<<<<<<<<<<<< #### Instalando ####
===============================================================================
Instalando o Horde no Red Hat 5.5:
===============================================================================
|<<<<<<<<<<<<<< #### Instalando #### ====Instalando o Horde no Red Hat 5.5 ====
(Fonte: http://wiki.horde.org/CentOS5InstallationNotes?referrer=HowTo#)
#### Preparação do Ambiente:
### Para configurar as interfaces de rede:
system-config-network-tui
service network restart
|<<<<<<<<<<<<<< #### Instalando #### ====Instalando o Horde no Red Hat 5.5 ====
### Para alterar o nome da máquina:
vim /etc/sysconfig/network
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/sysconfig/network (Permissões: )
—————————————————————————-
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=horde.dominio.net.br
|———-^ /etc/sysconfig/network ——————————————|
|<<<<<<<<<<<<<< #### Instalando #### ====Instalando o Horde no Red Hat 5.5 ====
### Para adicionar os nomes no arquivo de hosts:
vim /etc/hosts
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/hosts (Permissões: )
—————————————————————————-
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.56.62 horde.dominio.net.br horde
::1 localhost6.localdomain6 localhost6
|———-^ /etc/hosts ——————————————————|
### Reiniciar a máquina:
init 6
|<<<<<<<<<<<<<< #### Instalando #### ====Instalando o Horde no Red Hat 5.5 ====
### Para manter os pacotes instalados em cache: (Opcional)
vim /etc/yum.conf
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/yum.conf (Permissões: )
—————————————————————————-
[main]
cachedir=/var/cache/yum
### Para manter em cache os pacotes baixado, colocar o keepcache igual a 1:
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
…
..
.
|———-^ /etc/yum.conf —————————————————|
———
### Se necessário usar o CD-ROM como Repositório do YUM:
(Fonte: http://syiron.wordpress.com/2007/10/29/yum-install-package-from-cdrom/)
### Crie o diretório /mnt/cdrom: (Opcional)
mkdir /mnt/cdrom
### Coloque o DVD com os pacotes e use comando mount para montar:
mount /dev/cdrom /mnt/cdrom/
|<<<<<<<<<<<<< #### Instalando #### ==== Instalando o Horde no Red Hat 5.5 ====
### Entre no diretório /mnt/cdrom/Server:
cd /mnt/cdrom/Server/
### Instalar o pacote createrepo:
rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
### Entrar no diretório /mnt:
cd /mnt/
|<<<<<<<<<<<<< #### Instalando #### ==== Instalando o Horde no Red Hat 5.5 ====
### Executar o comando createrepo:
createrepo .
### Limpar a lista dos repositórios:
yum clean all
|<<<<<<<<<<<<< #### Instalando #### ==== Instalando o Horde no Red Hat 5.5 ====
### Criar o arquivo de configuração do repositório:
vim /etc/yum.repos.d/cdrom.repo
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/yum.repos.d/cdrom.repo (Permissões: )
—————————————————————————-
[MyCDROM-Repo]
name=MyCDROM-Repo
baseurl=file:///mnt
enabled=1
gpgcheck=0
|———-^ /etc/yum.repos.d/cdrom.repo ————————————-|
^—————-
|<<<<<<<<<<<<< #### Instalando #### ==== Instalando o Horde no Red Hat 5.5 ====
### Adicionar os seguintes repositórios adicionais (Observe que são
### pacotes para arquitetura de x86_64, para arquitetura x86 usar outro link)
##
## Obs.: Tente acessar pelo browser o site
## http://download.fedora.redhat.com/pub/epel/5Server/x86_64/ ou o
## correspondente para x86 e verifique a versão do epel-release
##
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
|<<<<<<<<<<<<< #### Instalando #### ==== Instalando o Horde no Red Hat 5.5 ====
### Instalando os pré-requisitos:
yum install -y gettext httpd mysql mysql-server dovecot postfix system-switch-mail perl
yum install -y php php-mysql php-xml php-imap php-mbstring php-mcrypt php-pecl-Fileinfo php-pecl-memcache php-pear-DB php-pear-File php-pear-Log php-pear-Mail-Mime php-pear-Auth-SASL php-pear-Date php-pear-HTTP-Request php-pear-Mail php-pear-Net-Sieve php-pear-Net-Socket php-pear-Net-SMTP php-pear-MDB2-Driver-mysql php-gd php-xmlrpc php-soap php-pecl-json
yum install -y php-pear-Date-Holidays
### if you want to install extra pecl modules – PS: use ‘pear install pecl/modulename
yum install -y openssl mod_ssl crypto-utils perl-Net-SSLeay
|<<<<<<<<<<<<< #### Instalando #### ==== Instalando o Horde no Red Hat 5.5 ====
|==========^ Instalando o Horde no Red Hat 5.5 ===============================|
|<<<<<<<<<<<<<< #### Instalando ####
|##########^ Instalando ######################################################|
###############################################################################
# Configurando o Postfix e Dovecot para o Horde:
###############################################################################
(Fonte: http://wiki.horde.org/CentOS5InstallationNotes?referrer=HowTo#)
### Parando o sendmail:
service sendmail stop
chkconfig sendmail off
### Definindo o postfix como MTA:
system-switch-mail
(select postfix)
|<<<<<<<<<<<<<< #### Configurando o Postfix e Dovecot para o Horde ####
### Configurando o Postfix:
postconf -e ‘home_mailbox = Maildir/’
|<<<<<<<<<<<<<< #### Configurando o Postfix e Dovecot para o Horde ####
### Configurando o Dovecote:
## Adicionar as seguinte linhas no final do arquivo /etc/dovecot.conf:
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/dovecot.conf (Permissões: )
—————————————————————————-
# to allow the creation of mail subfolders
mail_location = maildir:~/Maildir
# Enable IMAP protocol
protocols = imap
|———-^ /etc/dovecot.conf ———————————————–|
(Fonte 1: http://wiki.horde.org/CentOS5InstallationNotes?referrer=HowTo#)
(Fonte 2: http://bugs.centos.org/view.php?id=2651)
### If using CentOS x86_64, temporary fix for bug. Edit dovecot.conf file:
login_process_size = 64
|##########^ Configurando o Postfix e Dovecot para o Horde ###################|
###############################################################################
# Iniciando os Serviços:
###############################################################################
service httpd restart
chkconfig httpd on
service postfix restart
chkconfig postfix on
service dovecot restart
chkconfig dovecot on
service mysqld restart
chkconfig mysqld on
### Configure o MySQL com os seguintes comandos:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h horde.dominio.net.br password ‘new-password’
|##########^ Iniciando os Serviços ###########################################|
###############################################################################
# Download Horde Groupware Webmail Edition and extract it:
###############################################################################
tar xzvf horde-webmail-*.tar.gz -C /var/www/html/
mv -v /var/www/html/horde-*/ /var/www/html/horde/
|##########^ Download Horde Groupware Webmail Edition and extract it #########|
###############################################################################
# Configurando o MySQL para o Horde:
###############################################################################
|<<<<<<<<<<<<<< #### Configurando o MySQL para o Horde ####
vim /etc/my.cnf
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/my.cnf (Permissões: -rw-r–r– 1 root root)
—————————————————————————-
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
…
…
# (Fonte: http://wiki.horde.org/CentOS5InstallationNotes?referrer=HowTo#)
#>>>> Adicionado:
### As linhas abaixo foram adicionadas:
collation_server=utf8_general_ci
character_set_server=utf8
init_connect=”SET NAMES ‘utf8′”
…
…
…
# (Fonte: http://wiki.horde.org/CentOS5InstallationNotes?referrer=HowTo#)
#>>>> Adicionado:
[client]
default_character_set=utf8
|———-^ /etc/my.cnf —————————————————–|
### Entrar no diretório:
cd /var/www/html/horde/scripts
./setup.php
——————————————————————————-
What is the web root path on your web server for this installation, i.e. the path of the address you use to access Horde Groupware Webmail Edition in your browser? [/horde]
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 1
What database backend should we use? [false]
(false) [None]
(dbase) dBase
(ibase) Firebird/InterBase
(fbsql) Frontbase
(ifx) Informix
(msql) mSQL
(mssql) MS SQL Server
(mysql) MySQL
(mysqli) MySQL (mysqli)
(oci8) Oracle
(odbc) ODBC
(pgsql) PostgreSQL
(sqlite) SQLite
(sybase) Sybase
Type your choice: mysql
Request persistent connections? [0]
(1) Yes
(0) No
Type your choice:
Username to connect to the database as* [] horde
Password to connect with [] 12qwaszx
How should we connect to the database? [unix]
(unix) UNIX Sockets
(tcp) TCP/IP
Type your choice:
Location of UNIX socket [] /var/lib/mysql/mysql.sock
Database name to use* [] horde
Internally used charset* [utf-8]
Use SSL to connect to the server? [0]
(1) Yes
(0) No
Type your choice:
Certification Authority to use for SSL connections []
Split reads to a different server? [false]
(false) Disabled
(true) Enabled
Type your choice:
Writing main configuration file
Done configuring database settings.
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 2
Should we create the database for you? If yes, you need to provide a database
user that has permissions to create new databases on your system. If no, we
will only create the database tables for you. [y]
(y) Yes
(n) No
Type your choice:
Database superuser for creating the database if necessary for your database system: root
Specify a password for the database user: 12qwaszx
Loading database module…
Creating database…
[ OK ] Successfully created the database.
[ OK ] Successfully created the tables for Mail (imp).
[ OK ] Successfully created the tables for Filters (ingo).
[ OK ] Successfully created the tables for Address Book (turba).
[ OK ] Successfully created the tables for Calendar (kronolith).
[ OK ] Successfully created the tables for Tasks (nag).
[ OK ] Successfully created the tables for Notes (mnemo).
Should we build the database with METAR weather stations now? This is necessary if you want to display METAR weather information. Building the database requires a network connection. [y]
(y) Yes
(n) No
Type your choice:
Cannot find the location of your PHP CLI program. Please specify the full
path to your PHP CLI or hit Enter if PHP is in your path. [/usr/bin/php]
Creating METAR database…
Services_Weather: Sourcefile nsd_bbsss not found!
Services_Weather: Sourcefile nsd_cccc not found!
Done creating database.
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 3
Specify an existing mail user who you want to give administrator permissions (optional): administrator
Writing main configuration file
Done configuring administrator settings.
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 0
Thank you for using Horde Groupware Webmail Edition!
|—————————————————————————–|
vim /root/createuser-horde.mysql
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /root/createuser-horde.mysql (Permissões: )
—————————————————————————-
USE mysql;
REPLACE INTO user (host, user, password)
VALUES (
‘localhost’,
‘horde’,
– IMPORTANT: Change this password!
PASSWORD(‘password_for_mysql_horde_user’)
);
REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv, create_priv, drop_priv, index_priv)
VALUES (
‘localhost’,
‘horde’,
‘horde’,
‘Y’, ‘Y’, ‘Y’, ‘Y’,
‘Y’, ‘Y’, ‘Y’
);
– Make sure that priviliges are reloaded.
FLUSH PRIVILEGES;
|———-^ /root/createuser-horde.mysql ————————————|
|##########^ Configurando o MySQL para o Horde ###############################|
###############################################################################
# Configurando o Apache para o Horde:
###############################################################################
vim /etc/httpd/conf.d/horde.conf
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /etc/httpd/conf.d/horde.conf (Permissões: )
—————————————————————————-
#
# Horde
#
Alias /horde /var/www/html/horde
<Directory /var/www/html/horde>
# Uncomment the following 3 lines to make Horde locally accessible only
#Order Deny,Allow
#Deny from all
#Allow from 127.0.0.1
Options +FollowSymLinks
# horde.org’s recommended PHP settings:
php_admin_flag safe_mode off
php_admin_flag magic_quotes_runtime off
php_flag session.use_trans_sid off
php_flag session.auto_start off
php_admin_flag file_uploads on
# Optional – required for weather block in Horde to function
php_admin_flag allow_url_fopen on
# If horde dies while trying to handle large email file attachments,
# you are probably hitting PHP’s memory limit. Raise that limit here,
# but use caution
# Set to your preference – memory_limit should be at least 32M
# and be greater than the value set for post_max_size
#php_value memory_limit 32M
#php_value post_max_size 20M
#php_value upload_max_filesize 10M
# /usr/share/pear is needed for PEAR. /var/www/html/horde is needed for Horde itself
# TODO: Set an appropriate include_path, too. Might even increase speed a bit.
php_admin_value open_basedir “/var/www/html/horde:/var/www/html/horde/config:/usr/share/pear:/tmp”
php_admin_flag register_globals off
</Directory>
<Directory /var/www/html/horde/config>
Order Deny,Allow
Deny from all
</Directory>
# Deny access to files that are not served directly by the webserver
<DirectoryMatch “^/var/www/html/horde/(.*/)?(config|lib|locale|po|scripts|templates)/(.*)?”>
Order Deny,Allow
Deny from all
</DirectoryMatch>
# Deny access to the test.php files except from localhost
<LocationMatch “^/horde/(.*/)?test.php”>
Order Deny,Allow
Deny from all
#>>>> Linha comentada somente para acessar uma vez de outro computador:
# Allow from 127.0.0.1
#>>>> Linha adicionada:
Allow from all
</LocationMatch>
|———-^ /etc/httpd/conf.d/horde.conf ————————————|
chmod 0644 -v /etc/httpd/conf.d/horde.conf
service httpd restart
|##########^ Configurando o Apache para o Horde ##############################|
###############################################################################
# Verificando as Configurações:
###############################################################################
http://localhost.localdomain/horde/test.php
|##########^ Verificando as Configurações ####################################|
###############################################################################
# Configuração de Segurança:
###############################################################################
### Secure config files:
chown apache:root -R /var/www/html/horde/config
chown apache:root -R /var/www/html/horde/*/config
chmod -R go-rwx /var/www/html/horde/config
chmod -R go-rwx /var/www/html/horde/*/config
### Secure scripts:
chown -R root:root /var/www/html/horde/scripts
chown -R root:root /var/www/html/horde/*/scripts
chmod -R go-rwx /var/www/html/horde/scripts
chmod -R go-rwx /var/www/html/horde/*/scripts
### Secure test.php:
chmod a-rwx /var/www/html/horde/test.php
chmod a-rwx /var/www/html/horde/*/test.php
|##########^ Configuração de Segurança #######################################|
###############################################################################
# Configurando o Corretor Ortográfico para o Horde:
###############################################################################
(Fonte: http://www.revistaphp.com.br/print.php?id=198)
### Verificar se o aspell está instalado no Red Hat:
rpm -qa | grep aspell
## No resultado deverá aparece algo similar a:
aspell-0.60.3-7.1
### Para verificar se o aspell está com suporte ao idioma pt_BR (Português Brasileiro)
aspell -l pt_BR -a
## Se aparecer o erro abaixo, significa que o suporte ao idioma não está instalado:
Error: No word lists can be found for the language “pt_BR”.
### Para instalar o suporte ao idioma pt_BR (Portguês Brasileiro) siga os
### passos abaixo:
## Entre no endereço: ftp://ftp.gnu.org/gnu/aspell/dict/pt_BR/ e verifique
## qual é a última versão:
##
## Use o comando wget para baixar o arquivo com suporte ao idioma pt_BR:
wget -c ftp://ftp.gnu.org/gnu/aspell/dict/pt_BR/aspell6-pt_BR-20090702-0.tar.bz2
## Descompacte o arquivo baixado:
tar -xjvf aspell6-pt_BR-20080221-1.tar.bz2
## Mudar para o diretório aspell6-pt_BR-20090702-0
cd aspell6-pt_BR-20090702-0
## Rodar o script configure
./configure
## Instalar
make install
## Limpar os resquistos da instalação:
make clean
## Para testar crie um arquivo com palavras certas e outras erradas e teste:
aspell -l pt_BR -c teste.txt
|##########^ Configurando o Corretor Ortográfico para o Horde ################|
###############################################################################
# Gerenciando o Horde:
###############################################################################
===============================================================================
Alterar o Idioma do Horde:
===============================================================================
Q) How to change the default language?
(Fonte: http://lists.horde.org/archives/i18n/Week-of-Mon-20050321/001810.html)
### Para alterar o idioma padrão do Horde:
vim /var/www/html/horde/config/nls.php
_______________________________________________________________________________
SO: Red Hat 5.5
Arquivo: /var/www/html/horde/config/nls.php (Permissões: )
—————————————————————————-
/* The language to fall back on if we cannot determine one any other
way (user choice or preferences). If empty, we will try to negotiate
with the browser using HTTP_ACCEPT_LANGUAGE. */
/*>>>> Linha comentada:
$nls['defaults']['language'] = ”; */
/*>>>> Linha modificada:
### Para colocar no idioma no português do Brasil: */
$nls['defaults']['language'] = ‘pt_BR’;
|———-^ /var/www/html/horde/config/nls.php ——————————|
|==========^ Alterar o Idioma do Horde =======================================|
|##########^ Gerenciando o Horde #############################################|
###############################################################################
# Usando o Horde:
###############################################################################
Fonte:
http://www.emporiohightech.com.br/suporte/knowledgebase/webmail-horde.html
===============================================================================
Q) Como criar uma tarefa?
===============================================================================
Organizing >
|==========^ Como criar uma tarefa? ==========================================|
|##########^ Usando o Horde ##################################################|
###############################################################################
# Testes:
###############################################################################
>Testes
|<<<<<<<<<<<<<< #### Testes ####
|##########^ Testes ##########################################################|
###############################################################################
# Troubleshooting
###############################################################################
>Troubleshooting
|<<<<<<<<<<<<<< #### Troubleshooting ####
——————————————————————————-
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
Ao tentar instalar o pacote do epel aparece mensagem de erro.
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
Ao executar o comando abaixo aparece mensagem de erro:
———————————————————
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm
———————————————————
Erro:
Retrieving http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm
error: skipping http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm – transfer failed – Unknown or unexpected error
## Causa: (Cause)
O pacore epel mudou de nome.
No caso o pacote mudou para o seguinte nome: epel-release-5-4.noarch.rpm
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
Acesse o site http://download.fedora.redhat.com/pub/epel/5Server/x86_64/
e veja qual o nome do pacote epel existente.
Cuidado!!! Observe que a arquitetura usada foi a x86_64.
|—————————————————————————–|
|<<<<<<<<<<<<<< #### Troubleshooting ####
——————————————————————————-
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
Erro a tentar instalar alguns pacotes.
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
Ao executar o comando:
—————————————————————————
yum install -y php php-mysql php-xml php-imap php-mbstring php-mcrypt php-pecl-Fileinfo php-pecl-memcache php-pear-DB php-pear-File php-pear-Log php-pear-Mail-Mime php-pear-Auth-SASL php-pear-Date php-pear-HTTP-Request php-pear-Mail php-pear-Net-Sieve php-pear-Net-Socket php-pear-Net-SMTP php-pear-MDB2-Driver-mysql php-gd php-xmlrpc php-soap php-pecl-json
—————————————————————————
No package php-pear-File available.
* Maybe you meant: php-pear-file
No package php-pear-Log available.
* Maybe you meant: php-pear-log
No package php-pear-Mail-Mime available.
No package php-pear-Auth-SASL available.
No package php-pear-Date available.
## Causa: (Cause)
1) Pode acontecer do repositório não estar configurado corretamente;
2) Pode ter faltado executar o comando “yum clean all”
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
|—————————————————————————–|
|<<<<<<<<<<<<<< #### Troubleshooting ####
——————————————————————————-
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
Erro ao executar o comando:
—————————————————————–
mysql –user=root –password=<senha> < /root/createuser-horde.mysql
—————————————————————–
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
Erro:
—————————————————————–
mysql: Character set ‘utf’ is not a compiled character set and is not specified in the ‘/usr/share/mysql/charsets/Index.xml’ file
—————————————————————–
## Causa: (Cause)
A configuração do arquivo /etc/my.cnf estava errada.
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
Corrija a configuração do arquivo /etc/my.cnf
|—————————————————————————–|
|<<<<<<<<<<<<<< #### Troubleshooting ####
——————————————————————————-
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
Erro ao executar o segundo parâmetro de configuração do script
/var/www/html/horde/scripts/setup.php
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
Horde Groupware Webmail Edition Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
(4) Update PEAR for a new or changed location
(5) Update from an older Horde Groupware Webmail Edition version
Type your choice: 2
Should we create the database for you? If yes, you need to provide a database
user that has permissions to create new databases on your system. If no, we
will only create the database tables for you. [y]
(y) Yes
(n) No
Type your choice:
Database superuser for creating the database if necessary for your
database system: root
Specify a password for the database user: <senha>
Loading database module…
[ ERROR! ] Listing the current databases failed. Please see the manual at
docs/INSTALL for how to setup the database manually. Error messages:
MDB2 Error: connect failed
_doConnect: [Error message: Can't connect to local MySQL server
through socket '/var/lib/mysql.sock' (2)]
[Native code: 2002]
[Native message: Can't connect to local MySQL server through socket
'/var/lib/mysql.sock' (2)
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Causa: (Cause)
O caminho "/var/lib/mysql.sock" foi digitado errado no passo
"(1) Configure database settings". O certo seria /var/lib/mysql/mysql.sock
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
Digitar o caminho correto. (/var/lib/mysql/mysql.sock)
|-----------------------------------------------------------------------------|
|<<<<<<<<<<<<<< #### Troubleshooting ####
-------------------------------------------------------------------------------
### Erros conhecidos: (Known Errors)
## Questão/ Problema: (Question/Issue)
Ao tentar conectar no servidor Web aparece mensagem de erro.
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
Ao tentar conectar no servidor Web aparece a seguinte mensagem de erro:
-----------------------------------------------------------------
A fatal error has occurred
DB Error: connect failed
Details have been logged for the administrator.
-----------------------------------------------------------------
|<<<<<<<<<<<<<< #### Troubleshooting ####
Ou a mensagem em português:
-----------------------------------------------------------------
Um erro fatal ocorreu
DB Error: connect failed
Os detalhes foram gravados em log para o administrador.
-----------------------------------------------------------------
## Causa: (Cause)
O banco de dados estava parado.
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
Iniciar o banco de dados, no meu caso estava usando o MySQL:
-------------------------
service mysqld start
-------------------------
|-----------------------------------------------------------------------------|
|<<<<<<<<<<<<<< #### Troubleshooting ####
-------------------------------------------------------------------------------
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
Type your choice:
Writing main configuration file
A fatal error has occurred
DB Error: connect failed
Details have been logged for the administrator.
## Causa: (Cause)
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
|-----------------------------------------------------------------------------|
|<<<<<<<<<<<<<< #### Troubleshooting ####
-------------------------------------------------------------------------------
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
## Causa: (Cause)
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
|-----------------------------------------------------------------------------|
|<<<<<<<<<<<<<< #### Troubleshooting ####
|##########^ Troubleshooting #################################################|
>Rever a posição do FAQ
###############################################################################
# FAQ:
###############################################################################
>FAQ
>Dúvidas Frequentes
Q) Como definir o idioma padrão para Português para todos os usuários?
Q.) Como disponibilizar uma mensagem de férias?
A.)
Q) Como o usuário pode alterar o idioma?
A) Options > Global Options > Locale and Time >
|<<<<<<<<<<<<<< #### FAQ ####
Q) Como alterar o servidor IMAP que o Horde trabalha?
A) Editar o arquivo: /var/www/html/horde/imp/config/servers.php
|<<<<<<<<<<<<<< #### FAQ ####
Q.) Como ver todo o cabeçalho da mensagem?
A.) Na mensagem > Clicar no link: {Message Source}
Q) I just want web mail. Why do I need Horde?
Q.) How to edit whitelist and blactlist in Horde?
A.) (Fonte: http://discussion.accuwebhosting.com/how-tos/551-how-edit-whitelist-blactlist-horde.html)
1) Login to Horde mail.
2) Click on Filters icon.
3) You can see two list in default: whitelist and blacklist.
4) Click in the list and add the email addresses one in each line.
5) Click on save to enter setup
|<<<<<<<<<<<<<< #### FAQ ####
Q) Qual a versão do Horde Groupware Webmail Edition?
A) Versão 1.2.6
|<<<<<<<<<<<<<< #### FAQ ####
Q) Qual o endereço do site de Download?
A)
http://www.horde.org/download/app/?app=webmail
ftp://ftp.horde.org/pub/horde-webmail/horde-webmail-latest.tar.gz
Q) Que tipo de integração o Horde faz com os clientes de e-mail?
|##########^ FAQ #############################################################|
###############################################################################
# Referências:
###############################################################################
>Referências
About EPEL repo:
http://fedoraproject.org/wiki/EPEL
Dovecot error while loading shared libraries: libsepol.so.1:
http://bugs.centos.org/view.php?id=2651
|<<<<<<<<<<<<<< #### Referências ####
Install Horde Groupware Webmail Edition on Debian 4.0 Etch:
http://howto.landure.fr/gnu-linux/debian-4-0-etch-en/install-horde-groupware-webmail-edition-on-debian-4-0-etch
Postfix Mail Server:
http://fedorasolved.org/server-solutions/postfix-mail-server
|##########^ Referências #####################################################|
########### Configurações Adicionais:
###############################################################################
# Configurando Apache no Red Hat:
###############################################################################
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
===============================================================================
Fazer o Redirecionamento no Apache no Red Hat:
===============================================================================
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Fazer o Redirecionamento no Apache no Red Hat ====
vim /etc/httpd/conf/httpd.conf
_______________________________________________________________________________
SO: CentOS, Fedora, Red Hat
Arquivo: /etc/httpd/conf/httpd.conf (Permissões: )
-------------------------------------------------------------------------------
.
..
...
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
#>>>> Adicionado:
### Adicionado a linha:
RedirectMatch ^/$ /horde
### Se o SSL já estiver configurado, pode-se usar este Redirect
# RedirectMatch ^/$ https://horde.lantest.net.br/horde
</Directory>
...
..
.
|----------^ /usr/local/apache/conf/httpd.conf -------------------------------|
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Fazer o Redirecionamento no Apache no Red Hat ====
|==========^ Fazer o Redirecionamento no Apache no Red Hat ===================|
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
===============================================================================
Habilitando o SSL no Apache no Red Hat:
===============================================================================
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Habilitando o SSL no Apache no Red Hat ====
######
# Um dos método:
(Fonte: http://blog.scriptseguro.com.br/centos-5-x-instalando-ssl-no-apache/)
(Fonte: http://wiki.centos.org/HowTos/Https)
1)
### Gerar a chave privada:
openssl genrsa -out new.cert.key 1024
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Habilitando o SSL no Apache no Red Hat ====
|>>> Método 2
2)
### Gerar o arquivo CSR (Arquivo de requisição):
openssl req -new -key new.cert.key -out new.cert.csr
#---> Saída do comando:
Country Name (2 letter code) [GB]:BR
State or Province Name (full name) [Berkshire]:Distrito Federal
Locality Name (eg, city) [Newbury]:Brasilia
Organization Name (eg, company) [My Company Ltd]:Empresa S.A.
Organizational Unit Name (eg, section) []:Seguranca
Common Name (eg, your name or your server’s hostname) []:Nome_do_Servidor
Email Address []:seguranca@lantest.net.br
Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Habilitando o SSL no Apache no Red Hat ====
|>>> Método 2
3)
### Assinar o arquivo CSR utilizando a chave privada para gerar o certificado:
openssl x509 -req -days 730 -in new.cert.csr -signkey new.cert.key -out new.cert.crt
#—> Saída do comando:
Signature ok
subject=/C=BR/ST=Distrito Federal/L=Brasilia/O=Empresa S.A./OU=Seguranca/CN=Equipe de Seguranca/emailAddress=seguranca@lantest.net.br
Getting Private key
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Habilitando o SSL no Apache no Red Hat ====
|>>> Método 2
### Mova os arquivos para a localização correta:
mv new.cert.crt /etc/pki/tls/certs/server.crt
mv new.cert.key /etc/pki/tls/private/server.key
mv new.cert.csr /etc/pki/tls/private/server.csr
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|<<<<<<<<<<<<<< ==== Habilitando o SSL no Apache no Red Hat ====
### Caso não utilize Virtual Host no seu servidor Apache, basta alterar as
### linhas abaixo no arquivo de configuração do SSL:
vim /etc/httpd/conf.d/ssl.conf
_______________________________________________________________________________
SO: CentOS, Fedora, Red Hat
Arquivo: /etc/httpd/conf.d/ssl.conf (Permissões: )
——————————————————————————-
.
..
…
#>>>> Verificar:
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
…
…
# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command.
#>>>> Modificado
#SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateFile /etc/pki/tls/certs/server.crt
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you’ve both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
#>>>> Modificado
#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCertificateKeyFile /etc/pki/tls/private/server.key
…
..
.
|———-^ Arquivo: /etc/httpd/conf.d/ssl.conf —————————–|
### Reiniciar o serviço:
/etc/init.d/httpd restart
# Ou:
service httpd restart
### Caso utilize Virtual Host será necessário alterar o arquivo
### de configuração do Virtual Host ao invés do arquivo de configuração
### do SSL, abra o arquivo
### e adicione no início do arquivo:
vim /etc/httpd/conf.d/meu_vhost.conf
_______________________________________________________________________________
SO: CentOS, Fedora, Red Hat
Arquivo: /etc/httpd/conf.d/meu_vhost.conf (Permissões: )
——————————————————————————-
NameVirtualHost *:443
…
…
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
…
…
AllowOverride All
…
..
.
|———-^ Arquivo: /etc/httpd/conf.d/ssl.conf —————————–|
### Reiniciar o serviço:
/etc/init.d/httpd restart
# Ou:
service httpd restart
|==========^ Habilitando o SSL no Apache no Red Hat ==========================|
|<<<<<<<<<<<<<< #### Configurando Apache no Red Hat ####
|##########^ Configurando Apache no Red Hat ##################################|
###### Adicionalmente: a configuração do postfix
###############################################################################
# Configurando o Postfix no Red Hat 5.5 (RHEL):
###############################################################################
(Fonte: http://wiki.horde.org/CentOS5InstallationNotes?referrer=HowTo#toc4)
_______________________________________________________________________________
Arquivo: /etc/postfix/main.cf (Permissões: -rw-r–r– 1 root root)
——————————————————————
.
..
…
## A opção “myhostname” deve conter o nome completo do servidor, incluindo
## o domínio:
myhostname = horde.lantest.net.br
…
…
## A opção “mydomain” contém apenas o domínio, sem
## o nome da máquina, como em:
mydomain = lantest.net.br
…
…
inet_interfaces = localhost
…
…
home_mailbox = Maildir/
…
..
.
|———-^ Arquivo: /etc/postfix/main.cf ———————————–|
#### Para reiniciar o postfix:
service postfix restart
===============================================================================
Testando a Configuração:
===============================================================================
[root@horde ~]# telnet localhost 25
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
220 horde.lantest.net.br ESMTP Postfix
helo lantest.net.br
250 horde.lantest.net.br
mail from:glaimertton@lantest.net.br
250 2.1.0 Ok
rcpt to:alessandro@lantest.net.br
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Este eh um e-mail de teste das 0:21
Subject: Olah teste
testando
.
250 2.0.0 Ok: queued as 1159B183EC
|==========^ Testando a Configuração =========================================|
(Fonte: http://fedorasolved.org/server-solutions/postfix-mail-server)
cd /etc/postfix
openssl req -new -x509 -nodes -out cert.pem -keyout key.pem -days 3650
Generating a 1024 bit RSA private key
….++++++
…++++++
writing new private key to ‘key.pem’
—–
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [GB]:BR
State or Province Name (full name) [Berkshire]:Distrito Federal
Locality Name (eg, city) [Newbury]:Brasilia
Organization Name (eg, company) [My Company Ltd]:Empresa S.A.
Organizational Unit Name (eg, section) []:E-mail
Common Name (eg, your name or your server’s hostname) []:
Email Address []:administrator@lantest.net.br
chmod 600 *.pem
#### Reinciar o Postfix:
service postfix restart
——————————————————————————-
Testando a Configuração:
——————————————————————————-
Erro:
454 4.3.0 TLS not available due to local problem
Sol.:
Tive que gerar novamente as chaves
|##########^ Configurando o Postfix no Red Hat 5.5 (RHEL) ####################|
###############################################################################
# Gerenciando o Postfix:
###############################################################################
>Administrando o Postfix
>Gerenciando o Postfix
Para mais detalhes veja o site:
http://memovirtual.wordpress.com/linux/postfix-sol-e-mail/
#### Atualizar a base de dados de alias
### Para carregar os aliases:
postalias /etc/postfix/aliases
### Para carregar os IP das máquinas que podem enviar e-mails sem autenticação:
postmap /etc/postfix/arquivo_ips_liberados
### Para listar todas as mensagens na fila:
postqueue -p
mailq
|<<<<<<<<<<<<<< #### Gerenciando o Postfix ####
### Para forçar a entrega dos e-mails:
postqueue -f
### Para remover uma mensagem da fila:
## Onde: QUEUE_ID é código da mensagem na fila que pode ser obtido com
## o comando mailq
postsuper -d QUEUE_ID
### Para ver quais os parâmetros estão ativos no Postfix:
postconf -n
|<<<<<<<<<<<<<< #### Gerenciando o Postfix ####
### Para descobrir os tipos de mapas:
postconf -m
### Para encontrar uma mensagem e verificar o seu conteúdo:
mailq | grep remetente_da_mensagem
find /var/spool/postfix/ -iname F4068274DA8
cat /var/spool/postfix/incoming/F4068274DA8
|<<<<<<<<<<<<<< #### Gerenciando o Postfix ####
### (Fonte: http://www.cyberciti.biz/tips/howto-postfix-flush-mail-queue.html)
### Script em Perl para apagar as mensagens para um destinatário
### específico na fila de mensagem:
——————————————————————————-
#!/usr/bin/perl
# Arquivo: postfix-delete.pl
$REGEXP = shift || die “no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!”;
@data = qx</usr/sbin/postqueue -p>;
for (@data) {
if (/^(\w+)(\*|\!)?\s/) {
$queue_id = $1;
}
if($queue_id) {
if (/$REGEXP/i) {
$Q{$queue_id} = 1;
$queue_id = “”;
}
}
}
##########| Arquivo: postfix-delete.pl
#open(POSTSUPER,”|cat”) || die “couldn’t open postsuper” ;
open(POSTSUPER,”|postsuper -d -”) || die “couldn’t open postsuper” ;
foreach (keys %Q) {
print POSTSUPER “$_\n”;
};
close(POSTSUPER);
|———-^ postfix-delete.pl ———————————————–|
|<<<<<<<<<<<<<< #### Gerenciando o Postfix ####
### Como utilizar o script acima (postfix-delete.pl)
## Tenha o perl instalado em sua máquina e:
## Onde EXPRESSAO pode ser o e-mail ou parte do e-mail que esteja na fila
./postfix-delete.pl EXPRESSAO
|<<<<<<<<<<<<<< #### Gerenciando o Postfix ####
### Para ver os logs:
tail -f /var/log/mail.info
### Referências:
http://marcosabadi.blogspot.com/2008_11_01_archive.html
|##########^ Gerenciando o Postfix ###########################################|
|<<<<<<<<<<<<<< #### Troubleshooting ####
——————————————————————————-
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Sintomas: (Symptom)
mailq
-Queue ID- –Size– —-Arrival Time—- -Sender/Recipient——-
E2C99183E8 800 Sun Aug 29 23:57:08 glaimertton@lantest.net.br
(Host or domain name not found. Name service error for name=lantest.net.br type=MX: Host not found, try again)
alessandro@lantest.net.br
– 1 Kbytes in 1 Request.
## Causa: (Cause)
O domínio lantest.net.br é desconhecido. Neste caso, havia um erro
de configuração que faltava na tag “mydestination” do arquivo
/etc/postfix/main.cf
|<<<<<<<<<<<<<< #### Troubleshooting ####
## Solução: (Solution)
|—————————————————————————–|