Commit e722278f963536d0b3acbdb6420627e30dc0c268
Exists in
master
and in
90 other branches
Merge remote-tracking branch 'origin/docs'
Showing
2 changed files
with
184 additions
and
7 deletions
Show diff stats
docs/install.rst
| ... | ... | @@ -192,9 +192,11 @@ Para configurar o Nginx crie o arquivo ``/etc/nginx/conf.d/colab.conf`` com o co |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | |
| 195 | -Substitua o domínio de exemplo ``beta.softwarepublico.gov.br`` pelo domínio desejado. | |
| 195 | +Substitua o domínio de exemplo ``beta.softwarepublico.gov.br`` pelo domínio | |
| 196 | +desejado. | |
| 196 | 197 | |
| 197 | -Certifique-se de instalar o certificado SSL (``/etc/nginx/colab.crt``) e sua chave privada (``/etc/nginx/colab.crt``). | |
| 198 | +Certifique-se de instalar o certificado SSL (``/etc/nginx/colab.crt``) e sua | |
| 199 | +chave privada (``/etc/nginx/colab.key``). | |
| 198 | 200 | |
| 199 | 201 | Reinicie o serviço do Nginx com o comando: ``sudo service nginx restart``. |
| 200 | 202 | |
| ... | ... | @@ -251,13 +253,15 @@ Edite o arquivo ``/etc/colab/settings.yaml`` e configure o endereço das ferrame |
| 251 | 253 | upstream: 'http://localhost:8090/noosfero' |
| 252 | 254 | |
| 253 | 255 | |
| 254 | -Após editar todos os arquivos desejados reinicie o processo do Colab com utilizando o comando ``service colab restart``. | |
| 256 | +Após editar todos os arquivos desejados reinicie o processo do Colab com | |
| 257 | +utilizando o comando ``service colab restart``. | |
| 255 | 258 | |
| 256 | 259 | |
| 257 | 260 | Gitlab |
| 258 | 261 | ++++++ |
| 259 | 262 | |
| 260 | -Edite o arquivo ``/etc/gitlab/gitlab.yaml`` acrescentando o atributo relative_url_root após a linha ``email_from: example@example.com``. | |
| 263 | +Edite o arquivo ``/etc/gitlab/gitlab.yml`` acrescentando o atributo | |
| 264 | +relative_url_root após a linha ``email_from: example@example.com``. | |
| 261 | 265 | Veja o exemplo a seguir: |
| 262 | 266 | |
| 263 | 267 | .. code-block:: yaml |
| ... | ... | @@ -302,7 +306,7 @@ seguinte conteúdo: |
| 302 | 306 | Crie/edite o arquivo ``/etc/default/noosfero`` e adicione a seguinte |
| 303 | 307 | linha: |
| 304 | 308 | |
| 305 | -.. code-block:: sh | |
| 309 | +.. code-block:: ruby | |
| 306 | 310 | |
| 307 | 311 | export RAILS_RELATIVE_URL_ROOT=/social |
| 308 | 312 | |
| ... | ... | @@ -335,6 +339,9 @@ administrador do `mailman`, e ``PASSWORD`` pela senha de administração do |
| 335 | 339 | $ sudo service mailman restart |
| 336 | 340 | |
| 337 | 341 | |
| 342 | +Postfix | |
| 343 | ++++++++ | |
| 344 | + | |
| 338 | 345 | Configure o postfix: |
| 339 | 346 | |
| 340 | 347 | .. code-block:: sh |
| ... | ... | @@ -342,13 +349,50 @@ Configure o postfix: |
| 342 | 349 | $ sudo postconf relay_domains=listas.softwarepublico.gov.br |
| 343 | 350 | $ sudo postconf transport_maps=hash:/etc/postfix/transport |
| 344 | 351 | |
| 345 | -Crie/edite ``/etc/postfix/transport`` com o seguinte conteúdo:: | |
| 352 | +Crie/edite ``/etc/postfix/transport`` com o seguinte conteúdo: | |
| 353 | + | |
| 354 | +.. code-block:: sh | |
| 346 | 355 | |
| 347 | 356 | listas.softwarepublico.gov.br mailman: |
| 348 | 357 | |
| 349 | -Gere o banco de dados para consulta, e reinicie o serviço:: | |
| 358 | + | |
| 359 | +Faça o download do arquivo :download:`postfix-to-mailman-centos.py` e salve no | |
| 360 | +diretório ``/etc/postfix``. | |
| 361 | + | |
| 362 | +Adicione o seguinte conteúdo no final do arquivo ``/etc/postfix/master.cf``: | |
| 363 | + | |
| 364 | +:: | |
| 365 | + | |
| 366 | + mailman unix - n n - - pipe | |
| 367 | + flags=FR user=mailman:mailman | |
| 368 | + argv=/etc/postfix/postfix-to-mailman-centos.py ${nexthop} ${user} | |
| 369 | + | |
| 370 | +Gere o banco de dados para consulta, e reinicie o serviço: | |
| 350 | 371 | |
| 351 | 372 | .. code-block:: sh |
| 352 | 373 | |
| 353 | 374 | $ sudo postmap /etc/postfix/transport |
| 354 | 375 | $ sudo service postfix restart |
| 376 | + | |
| 377 | +Inicie o serviço do mailman-api: | |
| 378 | + | |
| 379 | +.. code-block:: sh | |
| 380 | + | |
| 381 | + $ sudo service mailman-api start | |
| 382 | + | |
| 383 | + | |
| 384 | +Habilitar inicialização automática dos serviços | |
| 385 | ++++++++++++++++++++++++++++++++++++++++++++++++ | |
| 386 | + | |
| 387 | +Para permitir que os serviços iniciem automaticamente, execute os comandos | |
| 388 | +abaixo: | |
| 389 | + | |
| 390 | +.. code-block:: sh | |
| 391 | + | |
| 392 | + $ sudo systemctl enable mailman | |
| 393 | + $ sudo systemctl enable mailman-api | |
| 394 | + $ sudo systemctl enable nginx | |
| 395 | + $ sudo systemctl enable colab | |
| 396 | + $ sudo systemctl enable noosfero | |
| 397 | + $ sudo chkconfig --add gitlab | |
| 398 | + $ sudo chkconfig --add solr | ... | ... |
| ... | ... | @@ -0,0 +1,133 @@ |
| 1 | +#! /usr/bin/env python | |
| 2 | + | |
| 3 | +# Configuration variables - Change these for your site if necessary. | |
| 4 | +MailmanHome = "/var/lib/mailman"; # Mailman home directory. | |
| 5 | +MailmanOwner = "postmaster@example.com"; # Postmaster and abuse mail recipient. | |
| 6 | +MailmanScripts = "/usr/lib/mailman"; # Where mailman scripts reside | |
| 7 | + | |
| 8 | +# End of configuration variables. | |
| 9 | + | |
| 10 | +# postfix-to-mailman-2.1.py (to be installed as postfix-to-mailman.py) | |
| 11 | +# | |
| 12 | +# Interface mailman to a postfix with a mailman transport. Does not require | |
| 13 | +# the creation of _any_ aliases to connect lists to your mail system. | |
| 14 | +# | |
| 15 | +# Dax Kelson, dkelson@gurulabs.com, Sept 2002. | |
| 16 | +# coverted from qmail to postfix interface | |
| 17 | +# Jan 2003: Fixes for Mailman 2.1 | |
| 18 | +# Thanks to Simen E. Sandberg <senilix@gallerbyen.net> | |
| 19 | +# Feb 2003: Change the suggested postfix transport to support VERP | |
| 20 | +# Thanks to Henrique de Moraes Holschuh <henrique.holschuh@ima.sp.gov.br> | |
| 21 | +# | |
| 22 | +# This script was originally qmail-to-mailman.py by: | |
| 23 | +# Bruce Perens, bruce@perens.com, March 1999. | |
| 24 | +# This is free software under the GNU General Public License. | |
| 25 | +# | |
| 26 | +# This script is meant to be called from ~mailman/postfix-to-mailman.py. | |
| 27 | +# It catches all mail to a virtual domain, eg "lists.example.com". | |
| 28 | +# It looks at the recipient for each mail message and decides if the mail is | |
| 29 | +# addressed to a valid list or not, and bounces the message with a helpful | |
| 30 | +# suggestion if it's not addressed to a list. It decides if it is a posting, | |
| 31 | +# a list command, or mail to the list administrator, by checking for the | |
| 32 | +# -admin, -owner, and -request addresses. It will recognize a list as soon | |
| 33 | +# as the list is created, there is no need to add _any_ aliases for any list. | |
| 34 | +# It recognizes mail to postmaster, mailman-owner, abuse, mailer-daemon, root, | |
| 35 | +# and owner, and routes those mails to MailmanOwner as defined in the | |
| 36 | +# configuration variables, above. | |
| 37 | +# | |
| 38 | +# INSTALLATION: | |
| 39 | +# | |
| 40 | +# Install this file as ~mailman/postfix-to-mailman.py | |
| 41 | +# | |
| 42 | +# To configure a virtual domain to connect to mailman, edit Postfix thusly: | |
| 43 | +# | |
| 44 | +# /etc/postfix/main.cf: | |
| 45 | +# relay_domains = ... lists.example.com | |
| 46 | +# transport_maps = hash:/etc/postfix/transport | |
| 47 | +# mailman_destination_recipient_limit = 1 | |
| 48 | +# | |
| 49 | +# /etc/postfix/transport: | |
| 50 | +# lists.example.com mailman: | |
| 51 | +# | |
| 52 | +# /etc/postfix/master.cf | |
| 53 | +# mailman unix - n n - - pipe | |
| 54 | +# flags=FR user=mailman:mailman | |
| 55 | +# argv=/var/mailman/postfix-to-mailman.py ${nexthop} ${user} | |
| 56 | +# | |
| 57 | +# | |
| 58 | +# Replace list.example.com above with the name of the domain to be connected | |
| 59 | +# to Mailman. Note that _all_ mail to that domain will go to Mailman, so you | |
| 60 | +# don't want to put the name of your main domain here. Typically a virtual | |
| 61 | +# domain lists.domain.com is used for Mailman, and domain.com for regular | |
| 62 | +# email. | |
| 63 | +# | |
| 64 | + | |
| 65 | +import sys, os, re, string | |
| 66 | + | |
| 67 | +def main(): | |
| 68 | + os.nice(5) # Handle mailing lists at non-interactive priority. | |
| 69 | + # delete this if you wish | |
| 70 | + | |
| 71 | + os.chdir(MailmanHome + "/lists") | |
| 72 | + | |
| 73 | + try: | |
| 74 | + local = sys.argv[2] | |
| 75 | + except: | |
| 76 | + # This might happen if we're not using Postfix | |
| 77 | + sys.stderr.write("LOCAL not set?\n") | |
| 78 | + sys.exit(1) | |
| 79 | + | |
| 80 | + local = string.lower(local) | |
| 81 | + local = re.sub("^mailman-","",local) | |
| 82 | + | |
| 83 | + names = ("root", "postmaster", "mailer-daemon", "mailman-owner", "owner", | |
| 84 | + "abuse") | |
| 85 | + for i in names: | |
| 86 | + if i == local: | |
| 87 | + os.execv("/usr/sbin/sendmail", | |
| 88 | + ("/usr/sbin/sendmail", MailmanOwner)) | |
| 89 | + sys.exit(0) | |
| 90 | + | |
| 91 | + type = "post" | |
| 92 | + types = (("-admin$", "admin"), | |
| 93 | + ("-owner$", "owner"), | |
| 94 | + ("-request$", "request"), | |
| 95 | + ("-bounces$", "bounces"), | |
| 96 | + ("-confirm$", "confirm"), | |
| 97 | + ("-join$", "join"), | |
| 98 | + ("-leave$", "leave"), | |
| 99 | + ("-subscribe$", "subscribe"), | |
| 100 | + ("-unsubscribe$", "unsubscribe")) | |
| 101 | + | |
| 102 | + for i in types: | |
| 103 | + if re.search(i[0],local): | |
| 104 | + type = i[1] | |
| 105 | + local = re.sub(i[0],"",local) | |
| 106 | + | |
| 107 | + if os.path.exists(local): | |
| 108 | + os.execv(MailmanScripts + "/mail/mailman", | |
| 109 | + (MailmanScripts + "/mail/mailman", type, local)) | |
| 110 | + else: | |
| 111 | + bounce() | |
| 112 | + sys.exit(75) | |
| 113 | + | |
| 114 | +def bounce(): | |
| 115 | + bounce_message = """\ | |
| 116 | +TO ACCESS THE MAILING LIST SYSTEM: Start your web browser on | |
| 117 | +http://%s/ | |
| 118 | +That web page will help you subscribe or unsubscribe, and will | |
| 119 | +give you directions on how to post to each mailing list.\n""" | |
| 120 | + sys.stderr.write(bounce_message % (sys.argv[1])) | |
| 121 | + sys.exit(1) | |
| 122 | + | |
| 123 | +try: | |
| 124 | + sys.exit(main()) | |
| 125 | +except SystemExit, argument: | |
| 126 | + sys.exit(argument) | |
| 127 | + | |
| 128 | +except Exception, argument: | |
| 129 | + info = sys.exc_info() | |
| 130 | + trace = info[2] | |
| 131 | + sys.stderr.write("%s %s\n" % (sys.exc_type, argument)) | |
| 132 | + sys.stderr.write("Line %d\n" % (trace.tb_lineno)) | |
| 133 | + sys.exit(75) # Soft failure, try again later. | ... | ... |