Серверы · 1 min read · Dec 19, 2025

Идеальный сервер - Debian Squeeze (Debian 6.0) с BIND и Dovecot [ISPConfig 3] - Страница 5

17 Установка fail2ban

Это необязательно, но рекомендуется, потому что монитор ISPConfig пытается показать журнал:

apt-get install fail2ban

Чтобы сделать fail2ban монитором для PureFTPd и Dovecot, создайте файл /etc/fail2ban/jail.local:

vi /etc/fail2ban/jail.local

| [pureftpd] enabled = true port = ftp filter = pureftpd logpath = /var/log/syslog maxretry = 3 [dovecot-pop3imap] enabled = true filter = dovecot-pop3imap action = iptables-multiport[name=dovecot-pop3imap, port="pop3,pop3s,imap,imaps", protocol=tcp] logpath = /var/log/mail.log maxretry = 5 |

Затем создайте следующие два файла фильтров:

vi /etc/fail2ban/filter.d/pureftpd.conf

| [Definition] failregex = .*pure-ftpd: \(.*@\) \[WARNING\] Authentication failed for user.* ignoreregex = |

vi /etc/fail2ban/filter.d/dovecot-pop3imap.conf

| [Definition] failregex = (?: pop3-login|imap-login): .*(?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed|Aborted login \(\d+ authentication attempts).*rip=(?P\S*),.* ignoreregex = |

Перезапустите fail2ban после этого:

/etc/init.d/fail2ban restart  

18 Установка SquirrelMail

Чтобы установить веб-клиент SquirrelMail, выполните

apt-get install squirrelmail

Затем создайте следующую символическую ссылку…

ln -s /usr/share/squirrelmail/ /var/www/webmail

… и настройте SquirrelMail:

squirrelmail-configure

Мы должны сообщить SquirrelMail, что мы используем Dovecot-IMAP/-POP3:

SquirrelMail Configuration : Read: config.php (1.4.0)

Main Menu –
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >> <– D

SquirrelMail Configuration : Read: config.php

While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don’t work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
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        = Do not change anything
Command >> <– dovecot

SquirrelMail Configuration : Read: config.php

While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don’t work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
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        = Do not change anything
Command >> dovecot

imap_server_type = dovecot
default_folder_prefix = 
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = detect
delete_folder = false

Press any key to continue… <– press a key

SquirrelMail Configuration : Read: config.php (1.4.0)

Main Menu –
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >> <– S

SquirrelMail Configuration : Read: config.php (1.4.0)

Main Menu –
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >> <– Q

После этого вы можете получить доступ к SquirrelMail по адресу http://server1.example.com/webmail или http://192.168.0.100/webmail:

Share: X/Twitter LinkedIn

Get new posts in your inbox

No spam. Unsubscribe anytime.