Merge Request #96

Closed
softwarepublico/softwarepublico!96
Created by Rodrigo Siqueira de Melo

Disable email dev

Adicionamos uma verificação para não enviar email dos ambientes de dev.

1 - Criamos um arquivo main.cf para o ambiente de dev, no qual indicamos explicitamente que queremos mudar a forma de envio;

2 - Criamos um template master.cf que muda para produção e para desenvolvimento;

3 - Por fim verificamos o "ambiente" e de acordo com ele adaptamos o template.

@joenio tu pode dar uma olhada também?

Assignee: Antonio Terceiro
Milestone: None

Closed by David Silva

Changes were not merged into target branch

Commits (3)
4 participants
    75e3b052e046e34cbb10917c5f9901d7?s=40&d=identicon
    Antonio Terceiro started a discussion on the outdated diff
    last updated by Antonio Terceiro
    cookbooks/email/recipes/relay.rb
      62 + :command => "tee --append /var/tmp/fs_mail.dump",
      63 + :extra => ""})
      64 + notifies :create, 'cookbook_file[/etc/postfix/main.cf]'
      65 + else
      66 + variables({ :postfix_service => "mailman",
      67 + :flag => "FR",
      68 + :user => "mailman:mailman",
      69 + :command => "/usr/lib/mailman/bin/postfix-to-mailman.py",
      70 + :extra => "{nexthop} ${user}}"})
      71 + end
      72 + notifies :reload, 'service[postfix]'
      73 +end
      74 +
      75 +cookbook_file '/etc/postfix/main.cf' do
      76 + action :nothing
      77 +end
    1
    • 75e3b052e046e34cbb10917c5f9901d7?s=40&d=identicon
      Antonio Terceiro @terceiro

      isso aqui vai desfazer todas as mudanças feitas mais acima com chamadas a postconf. não vai dar certo.

      Choose File ...   File name...
      Cancel
  • 75e3b052e046e34cbb10917c5f9901d7?s=40&d=identicon
    Antonio Terceiro @terceiro

    além disso note que já existe um master.cf:

    $ find . -name master.cf
    ./cookbooks/mailman/files/centos/master.cf
    

    eu faria diferente, algo assim:

    cookbook_file '/etc/postfix/master.cf' do
      if node['environment'] == 'development'
        source 'master.cf.development'
      end
      # ...
    end
    

    e aí vc coloca o master.cf personalizado para o ambiente de dev em ./cookbooks/mailman/files/centos/master.cf.development

    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Iremos corrigir isso terceiro, pensamos que fazer na forma de template ficaria melhor.

    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • 18759b2d - Creates master.cf.development cookbook_file
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • bbdb636d - Creates master.cf.development cookbook_file
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • eb116c72 - Creates master.cf.development cookbook_file
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • 951a3d76 - Creates master.cf.development cookbook_file
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • fbd4a5e8 - Creates master.cf.development cookbook_file
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • c236ce60 - Uses postconf to configure main.cf
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 1 new commit:

    • d97a862b - Fixs postconf call.
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 127 new commits:

    • 92af2c0e - Update translations
    • 727cf719 - Solution temporary for buttons on events area
    • ac32fe08 - Fixing divs of download's block
    • 8ee24462 - Fixes minor style bugs that occurred in dev. Adds humanized style for numbers. F…
    • aa2a7508 - Fix institutions cnpj validations and do some fine tunes on modal style
    • 5f37f601 - Change "favoritos" to "avaliação"
    • f42b2b59 - Added macro for profile variables
    • 38ffbe63 - Fix statistic block crash on profile template
    • 41d3fa32 - Bump version
    • 31e8c80d - Bump version
    • 3ed26864 - Added new search template
    • 605b3b25 - Fixed search containers
    • 35abc9f9 - Added global search box
    • 55e9b6c2 - Added order filter to search
    • e0435339 - Set default search ordering to 'latest'
    • db3b38e6 - Expanded column width for email subscriptions
    • f5212b93 - Adding gitlab_view to colab-spb-plugin
    • d7936151 - Version bump
    • 029b624b - Refactoring search association from community
    • a71c7131 - Adding namespace to app.py
    • 741aaf27 - colab-spb-plugin version bump
    • 9b7d8c48 - Bump colab-spb-theme version to 0.3
    • 607127e6 - Bump colab-deps version to 1.12
    • 4fb22996 - Bump colab version to 1.12
    • e8a2c6ce - renamed plugin in setup.py
    • 1cfa1503 - Colab version bump
    • 8cdcabac - Fixed colab collectstatic
    • e940c6e2 - Changing message preview include
    • 1ece09d5 - Bump Version of colab-spb-theme
    • 249c787b - Bump colab-deps version
    • e726ef8a - Bump colab-spb-plugin version
    • b51287a7 - Bump colab version to 1.12.3
    • b89c37f4 - Bump colab version in colab-spb-theme
    • ae1938ec - Sisp redirect
    • 6da345f2 - Appended colab- to search fields
    • b34f81a1 - Allow 500mb for uploads on sisp
    • b4b800c3 - Added HTTPS certs for SISP (test envs only)
    • 0c4bac32 - Persisting value of search box in spb-theme
    • 2c9208e0 - Resized alert block on user create form
    • 772b9f4e - Fixed nginx redirects for sisp
    • 45b06ba6 - Fixing ordering names translations in colab-theme
    • e2791e73 - Changed SISP domain for prod
    • c2bb3bb5 - Bump colab-spb-theme version
    • 3c4e6153 - Bumped colab-spb-theme version on spec
    • b62ea676 - Colab-deps version bump
    • 74b80638 - Bumped colab version
    • 1f430cd1 - Updated colab-deps
    • 9c7c18da - Added padding and color to result register
    • 41bd23a3 - dump colab-deps version
    • a17c03a0 - dump colab-spb-theme-plugin version
    • c9042dcb - Removing mac flag
    • e36434c5 - dump colab-spb-theme version
    • cc480f76 - dump colab and colab-deps version
    • 4c68846d - Bumps colab theme version
    • 2c97a464 - Bumps colab version
    • 492440ee - Increasing colab-deps version in spec
    • f316cd77 - Increasing colab release version
    • c1c9fa71 - bump noosfero version
    • 95c0e9ef - Update jquery in colab-spb
    • 8de5c79a - Increased font-size and weight on search preview
    • c20add56 - Bump version from colab-deps and colab-spb-plugin.
    • 3bc4e7b5 - Bump version from colab-spb-theme
    • c8b46b89 - Bump spec version from colab-spb-theme
    • bce4ffe2 - Fix colab dependency version.
    • 19fac466 - Minor fixes on software_communities_plugin/allow_variables macro
    • eff2b336 - Update translations
    • 7beb87cd - Bump colab release
    • de63c950 - SECOM style on breadcrumbs
    • 8fcfd5c0 - Style for previous page of discussion list
    • e6a6d0d4 - Removing unecessary jquery in colab-spb
    • 18927d7d - Display lateral box software event block only in event pages
    • 29373306 - Bump version from noosfero-spb
    • e6269fd9 - fix syntax error on software catalog sortby option
    • 6edaf579 - Increase version noosfero.spec
    • e1ef08e8 - Bump colab-deps spec version
    • 54159ccb - Bump colab-spb-plugin version
    • 4fbe2d6e - Bump colab spec version and colab-deps version
    • 852bbedd - Update translations
    • 65238965 - Increase noosfero-spb.spec and noosfero-spb Makefile
    • 6f180e74 - Add task to create missing blocks in software
    • 14d57c89 - Create task to import email list article on softwares
    • 8fa746da - Increase noosfero and noosfero-spb specs versions
    • 0e6c7598 - Minor fix to the gov_user plugin translation. Changed the subject of the translation.
    • 29bc0ac1 - Fix software community events block box-2 display
    • 5c1f2a37 - fix modal desciption font
    • c3b96cd5 - Remove softwre with nil community.
    • 6feaa352 - Bumps noosfero version
    • ee26725b - Create multi theme structure
    • 8b3910d5 - Context_processor to sisp URL
    • dc71d323 - Using context_processors on header
    • 3f447c65 - SISP Header
    • 43dee780 - SISP Footer
    • b59c6a46 - Quick access to SISP Portal from SPB
    • c41e6722 - SISP links
    • 43e7acfc - URLs for each portal
    • d0133b43 - Adding links between portals
    • 56d16809 - Config SISP url in Colab settings
    • 6a416a62 - Hide some links
    • 181fdaba - Bump colab-spb-plugin version to 0.2.5
    • f9a51048 - Bump colab-deps spec version to 1.12.9
    • e8dcc467 - Bump colab-deps version to 1.12.9 in colab spec
    • d55e97f5 - Bump colab-spb-theme version to 0.3.6
    • 61f9ac6e - Bump colab-spb-plugin spec version to 0.3.6
    • 48edbd6c - Dropdown for thread menu
    • 46e68371 - Bumps colab-spb-theme-plugin version
    • f8c9db05 - Missing header tag
    • e74926b7 - Bumps colab-spb-theme version to 0.3.8
    • 594c0c9e - Bumps colab-spb-theme spec to 0.3.8
    • 9451d3bf - bump colab-deps release
    • 78d0d8f6 - Fix: migration skips softwares without community
    • e9dc36e3 - Fix class name on migration
    • ce7a76d4 - Fixes pagination in members page
    • c82dc4d4 - Add sisp catalog
    • 00e2d70a - set mailman default language
    • 38e25ac7 - Bump noosfero version
    • a96ac23f - fix showing license_info in software API
    • a42f46a2 - Adjusts classes and id's in css and change minor style bugs
    • eeafac97 - Update translation
    • 1f9ac63f - Bump Noosfero version
    • 142730b0 - Software catalog bug fixes
    • 0633bb22 - Minor fix on the text's box of the news on homepage - #613
    • 28a947ed - Bump noosfero-spb version
    • edfd0cde - Bump noosfero-spb release
    • 92a8f82a - Removes unecessary expired private token.
    • 1c2f07b7 - Add different configuration for email in dev
    • 99dcff1a - Creates master.cf.development cookbook_file
    • bf7763ca - Uses postconf to configure main.cf
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Added 30 new commits:

    • 5a532ac9 - Adjustment previous page to discussion list - #468
    • 88a05624 - Update SISP translations
    • c4cd7e6e - Fix rating form arrow bug
    • 0f35cf22 - Update event block translation
    • 4f675eae - Update Sisp admin identifier
    • ede8004d - Updates SISP migration timestamp
    • 0308c4e2 - Bump noosfero-spb version
    • 2d490916 - Bump noosfero-spb package Version
    • fecd2bf0 - Bump noosfero version
    • 1861f58a - Create labels for blocks of softwares download - Closes #511
    • 2123ef32 - fix load data field on download block edition
    • fd7d75c5 - Improvements on task that creates discussion list
    • a04a6d70 - Fix translation of categories name
    • 4e154cca - Remove secondary_email from user
    • ebaf5f1b - Fix link of categories on categores_and_tags block
    • 33c662a4 - Bump colab version
    • 790cebf1 - Mailing list summary page
    • 71bfa4c4 - Bump colab-spb-theme version
    • 6fe67cca - Fix bug when there was no event to be displayed
    • ec61ae25 - Bump colab-spb-theme package version
    • a66c5107 - Bump noosfero-spb version
    • 3511ce7e - Reduced top from total and order text
    • 98516c42 - Bump colab-theme version
    • cc2cde77 - Add label you-are-here based on secom breadcrumbs pattern
    • b999c560 - Fix link to community when there are 2 environments
    • 2f121f70 - Fix sisp task
    • cf9ab5eb - Bump noosfero-spb version
    • 6c6b431e - Add different configuration for email in dev
    • 75710e37 - Creates master.cf.development cookbook_file
    • 2ecce2e3 - Uses postconf to configure main.cf
    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Eu acabei fazendo o merge para a stable4-x. Estou fechando esse merge request, e abrindo outro para a master.

    Choose File ...   File name...
    Cancel
  • Bd4a075a0ea744c8d171c93e95a6f1da?s=40&d=identicon
    David Silva @davidcarlos

    Status changed to closed

    Choose File ...   File name...
    Cancel