Commit 28b096dcd1bded64d94d1a4bf59d6bdc474839ac

Authored by Antonio Terceiro
1 parent 2ace0960
Exists in master and in 90 other branches 3.x, add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup, backup_not_prod, cdtc_configuration, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev-lappis, dev_env_minimal, disable_email_dev, docs, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, performance, prezento, r3, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_backup_emails, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, stable-devel, support_docs, syslog, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

switch to colab master branch

Showing 2 changed files with 38 additions and 18 deletions   Show diff stats
.mrconfig
1 1 [.]
2 2  
3 3 [colab]
4   -checkout = git clone https://github.com/colab-community/colab.git --branch pypi
  4 +checkout = git clone https://github.com/colab-community/colab.git
5 5  
6 6 [mailman-api]
7 7 checkout = git clone https://github.com/TracyWebTech/mailman-api.git
... ...
vagrant.d/10-mailman-debian
... ... @@ -35,28 +35,18 @@ EOF
35 35 apt-get update
36 36 fi
37 37  
38   -# pre-configure postfix
  38 +# pre-configure packages
39 39 'debconf-set-selections' <<EOF
40 40 postfix postfix/main_mailer_type select Internet Site
  41 +
  42 +mailman mailman/site_languages multiselect pt_BR (Brasilian Portuguese)
  43 +mailman mailman/default_server_language select pt_BR (Brasilian Portuguese)
41 44 EOF
42 45  
43 46 apt-get install -qy postfix mailman mailman-api
44 47  
45 48 LISTS_DOMAIN=lists.local
46   -
47   -#################################################################
48   -# mailman-api configuration
49   -#################################################################
50   -
51   -# FIXME binding to 0.0.0.0 is too liberal
52   -cat > /etc/default/mailman-api <<EOF
53   -OPTIONS='--bind=0.0.0.0:8010'
54   -EOF
55   -service mailman-api restart
56   -
57   -if ! grep -q MAILMAN_API_URL /etc/colab/settings.yaml; then
58   - echo "MAILMAN_API_URL: 'http://localhost:8010'" >> /etc/colab/settings.yaml
59   -fi
  49 +TEST_LISTS='list01 list02 list03'
60 50  
61 51 #################################################################
62 52 # mailman configuration
... ... @@ -78,21 +68,51 @@ mailman_config MTA None
78 68 mailman_config POSTFIX_STYLE_VIRTUAL_DOMAINS "['$LISTS_DOMAIN']"
79 69 mailman_config DEB_LISTMASTER "'vagrant@localhost.localdomain'"
80 70  
  71 +# create mailman's meta-list
  72 +sudo -u list newlist --quiet mailman vagrant@localhost.localdomain "pass-mailman"
  73 +service mailman restart
  74 +
81 75 # create some sample lists
82   -for list in list01 list02 list03; do
  76 +for list in $TEST_LISTS; do
83 77 if list_lists --bare | grep "$list"; then
84 78 echo "$list already exists ..."
85 79 else
86   - newlist "$list" vagrant@localhost.localdomain "pass-$list"
  80 + sudo -u list newlist --quiet "$list" vagrant@localhost.localdomain "pass-$list"
87 81 echo 'vagrant@localhost.localdomain' | add_members -r - "$list"
88 82 fi
89 83 done
90 84  
91 85 #################################################################
  86 +# mailman-api configuration
  87 +#################################################################
  88 +
  89 +# FIXME binding to 0.0.0.0 is too liberal
  90 +cat > /etc/default/mailman-api <<EOF
  91 +OPTIONS='--bind=0.0.0.0:8010'
  92 +EOF
  93 +service mailman-api restart
  94 +
  95 +if ! grep -q MAILMAN_API_URL /etc/colab/settings.yaml; then
  96 + echo "MAILMAN_API_URL: 'http://localhost:8010'" >> /etc/colab/settings.yaml
  97 +fi
  98 +
  99 +
  100 +#################################################################
92 101 # postfix configuration
93 102 #################################################################
  103 +
94 104 postconf relay_domains="$LISTS_DOMAIN"
95 105 postconf transport_maps=hash:/etc/postfix/transport
96 106 echo "$LISTS_DOMAIN mailman:" > /etc/postfix/transport
97 107 postmap /etc/postfix/transport
98 108 service postfix restart
  109 +
  110 +#################################################################
  111 +# post a few message to each list
  112 +#################################################################
  113 +
  114 +for list in $TEST_LISTS; do
  115 + for i in $(seq 1 10); do
  116 + (echo "this is a test ($i)") | mail -r vagrant@localhost.localdomain -s "test $i" "$list@lists.local"
  117 + done
  118 +done
... ...