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

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

1. Установка и настройка Squrrel Mail?:


Optional Section:


Web Mail?:
Because I've enjoyed Squirrel Mail? over any other webmail experience for so many years, that is the install I will be guiding you through.


Squirrel Mail? install and setup:


Squirrel Mail? configuration:


Edit /usr/local/etc/apache/httpd.conf file:
Formatter «highlight/roughly» not found


Reload Apache:


Test:
Squirrel Mail? should now be installed and working. Visit http://domain.tld/squirrelmail/src/configtest.php to make sure all is well. If there are no errors, great! Click the “Login now” link at the bottom and proceed to log in.


Note:
If you are having trouble logging into Squirrel Mail? even though you know you're using the correct login information, verify that “file_uploads” is set to “On” in your /usr/local/etc/php.ini file.


Once logged in, go a head and send an email to either yourself or someone else and make sure everything is working properly. If you or the third party recieved the email, you're finished with the Squirrel Mail? install.


Let's move on to some plugins for Squirrel Mail? to make life a bit easier.


Squirrel Mail? New User? plugin install:
Code:


#cd /usr/ports/mail/squirrelmail-newuser_wiz-plugin
#make all install clean


Squirrel Mail? Quota Usage plugin install and setup:
Code:


#cd /usr/ports/mail/squirrelmail-quota_usage-plugin
#make all install clean
#cd /usr/local/www/squirrelmail/plugins/quota_usage
#cp config.php.sample config.php


Squirrel Mail? Secure Login plugin install and setup:
Code:


#cd /usr/ports/mail/squirrelmail-secure_login-plugin
#make all install clean
#cd /usr/local/www/squirrelmail/plugins/secure_login/
#cp config.php.sample config.php


Squirrel Mail? Timeout plugin install and setup:
Code:


#cd /usr/ports/mail/squirrelmail-timeout_user-plugin
#make all install clean


Plugin install:
Code:


#cd /usr/local/www/squirrelmail
#./configure


Options:
1. Choose option “8. Plugins”.
2. To install a plugin, just press its number.
3. I recommend installing the following plugins: “squirrelspell”, “filters”, “calendar”,
“compatibility”, “newuser_wiz”, “quota_usage”,"secure_login”, and “timeout_user”.
4. Press “s” then ENTER to save.
5. Press “q” to quit, “y” to save, then ENTER to exit.


Note:
The “filters” plugin is used to filter out mail which Maia-Mailguard has modified the subject with "*SPAM* “. If you choose to load this plugin, be sure you edit the “setup.php” file in the plugin's directory to turn "$Allow Spam Filters? = true;" to "$Allow Spam Filters? = false;". Of course, if you are going to use the spam filters, disregard this note.


Squirrel Mail? should now be 100% functional. Be sure to let users know to “purge” their “Trash” directory on occassion so their quota doesn't max out. That's bad.


Mailing Lists:


Im going to be using Mailman for our mailing list program and the postfix-to-mailman script.


Mailman install and setup:
Code:


#cd /usr/ports/mail/mailman
#make all install clean MM_GROUPNAME=nobody MM_GROUPID=65534
(Check /etc/group to be sure on the MM_GROUPID)
(Be sure the “POSTFIX” option is selected from the menu)
#echo «mailman_enable=\"YES\"" >> /etc/rc.conf
#cd /usr/local/mailman
#fetch http://www.gurulabs.com/downloads/postfix-to-mailman-2.1.py
#mv postfix-to-mailman-2.1.py postfix-to-mailman.py
#chmod 750 postfix-to-mailman.py
#chown root:nobody postfix-to-mailman.py


Edit /usr/local/mailman/postfix-to-mailman.py file:
Code:


Line 1, change the python path: #!/usr/local/bin/python
Line 4, change the path to mailman: Mailman Home? = «/usr/local/mailman»;
Line 5, change postmaster account to your own:
Mailman Owner? = «postmaster@domain.tld»;


Edit /usr/local/etc/postfix/main.cf file:
Code:


Find
«relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf»
and add “lists.domain.tld” to it (Or whatever you use for mailing lists).
Find “TRANSPORT MAP” (Roughly line 422) and add below:
transport_maps = hash:/usr/local/etc/postfix/transport
Just under the previous line, add: mailman_destination_recipient_limit = 1


Edit /usr/local/etc/postfix/transport file:
(At the bottom of the file):
Code:


lists.domain.tld mailman:


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


mailman unix – n n – - pipe
flags=FR user=mailman:nobody
argv=/usr/local/mailman/postfix-to-mailman.py ${nexthop} ${user}


Create Postfix transport database:
Code:


#postmap /usr/local/etc/postfix/transport


Reload Postfix:
Code:


#postfix reload


Edit Apache:


Note:
Because the actual hostname is going to be legit, we'll use a sub-domain for our lists. This really makes things easier for everyone.


Edit /usr/local/etc/apache/httpd.conf file:
Code:


Roughly line 1058, uncomment 'NameVirtualHost *:80'.
Directly beneath previous line, add:
<Virtual Host? *>
Server Admin? webmaster@domain.tld
Document Root? /usr/local/mailman
Server Name? lists.domain.tld
Server Alias? lists.domain.tld
Script Alias? /cgi-bin/ «/usr/local/mailman/cgi-bin/»
Script Alias? /mailman/ «/usr/local/mailman/cgi-bin/»
Alias /pipermail «/usr/local/mailman/archives/public»
Error Log? /var/log/httpd/domain.tld-error.log
Custom Log? /var/log/httpd/domain.tld-access.log combined
</Virtual Host?>


Reload Apache:
Code:


#apachectl graceful


Edit /usr/local/mailman/index.html file:
Code:


<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=http://lists.domain.tld/mailman/listinfo">
</HEAD>
<BODY>
Forwarding to <a href="http://lists.domain.tld/mailman/listinfo">http://lists.domain.tld/mailman/listinfo</a>.
</BODY>
</HTML>


Test:
Visit http://lists.domain.tld/ and you should see the forwarding message and then the mailing list information page. If not, restart with the Mail Man? install.


Start Mailman:
Code:


#/usr/local/etc/rc.d/mailman start


You'll notice it gives some output about why it won't start: “Site list is missing: mailman” So, let's create it:


Set our site password:
Code:


#cd /usr/local/mailman
#bin/mmsitepass
New site password: password
Again to confirm password: password


Create mailman list:
Code:


#bin/newlist
Enter the name of the list: mailman
Enter the email of the person running the list: you@domain.tld (Or whomever is going
to be the owner of the list)
Initial mailman password: password
You'll then see instructions to add aliases for the mailing list. We need not
worry about that because everything is virtual. So, proceeding...
Hit enter to notify mailman owner... ENTER


Edit /usr/local/mailman/Mailman/mm_cfg.py file:
(At the bottom):
Code:


add_virtualhost('lists.domain.tld','lists.domain.tld')


Start Mailman:
Code:


#/usr/local/etc/rc.d/mailman start


Test:
Visit http://lists.domain.tld/ again. Once the page loads, click the “the list admin overview page” link. Then, click the “create a new mailing list” link.


Fill in the blanks:
Code:


Name of list: test
Initial list owner address: you@domain.tld
Enter list passwords...
List creator's (authentication) password: site_password
Click “Create List” button.


Subscribe to the test mailing list:


Visit http://lists.domain.tld/mailman/listinfo
Click the name of the new list you've created (You might have to reload/refresh the page if nothing shows up). Fill in the blanks in the section labeled “Subscribing to listname” and submit.


Check your email and confirm your subscription.


Send an email to listname@lists.domain.tld.


If everything goes correctly, the mail should be submitted without a problem. Again, check the /var/log/maillog for any errors that may occur.


If there are no errors, visit http://lists.domain.tld/pipermail/listname to view your submitted mails.


Note:
Also, don't forget to add a «mailman@domain.tld» alias to point to a legit user on your mail server. Otherwise, you'll see errors in your maillog.


And BAM! Just like that, you have a fully functional Postfix MTA with all the trimmings running on Free BSD?. What more could you ask for?


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


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