Servidor Debian · 5 min read · Sep 27, 2025
O Servidor Perfeito - Debian Squeeze (Debian 6.0) Com BIND & Courier [ISPConfig 3] - Página 5
17 Instalar fail2ban
Isso é opcional, mas recomendado, porque o monitor do ISPConfig tenta mostrar o log:
apt-get install fail2banPara fazer o fail2ban monitorar PureFTPd, SASL e Courier, crie o arquivo /etc/fail2ban/jail.local:
vi /etc/fail2ban/jail.local| [pureftpd] enabled = true port = ftp filter = pureftpd logpath = /var/log/syslog maxretry = 3 [sasl] enabled = true port = smtp filter = sasl logpath = /var/log/mail.log maxretry = 5 [courierpop3] enabled = true port = pop3 filter = courierpop3 logpath = /var/log/mail.log maxretry = 5 [courierpop3s] enabled = true port = pop3s filter = courierpop3s logpath = /var/log/mail.log maxretry = 5 [courierimap] enabled = true port = imap2 filter = courierimap logpath = /var/log/mail.log maxretry = 5 [courierimaps] enabled = true port = imaps filter = courierimaps logpath = /var/log/mail.log maxretry = 5 |
Depois crie os seguintes cinco arquivos de filtro:
vi /etc/fail2ban/filter.d/pureftpd.conf| [Definition] failregex = .*pure-ftpd: \(.*@ |
vi /etc/fail2ban/filter.d/courierpop3.conf| # Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag " |
vi /etc/fail2ban/filter.d/courierpop3s.conf| # Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag " |
vi /etc/fail2ban/filter.d/courierimap.conf| # Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag " |
vi /etc/fail2ban/filter.d/courierimaps.conf| # Fail2Ban configuration file # # $Revision: 100 $ # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag " |
Reinicie o fail2ban depois:
/etc/init.d/fail2ban restart 18 Instalar SquirrelMail
Para instalar o cliente de webmail SquirrelMail, execute
apt-get install squirrelmailEm seguida, crie o seguinte link simbólico…
ln -s /usr/share/squirrelmail/ /var/www/webmail… e configure o SquirrelMail:
squirrelmail-configureDevemos informar ao SquirrelMail que estamos usando Courier-IMAP/-POP3:
Configuração do SquirrelMail : Ler: config.php (1.4.0)
Menu Principal –
- Preferências da Organização
- Configurações do Servidor
- Padrões de Pasta
- Opções Gerais
- Temas
- Catálogos de Endereços
- Mensagem do Dia (MOTD)
- Plugins
- Banco de Dados
- Idiomas
D. Definir configurações pré-definidas para servidores IMAP específicos
C Ativar cor
S Salvar dados
Q Sair
Comando >> <– D
Configuração do SquirrelMail : Ler: config.php
Enquanto estávamos construindo o SquirrelMail, descobrimos algumas
preferências que funcionam melhor com alguns servidores que
não funcionam tão bem com outros. Se você selecionar seu
servidor IMAP, esta opção definirá algumas configurações
padrão para esse servidor.
Por favor, note que você ainda precisará passar por e
certificar-se de que tudo está correto. Isso não
muda tudo. Existem apenas algumas configurações
que isso mudará.
Por favor, selecione seu servidor IMAP:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington’s IMAP server
gmail = IMAP access to Google mail (Gmail) accounts
quit = Não mudar nada
Comando >> <– courier
Configuração do SquirrelMail : Ler: config.php
Enquanto estávamos construindo o SquirrelMail, descobrimos algumas
preferências que funcionam melhor com alguns servidores que
não funcionam tão bem com outros. Se você selecionar seu
servidor IMAP, esta opção definirá algumas configurações
padrão para esse servidor.
Por favor, note que você ainda precisará passar por e
certificar-se de que tudo está correto. Isso não
muda tudo. Existem apenas algumas configurações
que isso mudará.
Por favor, selecione seu servidor IMAP:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington’s IMAP server
gmail = IMAP access to Google mail (Gmail) accounts
quit = Não mudar nada
Comando >> courier
imap_server_type = courier
default_folder_prefix = INBOX.
trash_folder = Lixo
sent_folder = Enviados
draft_folder = Rascunhos
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = .
delete_folder = true
Pressione qualquer tecla para continuar… <– pressione uma tecla
Configuração do SquirrelMail : Ler: config.php (1.4.0)
Menu Principal –
- Preferências da Organização
- Configurações do Servidor
- Padrões de Pasta
- Opções Gerais
- Temas
- Catálogos de Endereços
- Mensagem do Dia (MOTD)
- Plugins
- Banco de Dados
- Idiomas
D. Definir configurações pré-definidas para servidores IMAP específicos
C Ativar cor
S Salvar dados
Q Sair
Comando >> <– S
Configuração do SquirrelMail : Ler: config.php (1.4.0)
Menu Principal –
- Preferências da Organização
- Configurações do Servidor
- Padrões de Pasta
- Opções Gerais
- Temas
- Catálogos de Endereços
- Mensagem do Dia (MOTD)
- Plugins
- Banco de Dados
- Idiomas
D. Definir configurações pré-definidas para servidores IMAP específicos
C Ativar cor
S Salvar dados
Q Sair
Comando >> <– Q
Depois você pode acessar o SquirrelMail em http://server1.example.com/webmail ou http://192.168.0.100/webmail:

Receba novas postagens na sua caixa de entrada
Sem spam. Cancele a assinatura a qualquer momento.