Вход:  Пароль:  
FreeSource: FreeBSD/Mail/MaiaMailGuard3 ...
Free Source | Каталог | Изменения | НовыеКомментарии | Пользователи | Регистрация |
Это старая версия FreeBSD/Mail/MaiaMailGuard3 за 2006-11-17 19:49:06..

Установка Maia-Mailguard на Free BSD?. Третья часть.


Примечание:
Эти приложение являются дополнительными. Настроенное ранее и без этого будет прекрасно работать.
Тем не менее, очень рекомендуется установить их для защиты от вирусов и спама.

1. Установка Razor, Spam Assassin?, Clamav и Pear.



Устанавливаем и настраиваем Spam Assassin?:


Создаем и редактируем /usr/local/etc/mail/spamassassin/local.cf:


Устанавливаем и настраиваем Clamav:


Редактируем /usr/local/etc/clamd.conf:

Остальное – по вкусу.


Редактируем /usr/local/etc/freshclam.conf:


Создаем пользователя “vscan”:


Устанавливаем разрешения для Clam AV?:


Запускаем демонов Fresh Clam? и Clam AV?:


Устанавливаем и настраиваем Pear:


Редактируем /usr/local/etc/php.ini:

2. Установка Maia-Mailguard


Устанавливаем и настраиваем Maia-Mailguard:


Создаем базу Maia-Mailguard и заполняем ее:


Редактируем /var/db/mysql/my.cnf:


Создаем домашний каталог Maia-Mailguard:


Создаем конфигурационный файл Maia-Mailguard:


Редактируем /usr/local/etc/maia.conf:


Запускаем configtest.pl:


Вы должны просмотреть и проверить весь вывод:


Как видите некоторые необходимые порты не установлены – так и должно быть (особенно в том случае,
если Вы ставите свою Free BSD? по умолчанию или по-минимуму). Теперь мы их установим.


Установка Archive::Zip:


Установка Convert::TNEF:


Установка Convert::UUlib:


Установка DATA::UUID:


Установка Net::Server:


Установка Template:


Установка Unix::Syslog:


И так далее... Установите все необходимые по Вашему мнению порты (Отличные от "DBD::Pg" конечно). Но это на Ваше усмотрение.


Загружаем правила Spam Assassin?:


Копируем PHP файлы Maia-Mailguard:


Устанавливаем Smarty Template Engine:


Редактируем /usr/local/etc/php.ini:
Строка 512: добавляем «:/usr/local/share/smarty» в include_path.


Связываем Smarty Templates:


Перегружаем конфигурационный файл Apache:


Настраиваем Maia-Mailguard:


Редактируем /usr/local/www/maia-mailguard/config.php file:


Редактируем /usr/local/etc/apache/httpd.conf:


Перегружаем Apache.


Тестируем:
Заходим на http://domain.tld/maia-mailguard/admin/configtest.php


Вы увидите что все еще пропущены некоторые модули PEAR. Итак, установим и их.
Конечно все «дополнительные» модули на Ваше усмотрение.


Устанавливаем PEAR::Mail_Mime:


Устанавливаем PEAR::DB:


Устанавливаем PEAR::DB_Pager:


Устанавливаем PEAR::Net_Socket:


Устанавливаем PEAR::Net_SMTP:


Устанавливаем PEAR::Net_POP3:


Устанавливаем PEAR::Log:


Заходим на http://domain.tld/maia-mailguard/admin/configtest.php опять. Если установлен php5, то напротив PEAR::Net_IMAP
появится строка:

Идем по ссылке и вникаем – перед установкой PEAR::Net_IMAP нужно положить следующий патч в каталог files порта:
IMAPProtocol.php.patch


и затем стандартно:


Если все еще остались пропущенные модули, заходим на http://domain.tld/maia-mailguard/admin/configtest.php
смотрим какие и устанавливаем их.


Перегружаем Apache:


Примечание:
If even after you install _ALL_ PEAR modules and you still see something like this in the admin/configtest.php interface "PEAR::DB FAILED: DB.php installed in: but not in include path: .:/usr/local/share/pear:/usr/local/share/smarty", don't panic! The PEAR::DB is installed just fine... It's actually an inconsistency in the Maia-Mailguard configtest. So, don't worry about it and just move along.


Also, if you can't seem to figure out why Pager.php is coming up with errors in the Maia scripts, make sure that Pager.php is located in the base directory of /usr/local/share/pear. If it's not, go ahead and just create a symlink so Maia sees it properly.


Symlink Pager.php:


Install and run Maia-Mailguard:


Generate encryption key:


Important Note:
Be sure to keep a backup/copy of this key. If, for some reason, you happen to lose this key, you'll need a backup/copy of it to continue reading the encrypted mail that Maia-Mailguard has already processed.


Install the Maia-Mailguard configuration file:


Edit /etc/amavisd.conf file:


Start Maia-Mailguard:


Test:
Visit http://domain.tld/maia-mailguard/. You should be greeted with a login screen. If so, great! Let's log in and acquire admin privileges.


Instead of http://domain.tld/maia-mailguard/login.php (The default), visit http://domain.tld/maia-mailguard/login.php?super=register
Log in with any user you currently have on your system. That user will now have admin privs via Maia (So, be careful which user you choose).


Now, that you're logged into Maia-Mailguard as an administrator, click the “Settings” link at the top of the page (Key-shaped icon).
From the “Administration Menu” click “System Configuration”.
Each mail server will want different settings for their setup. However, there are some things you should be aware of:
Code:


1. Make sure that *ANY* file name (With the exception of the logo image) listed for
any option is listed with it's *FULL PATH*. (IE: In “Paths & Ports”, be sure
“blowfish.key” is listed as «/var/amavisd/blowfish.key”.
2. The “Mail size limit” setting should not be higher than what you set your
My SQL's? packet_size_limit to (10M in my example).


And, for a few system settings I recommend...
1. In “System Configuration” I don't allow users to change their username.
This, as usual, is entirely up to you.


Edit /usr/local/etc/postfix/main.cf file:
(Just above “LOCAL PATHNAME INFORMATION”)


Edit /usr/local/etc/postfix/master.cf file:
(At bottom of file)


Перегружаем Postfix:


Now, send an email to yourself either via shell or external mail client. Everything should work swimmingly. Make sure you check the headers to ensure that Maia-Mailguard is scanning these files. There should be an “X-Virus-Scanned: Maia Mailguard” line.


Also be sure to check your /var/log/maillog to make sure mail is being piped over to amavis. You'll notice that there will be a fairly large amount of information from amavis in the log file, this is due to the log level of “3” being set in our /usr/local/etc/amavisd.conf file. If everything is running smoothly (And it should be) go ahead and change the log level back down to “0” or “1” to save the log from becoming overwhelmingly large.


Once you're sure Maia-Mailguard is running properly, adjust your settings however you see fit.


Important Note:
The following cron jobs are absolutely key for this setup. So, be very, VERY sure you install these properly.


Edit the “vscan” user's cron jobs.


Cron information:


Besides what's covered in the next section, your mail setup should be completely finished. Enjoy and let me know how things turn out whether they be good or bad. Feedback is our friend...


Продолжение...


Страницы, ссылающиеся на данную: FreeBSD/Mail/MaiaMailGuard1
FreeBSD/Mail/MaiaMailGuard2
FreeBSD/Mail/MaiaMailGuard4


 
Файлов нет. [Показать файлы/форму]
Один комментарий. [Показать комментарии/форму]