Mailman Install
# Install Mailman via ports:
#cd /usr/ports/mail/mailman
#make all install clean MM_GROUPNAME=nobody MM_GROUPID=65534
#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:
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:
Find «relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf»
Find “TRANSPORT MAP” (Roughly line 422) and below it add:
transport_maps = hash:/usr/local/etc/postfix/transport
mailman_destination_recipient_limit = 1
# Edit /usr/local/etc/postfix/transport file:
# (At bottom of file)
lists.domain.tld mailman:
# Edit /usr/local/etc/postfix/master.cf file:
# (At bottom of file)
mailman unix – n n – - pipe
# Create Postfix transport database:
#postmap /usr/local/etc/postfix/transport
# Reload Postfix:
#postfix reload
# Edit /usr/local/etc/apache/httpd.conf file:
# Roughly line 1058
Uncomment 'NameVirtualHost *:80'.
Directly beneath previous line, add:
<Virtual Host? *>
</Virtual Host?>
# Reload Apache configuration:
#apachectl graceful
# Edit /usr/local/mailman/index.html file:
<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.
# Set site password:
#cd /usr/local/mailman
#bin/mmsitepass
New site password: password
Again to confirm password: password
# Create Mailman list:
#bin/newlist
Enter the name of the list: mailman
Enter the email of the person running the list: you@domain.tld
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 bottom of file)
add_virtualhost('lists.domain.tld','lists.domain.tld')
# Start Mailman:
#/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:
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.
Назад – Установка SquirrelMail