Понадобилось на одном из почтовых серверов провайдера, поднять web-морду.

Первое что мне пришло в голову — это уже проверенный Squirrelmail (белочка 😉 ).

Залез я на сервак и начал её инсталить, затем настраивать:

Устанавку провожим — из портов:

# cd /usr/ports/mail/squirrelmail 
# make install clean

В конце установки SquirrelMail «предупреждает», что для корректной его работы необходимо, чтобы в php.ini переменная «file_uploads» была установлена в состояние «On»:

For SquirrelMail to work properly you will need to make sure the following option is set in your php.ini file:
file_uploads = On

Еще говориться о том, что может существовать проблема с авторизацией и для её решения, необходимо в php.ini установить переменную «session.auto_start» в значение «1»:

If you have problems with SquirrelMail saying "you must login" after you just have, the following php.ini option may help:
session.auto_start = 1

Сделали что нас просили, потом лезем в конфиг apache и добавляем алиас в httpd.conf, либо создаем VirtualHost, кому как нравится:

You now need to add an alias to apache's httpd.conf pointing to /usr/local/www/squirrelmail in order to access SquirrelMail from your web browser, or create a VirtualHost with DocumentRoot set to that directory.

Для примера приведу создание алиаса.
В секцию добавляем следующий блок:

Alias /mail "/usr/local/www/squirrelmail/"
<Directory "/usr/local/www/squirrelmail/">
          DirectoryIndex index.php
          AllowOverride All
          Order allow,deny
          Allow from all
</Directory>

Для проверки, на наличие ошибок в конфиге apache, выполним:

# apachectl configtest
Syntax OK

Если ошибок не допущено, перестартовываем Apache:

# apachectl restart
или
# apachectl graceful

Теперь мы добрались до конфигурирования самого SquirrelMail.
После инсталляции, явно было сказано:

In order to do your administrative configuration you need to cd /usr/local/www/squirrelmail && ./configure
SquirrelMail will not work until this has been done. After this step is complete, and the config.php is created, plugin ports will properly auto activate.

Что мы и сделаем:

# cd /usr/local/www/squirrelmail && ./configure
 
SquirrelMail Configuration : Read: config_default.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 >>

Нажав еденицу, исправляем нужные нам поля:

1.  Organization Preferences
 
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Organization Preferences
1. Organization Name : Local Network Webmail
2. Organization Logo : ../images/logo.gif
3. Org. Logo Width/Height : (250/150)
4. Organization Title : Webmail
5. Signout Page :
6. Top Frame : _top
7. Provider link : http://domain.pp.ua
8. Provider name : Local Network 
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

Нажимаем «S» для сохранения и «R» для возврата в предыдущее меню. Выбираем «2»:

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings 
 
General
-------
1. Domain : mail.domain.pp.ua
2. Invert Time : false
3. Sendmail or SMTP : SMTP
 
A. Update IMAP Settings : mail.domain.pp.ua:143 (other)
B. Update SMTP Settings : mail.domain.pp.ua:25
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

Повторяем операцию описанную выше и клацаем следующий пункт:

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Folder Defaults
1. Default Folder Prefix :
2. Show Folder Prefix Option : false
3. Trash Folder : &BBoEPgRABDcEOAQ9BDA-
4. Sent Folder : &BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-
5. Drafts Folder : &BCcENQRABD0EPgQyBDgEOgQ4-
6. By default, move to trash : true
7. By default, save sent messages : true
8. By default, save as draft : true
9. List Special Folders First : true
10. Show Special Folders Color : true
11. Auto Expunge : true
12. Default Sub. of INBOX : false
13. Show 'Contain Sub.' Option : false
14. Default Unseen Notify : 2
15. Default Unseen Type : 1
16. Auto Create Special Folders : true
17. Folder Delete Bypasses Trash : true
18. Enable /NoSelect folder fix : false 
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

Двигаемся далее:

---------------------------------------------------------
General Options
1. Data Directory : /var/spool/squirrelmail/pref/
2. Attachment Directory : /var/spool/squirrelmail/attach/
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : true
6. Allow use of priority : true
7. Hide SM attributions : true
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : true
11. Allow server-side sorting : true
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID
15. Location base :
16. Only secure cookies if poss. : true
17. Disable secure forms : false
18. Page referal requirement : 
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

Теперь темы:

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Themes
1.  Change Themes
     Default                                           Plain Blue
     Sand Storm                                    Deep Ocean
     Slashdot                                         Purple
     Forest                                             Ice
     Sea Spray                                       Blue Steel
     Dark Grey                                       High Contrast
     Black Bean Burrito                          Servery
     Maize                                              BluesNews
     Deep Ocean 2                                 Blue Grey
     Dompie                                           Methodical
     Greenhouse Effect (Changes)         In The Pink (Changes)
     Kind of Blue (Changes)                   Monostochastic (Changes)
     Shades of Grey (Changes)              Spice of Life (Changes)
     Spice of Life - Lite (Changes)          Spice of Life - Dark (Changes)
     Holiday - Christmas                         Darkness (Changes)
     Random (Changes every login)       Midnight
     Alien Glow                                        Dark Green
     Penguin                                           Minimal BW
     Redmond                                         Net Style
     Silver Steel                                      Simple Green
     Wood                                              Bluesome
     Simple Green 2                               Simple Purple
     Autumn                                           Autumn 2
     Blue on Blue                                    Classic Blue
     Classic Blue 2                                  Powder Blue
     Techno Blue                                    Turquoise
2.  CSS File :
 
R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit
 
Command >>

Дошла очередь до настройки адрессной книги.

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Address Books
1. Change LDAP Servers
2. Use Javascript Address Book Search : false
3. Global file address book :
4. Allow writing into global file address book : false
5. Allow listing of global file address book : true
6. Allowed address book line length : 2048 
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

Message of the Day (MOTD). «Сообщение дня», пропустил, оставив настройки по умолчанию и выбрал пункт плагинов:

SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Plugins
Installed Plugins
1. calendar
2. filters
3. newmail
4. translate
5. message_details 
6. squirrelspell
 
 
 
Available Plugins:
6. administrator
7. bug_report
8. delete_move_next
9. demo
10. fortune
11. info
12. listcommands
13. mail_fetch
14. sent_subfolders
15. spamcop
16. test
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

9й пункт пропустил, связанный с базами данных и сразу перешел к 10му. Локализация:

---------------------------------------------------------
Language preferences
1. Default Language : ru_RU
2. Default Charset : UTF-8
3. Enable lossy encoding : false 
 
R Return to Main Menu
C Turn color on
S Save data
Q Quit
 
Command >>

После настройки всех пунктов, не забываем сохранить конфигурацию, нажав «S» и выходим «Q».

После чего проверяем из браузера работу нашего почтовика зайдя на страничку http://domain.pp.ua/mail/.

Да, вот ещё что — можно добавить ещё кучу вкусных плагинов, проинсталив их из портов:

# cd /usr/ports/mail/squirrelmail-plugins/ && make install clean

После инстала, заходим снова в конфигурялку и лезем в плагины, там выбираем нужные нам.

Удачи в настройке 😉

Напоминаю всем копирующим мой контент о существовании закона "Об авторском праве".
В связи с этим, прошу во избежании конфликтов при копировании данного материала, ставить на него ссылку:

http://noted.org.ua/1672


Также, вы можете отблагодарить меня переслав любую сумму на любой кошелек WebMoney, для поддержания данного ресурса. Или просто админу на пиво ;)

Кошельки для получения благодарности:
R386985788805
U234140473141
Z147712360455

На данной странице нет комментариев, возможно они закрыты. Если Вы хотите оставить свой комментарий, перейдите на специально созданный раздел

Add your comment now

Please note: JavaScript is required to post comments.