Created
December 10, 2014 11:56
-
-
Save emasters/5d3463fe9437434eebfa to your computer and use it in GitHub Desktop.
Mailman - Nginx - Uwsgi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [uwsgi] | |
| master = True | |
| touch-reload = %p | |
| daemonize = /var/log/uwsgi-mailman.log | |
| # make sure pid file is readable and writable by uid listed below | |
| pidfile = /tmp/uwsgi-mailman.pid | |
| log-maxsize = 20971520 | |
| #port to listen on | |
| socket = 127.0.0.1:4444 | |
| chdir = / | |
| # webserver uid, mailman gid | |
| uid = www-data | |
| gid = list | |
| #requires installing python plugin for wusgi | |
| plugins = python | |
| threads = 20 | |
| # Debian's standard location | |
| cgi = /=/usr/lib/cgi-bin/mailman | |
| cgi-index = listinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # insert into /etc/postfix/main.cf where needed | |
| # Do not define the virtual host anywhere else, only through mailman. | |
| alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases | |
| alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases | |
| mydestination = localhost, lists.example.com | |
| #For Mailman | |
| relay_domains = $mydestination, lists.teknoids.net | |
| relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman | |
| transport_maps = hash:/etc/postfix/transport | |
| mailman_destination_recipient_limit = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # insert into /etc/postfix/master.cf where needed | |
| mailman unix - n n - - pipe | |
| flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a partial listing. Needs to be inserted in your mm_cfg.py as needed. | |
| # If you are running a dedicated domain for your lists use the URL pattern below | |
| # to to create nice clean URLs of the form http://lists.example.com/#mm_command## | |
| # and avoid things like exposing cgi-bin in the URLs | |
| DEFAULT_URL_PATTERN = 'http://%s/' | |
| PRIVATE_ARCHIVE_URL = '/cgi-bin/mailman/private' | |
| IMAGE_LOGOS = '/images/mailman/' | |
| # to work with Postfix virtual domains | |
| MTA='Postfix' | |
| POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.example.com'] | |
| # alias for postmaster, abuse and mailer-daemon | |
| DEB_LISTMASTER = '[email protected]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #defines the server available to nginx | |
| server { | |
| server_name lists.example.com; | |
| root /usr/lib; | |
| # direct access to images | |
| location /images/mailman/ { | |
| alias /usr/share/images/mailman/; | |
| } | |
| # direct access to the public archives | |
| location /pipermail { | |
| alias /var/lib/mailman/archives/public/; | |
| index index.html; | |
| } | |
| # redirect old urls | |
| location /mailman { | |
| rewrite ^/mailman(.*) /$1 permanent; | |
| } | |
| # evertyhing else pass to uwsgi-cgi | |
| location / { | |
| include uwsgi_params; | |
| uwsgi_modifier1 9; | |
| uwsgi_pass 127.0.0.1:4444; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # you may need to create this file | |
| lists.example.com mailman: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment