rmails 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/Gemfile +24 -0
- data/Gemfile.lock +167 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +9 -0
- data/Rakefile +31 -0
- data/Rakefile1 +9 -0
- data/Vagrantfile +51 -0
- data/app/assets/images/arrow_bottom.gif +0 -0
- data/app/assets/images/arrow_right.gif +0 -0
- data/app/assets/images/at-sign.png +0 -0
- data/app/assets/images/checkerboard.gif +0 -0
- data/app/assets/images/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/glyphicons-halflings.png +0 -0
- data/app/assets/images/icon_draft.gif +0 -0
- data/app/assets/images/icon_layout.gif +0 -0
- data/app/assets/images/icon_move.gif +0 -0
- data/app/assets/images/icon_regular.gif +0 -0
- data/app/assets/images/icon_snippet.gif +0 -0
- data/app/assets/images/nav_arrow.png +0 -0
- data/app/assets/images/x.png +0 -0
- data/app/assets/javascripts/application.coffee.erb +27 -0
- data/app/assets/javascripts/canjs/can.construct.proxy.js +60 -0
- data/app/assets/javascripts/canjs/can.construct.super.js +44 -0
- data/app/assets/javascripts/canjs/can.control.plugin.js +245 -0
- data/app/assets/javascripts/canjs/can.control.view.js +88 -0
- data/app/assets/javascripts/canjs/can.dojo.js +3669 -0
- data/app/assets/javascripts/canjs/can.dojo.min.js +66 -0
- data/app/assets/javascripts/canjs/can.fixture.js +1020 -0
- data/app/assets/javascripts/canjs/can.jquery.js +2995 -0
- data/app/assets/javascripts/canjs/can.jquery.min.js +52 -0
- data/app/assets/javascripts/canjs/can.mootools.js +3462 -0
- data/app/assets/javascripts/canjs/can.mootools.min.js +63 -0
- data/app/assets/javascripts/canjs/can.observe.attributes.js +293 -0
- data/app/assets/javascripts/canjs/can.observe.backup.js +368 -0
- data/app/assets/javascripts/canjs/can.observe.delegate.js +359 -0
- data/app/assets/javascripts/canjs/can.observe.setter.js +58 -0
- data/app/assets/javascripts/canjs/can.observe.validations.js +374 -0
- data/app/assets/javascripts/canjs/can.view.modifiers.js +292 -0
- data/app/assets/javascripts/canjs/can.yui.js +3530 -0
- data/app/assets/javascripts/canjs/can.yui.min.js +65 -0
- data/app/assets/javascripts/canjs/can.zepto.js +3426 -0
- data/app/assets/javascripts/canjs/can.zepto.min.js +62 -0
- data/app/assets/javascripts/controls/admins.coffee.erb +105 -0
- data/app/assets/javascripts/controls/aliases.coffee.erb +91 -0
- data/app/assets/javascripts/controls/domains.coffee.erb +115 -0
- data/app/assets/javascripts/controls/settings.coffee.erb +47 -0
- data/app/assets/javascripts/controls/users.coffee.erb +94 -0
- data/app/assets/javascripts/lib/facebox.js +311 -0
- data/app/assets/javascripts/lib/html5.js +2 -0
- data/app/assets/javascripts/lib/jquery.js +9301 -0
- data/app/assets/javascripts/lib/jquery_formparams.js +108 -0
- data/app/assets/javascripts/lib/jquery_input_hint.js +20 -0
- data/app/assets/javascripts/lib/jquery_paginate.js +120 -0
- data/app/assets/javascripts/lib/jquery_ui_custom.js +6 -0
- data/app/assets/javascripts/lib/json2.js +487 -0
- data/app/assets/javascripts/lib/utils.coffee.erb +48 -0
- data/app/assets/javascripts/models/admin.coffee.erb +42 -0
- data/app/assets/javascripts/models/alias.coffee.erb +28 -0
- data/app/assets/javascripts/models/domain.coffee.erb +39 -0
- data/app/assets/javascripts/models/property.coffee.erb +18 -0
- data/app/assets/javascripts/models/user.coffee.erb +29 -0
- data/app/assets/stylesheets/application.sass +156 -0
- data/app/assets/stylesheets/base.css.sass +243 -0
- data/app/assets/stylesheets/facebox.css +80 -0
- data/app/assets/stylesheets/lib/bootstrap.css +9 -0
- data/app/assets/stylesheets/twitter/bootstrap-responsive.scss +1 -0
- data/app/assets/stylesheets/twitter/bootstrap.scss +63 -0
- data/app/assets/stylesheets/twitter/bootstrap/_accordion.scss +34 -0
- data/app/assets/stylesheets/twitter/bootstrap/_alerts.scss +79 -0
- data/app/assets/stylesheets/twitter/bootstrap/_breadcrumbs.scss +24 -0
- data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +229 -0
- data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +228 -0
- data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +158 -0
- data/app/assets/stylesheets/twitter/bootstrap/_close.scss +32 -0
- data/app/assets/stylesheets/twitter/bootstrap/_code.scss +61 -0
- data/app/assets/stylesheets/twitter/bootstrap/_component-animations.scss +22 -0
- data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +237 -0
- data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +689 -0
- data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +21 -0
- data/app/assets/stylesheets/twitter/bootstrap/_hero-unit.scss +25 -0
- data/app/assets/stylesheets/twitter/bootstrap/_labels-badges.scss +83 -0
- data/app/assets/stylesheets/twitter/bootstrap/_layouts.scss +16 -0
- data/app/assets/stylesheets/twitter/bootstrap/_media.scss +55 -0
- data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +690 -0
- data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +95 -0
- data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +497 -0
- data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +409 -0
- data/app/assets/stylesheets/twitter/bootstrap/_pager.scss +43 -0
- data/app/assets/stylesheets/twitter/bootstrap/_pagination.scss +123 -0
- data/app/assets/stylesheets/twitter/bootstrap/_popovers.scss +133 -0
- data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +122 -0
- data/app/assets/stylesheets/twitter/bootstrap/_reset.scss +216 -0
- data/app/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.scss +28 -0
- data/app/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.scss +193 -0
- data/app/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.scss +19 -0
- data/app/assets/stylesheets/twitter/bootstrap/_responsive-navbar.scss +189 -0
- data/app/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +74 -0
- data/app/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +53 -0
- data/app/assets/stylesheets/twitter/bootstrap/_sprites.scss +197 -0
- data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +235 -0
- data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +53 -0
- data/app/assets/stylesheets/twitter/bootstrap/_tooltip.scss +70 -0
- data/app/assets/stylesheets/twitter/bootstrap/_type.scss +247 -0
- data/app/assets/stylesheets/twitter/bootstrap/_utilities.scss +45 -0
- data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +301 -0
- data/app/assets/stylesheets/twitter/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/twitter/bootstrap/responsive.scss +48 -0
- data/app/controllers/admin_users_controller.rb +62 -0
- data/app/controllers/aliases_controller.rb +35 -0
- data/app/controllers/application_controller.rb +20 -0
- data/app/controllers/domains_controller.rb +48 -0
- data/app/controllers/server_controller.rb +28 -0
- data/app/controllers/users_controller.rb +35 -0
- data/app/helpers/admin_users_helper.rb +11 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/domains_helper.rb +25 -0
- data/app/helpers/server_helper.rb +30 -0
- data/app/mailers/.gitkeep +0 -0
- data/app/models/.gitkeep +0 -0
- data/app/models/admin_user.rb +54 -0
- data/app/models/certificate_manager.rb +46 -0
- data/app/models/property.rb +103 -0
- data/app/models/property/awstats.rb +15 -0
- data/app/models/property/dovecot.rb +61 -0
- data/app/models/property/dspam.rb +45 -0
- data/app/models/property/nginx.rb +47 -0
- data/app/models/property/postfix.rb +64 -0
- data/app/models/property_value_validator.rb +41 -0
- data/app/models/system_manager.rb +88 -0
- data/app/models/virtual_alias.rb +13 -0
- data/app/models/virtual_domain.rb +15 -0
- data/app/models/virtual_user.rb +51 -0
- data/app/views/admin_users/_form.html.haml +21 -0
- data/app/views/admin_users/first.html.haml +12 -0
- data/app/views/admin_users/index.html.haml +61 -0
- data/app/views/aliases/_form.html.haml +11 -0
- data/app/views/aliases/_list.html.haml +0 -0
- data/app/views/devise/confirmations/new.html.haml +9 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/devise/mailer/unlock_instructions.html.haml +5 -0
- data/app/views/devise/passwords/edit.html.haml +14 -0
- data/app/views/devise/passwords/new.html.haml +12 -0
- data/app/views/devise/registrations/edit.html.haml +18 -0
- data/app/views/devise/registrations/new.html.haml +10 -0
- data/app/views/devise/sessions/new.html.haml +16 -0
- data/app/views/devise/shared/_links.haml +17 -0
- data/app/views/devise/unlocks/new.html.haml +11 -0
- data/app/views/domains/_fields.html.haml +0 -0
- data/app/views/domains/_form.html.haml +7 -0
- data/app/views/domains/index.html.haml +133 -0
- data/app/views/domains/show.html.haml +1 -0
- data/app/views/layouts/_nav.html.haml +3 -0
- data/app/views/layouts/application.html.haml +29 -0
- data/app/views/server/_certificates.html.haml +10 -0
- data/app/views/server/_dovecot.html.haml +27 -0
- data/app/views/server/_dspam.html.haml +9 -0
- data/app/views/server/_postfix_info.html.haml +5 -0
- data/app/views/server/_postfix_test.html.haml +5 -0
- data/app/views/server/_status.html.haml +11 -0
- data/app/views/server/index.html.haml +36 -0
- data/app/views/users/_form.html.haml +11 -0
- data/app/views/users/_list.html.haml +0 -0
- data/bin/rmails +43 -0
- data/config.ru +4 -0
- data/config/application.rb +62 -0
- data/config/boot.rb +6 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +37 -0
- data/config/environments/production.rb +67 -0
- data/config/environments/test.rb +37 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/devise.rb +240 -0
- data/config/initializers/devise_encryptable.rb +37 -0
- data/config/initializers/devise_models.rb +86 -0
- data/config/initializers/inflections.rb +15 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/initializers/simple_form.rb +142 -0
- data/config/initializers/simple_form_bootstrap.rb +45 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/cz.yml +45 -0
- data/config/locales/devise.cz.yml +47 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/locales/en.yml +5 -0
- data/config/locales/server/cz.yml +14 -0
- data/config/locales/server/en.yml +7 -0
- data/config/locales/server/help/dovecot/cz.yml +21 -0
- data/config/locales/server/help/dovecot/en.yml +18 -0
- data/config/locales/server/help/dspam/cz.yml +10 -0
- data/config/locales/server/help/dspam/en.yml +4 -0
- data/config/locales/server/key/dovecot/cz.yml +23 -0
- data/config/locales/server/key/dovecot/en.yml +20 -0
- data/config/locales/server/key/dspam/cz.yml +10 -0
- data/config/locales/server/key/dspam/en.yml +4 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/locales/views/admin_users/cz.yml +25 -0
- data/config/locales/views/admin_users/en.yml +5 -0
- data/config/locales/views/aliases/cz.yml +17 -0
- data/config/locales/views/aliases/en.yml +1 -0
- data/config/locales/views/devise/cz.yml +26 -0
- data/config/locales/views/devise/en.yml +13 -0
- data/config/locales/views/domains/cz.yml +15 -0
- data/config/locales/views/domains/en.yml +15 -0
- data/config/locales/views/server/cz.yml +19 -0
- data/config/locales/views/server/en.yml +3 -0
- data/config/locales/views/users/cz.yml +18 -0
- data/config/locales/views/users/en.yml +1 -0
- data/config/routes.rb +80 -0
- data/db/migrate/20121112201233_virtual_domain.rb +11 -0
- data/db/migrate/20121112201247_virtual_alias.rb +10 -0
- data/db/migrate/20121112201341_virtual_user.rb +34 -0
- data/db/migrate/20121112201359_create_admin_user.rb +30 -0
- data/db/migrate/20121112201411_server_configuration.rb +13 -0
- data/db/migrate/20130304083938_join_domains_users.rb +12 -0
- data/db/migrate/20130311214040_create_versions.rb +18 -0
- data/db/seeds.rb +45 -0
- data/lib/devise-encryptable.rb +1 -0
- data/lib/rmails.rb +5 -0
- data/lib/rmails/installer.rb +37 -0
- data/lib/rmails/version.rb +3 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/templates/haml/scaffold/_form.html.haml +10 -0
- data/locals +0 -0
- data/log/.gitkeep +0 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/favicon.ico +0 -0
- data/public/fonts/London.eot +0 -0
- data/public/fonts/London.otf +0 -0
- data/public/fonts/London.woff +0 -0
- data/public/fonts/LondonBold.otf +0 -0
- data/public/robots.txt +5 -0
- data/rmails.gemspec +35 -0
- data/script/prepflog.pl +576 -0
- data/script/rails +6 -0
- data/system/config/automateit_env.rb +16 -0
- data/system/config/fields.yml +48 -0
- data/system/config/tags.yml +39 -0
- data/system/dist/README_AutomateIt_dist.txt +20 -0
- data/system/dist/amavis/spamassassin.cf.erb +85 -0
- data/system/dist/amavis/user.erb +33 -0
- data/system/dist/awstats/awstats.mail.conf.erb +41 -0
- data/system/dist/awstats/prepflog.pl +576 -0
- data/system/dist/dovecot/dovecot-sql.conf.ext.erb +14 -0
- data/system/dist/dovecot/dovecot.conf.erb +297 -0
- data/system/dist/dovecot/old_dovecot.conf.erb +63 -0
- data/system/dist/dspam/conf.erb +96 -0
- data/system/dist/dspam/pgsql.conf +33 -0
- data/system/dist/nginx/awstats.erb +17 -0
- data/system/dist/nginx/rmails.erb +40 -0
- data/system/dist/postfix/email2email.cf.erb +5 -0
- data/system/dist/postfix/main.cf.erb +118 -0
- data/system/dist/postfix/master.cf.erb +74 -0
- data/system/dist/postfix/sasl.conf.erb +3 -0
- data/system/dist/postfix/sender_login_maps.cf.erb +5 -0
- data/system/dist/postfix/virtual_alias_maps.cf.erb +5 -0
- data/system/dist/postfix/virtual_mailbox_domains.cf.erb +5 -0
- data/system/dist/postfix/virtual_mailbox_maps.cf.erb +5 -0
- data/system/dist/postgresql/postgresql.conf.erb +54 -0
- data/system/dist/rmails/Gemfile.1 +8 -0
- data/system/dist/rmails/Gemfile.2 +24 -0
- data/system/dist/rmails/database.yml.erb +15 -0
- data/system/dist/sudoers +37 -0
- data/system/lib/README_AutomateIt_lib.txt +22 -0
- data/system/lib/dkim_key.rb +9 -0
- data/system/lib/smtpd_key.rb +39 -0
- data/system/lib/ssl.rb +23 -0
- data/system/recipes/01_prepare_server.rb +84 -0
- data/system/recipes/02_setup_database.rb +65 -0
- data/system/recipes/03_setup_postfix.rb +124 -0
- data/system/recipes/04_setup_dovecot.rb +78 -0
- data/system/recipes/05_setup_nginx.rb +29 -0
- data/system/recipes/06_setup_dspam.rb +24 -0
- data/system/recipes/07_setup_amavis.rb +16 -0
- data/system/recipes/08_setup_spamassassin.rb +22 -0
- data/system/recipes/09_setup_awstats.rb +49 -0
- data/system/recipes/XX_start_services.rb +5 -0
- data/test/fixtures/.gitkeep +0 -0
- data/test/functional/.gitkeep +0 -0
- data/test/functional/aliases_controller_test.rb +7 -0
- data/test/functional/domains_controller_test.rb +7 -0
- data/test/functional/users_controller_test.rb +7 -0
- data/test/integration/.gitkeep +0 -0
- data/test/performance/browsing_test.rb +12 -0
- data/test/test_helper.rb +13 -0
- data/test/unit/.gitkeep +0 -0
- data/test/unit/helpers/aliases_helper_test.rb +4 -0
- data/test/unit/helpers/domains_helper_test.rb +4 -0
- data/test/unit/helpers/users_helper_test.rb +4 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/javascripts/canjs/can.construct.proxy.js +60 -0
- data/vendor/assets/javascripts/canjs/can.construct.super.js +44 -0
- data/vendor/assets/javascripts/canjs/can.control.plugin.js +245 -0
- data/vendor/assets/javascripts/canjs/can.control.view.js +88 -0
- data/vendor/assets/javascripts/canjs/can.dojo.js +3669 -0
- data/vendor/assets/javascripts/canjs/can.dojo.min.js +66 -0
- data/vendor/assets/javascripts/canjs/can.fixture.js +1020 -0
- data/vendor/assets/javascripts/canjs/can.jquery.js +2995 -0
- data/vendor/assets/javascripts/canjs/can.jquery.min.js +52 -0
- data/vendor/assets/javascripts/canjs/can.mootools.js +3462 -0
- data/vendor/assets/javascripts/canjs/can.mootools.min.js +63 -0
- data/vendor/assets/javascripts/canjs/can.observe.attributes.js +293 -0
- data/vendor/assets/javascripts/canjs/can.observe.backup.js +368 -0
- data/vendor/assets/javascripts/canjs/can.observe.delegate.js +359 -0
- data/vendor/assets/javascripts/canjs/can.observe.setter.js +58 -0
- data/vendor/assets/javascripts/canjs/can.observe.validations.js +374 -0
- data/vendor/assets/javascripts/canjs/can.view.modifiers.js +292 -0
- data/vendor/assets/javascripts/canjs/can.yui.js +3530 -0
- data/vendor/assets/javascripts/canjs/can.yui.min.js +65 -0
- data/vendor/assets/javascripts/canjs/can.zepto.js +3426 -0
- data/vendor/assets/javascripts/canjs/can.zepto.min.js +62 -0
- data/vendor/assets/javascripts/twitter/bootstrap-affix.js +104 -0
- data/vendor/assets/javascripts/twitter/bootstrap-alert.js +90 -0
- data/vendor/assets/javascripts/twitter/bootstrap-button.js +96 -0
- data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +176 -0
- data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +158 -0
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +150 -0
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +239 -0
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +103 -0
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +151 -0
- data/vendor/assets/javascripts/twitter/bootstrap-tab.js +135 -0
- data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +275 -0
- data/vendor/assets/javascripts/twitter/bootstrap-transition.js +60 -0
- data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +300 -0
- data/vendor/assets/javascripts/twitter/my/bootstrap-typeahead.js +311 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- metadata +470 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# --- PostgreSQL ---
|
|
2
|
+
|
|
3
|
+
# For PgSQLServer you can Use a TCP/IP address or a socket. If your socket is
|
|
4
|
+
# in /var/run/postgresql/.s.PGSQL.5432 specify just the path where the socket
|
|
5
|
+
# resits (without .s.PGSQL.5432).
|
|
6
|
+
|
|
7
|
+
PgSQLServer 127.0.0.1
|
|
8
|
+
PgSQLPort 5432
|
|
9
|
+
PgSQLUser _DBC_DBUSER_
|
|
10
|
+
PgSQLPass _DBC_DBPASS_
|
|
11
|
+
PgSQLDb _DBC_DBNAME_
|
|
12
|
+
|
|
13
|
+
# If you're running DSPAM in client/server (daemon) mode, uncomment the
|
|
14
|
+
# setting below to override the default connection cache size (the number
|
|
15
|
+
# of connections the server pools between all clients).
|
|
16
|
+
#
|
|
17
|
+
#PgSQLConnectionCache 3
|
|
18
|
+
|
|
19
|
+
# UIDInSignature: PgSQL supports the insertion of the user id into the DSPAM
|
|
20
|
+
# signature. This allows you to create one single spam or fp alias
|
|
21
|
+
# (pointing to some arbitrary user), and the uid in the signature will
|
|
22
|
+
# switch to the correct user. Result: you need only one spam alias
|
|
23
|
+
|
|
24
|
+
#PgSQLUIDInSignature on
|
|
25
|
+
|
|
26
|
+
# If you're using vpopmail or some other type of virtual setup and wish to
|
|
27
|
+
# change the table dspam uses to perform username/uid lookups, you can over-
|
|
28
|
+
# ride it below
|
|
29
|
+
|
|
30
|
+
#PgSQLVirtualTable dspam_virtual_uids
|
|
31
|
+
#PgSQLVirtualUIDField uid
|
|
32
|
+
#PgSQLVirtualUsernameField username
|
|
33
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 80;
|
|
3
|
+
server_name stats.example.com;
|
|
4
|
+
access_log /var/log/nginx/stats.example.com-access_log main;
|
|
5
|
+
error_log /var/log/nginx/stats.example.com-error_log;
|
|
6
|
+
root /srv/www/stats.example.com/www;
|
|
7
|
+
index index.html;
|
|
8
|
+
|
|
9
|
+
location ~ ^/cgi-bin/(awredir|awstats)\.pl {
|
|
10
|
+
gzip off;
|
|
11
|
+
fastcgi_pass 127.0.0.1:9000;
|
|
12
|
+
fastcgi_param SCRIPT_FILENAME $document_root/cgi-bin.php;
|
|
13
|
+
fastcgi_param X_SCRIPT_FILENAME /srv/www/stats.example.com/awstats/wwwroot$fastcgi_script_name;
|
|
14
|
+
fastcgi_param X_SCRIPT_NAME $fastcgi_script_name;
|
|
15
|
+
include fastcgi_params;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
upstream thin_cluster {
|
|
2
|
+
server unix:/tmp/thin.0.sock;
|
|
3
|
+
# server unix:/tmp/thin.1.sock;
|
|
4
|
+
}
|
|
5
|
+
<% hostname = hostnames.split('_')[0] %>
|
|
6
|
+
server {
|
|
7
|
+
listen 443;
|
|
8
|
+
|
|
9
|
+
#ssl on;
|
|
10
|
+
#ssl_certificate /etc/ssl/certs/https.pem
|
|
11
|
+
#ssl_certificate_key /etc/ssl/private/https.pem
|
|
12
|
+
|
|
13
|
+
server_name <%= hostnames %>;
|
|
14
|
+
|
|
15
|
+
access_log /var/log/nginx/<%= hostname %>/access.log;
|
|
16
|
+
|
|
17
|
+
root /var/www/<%= hostname %>/public;
|
|
18
|
+
|
|
19
|
+
error_page 500 502 504 /500.html;
|
|
20
|
+
|
|
21
|
+
if ($request_method !~ ^(GET|HEAD|PUT|POST|DELETE|OPTIONS)$ ){
|
|
22
|
+
return 405;
|
|
23
|
+
}
|
|
24
|
+
#if ($host = '<%#= subhostname %><%= hostname %>' ) {
|
|
25
|
+
# rewrite ^/(.*)$ http://<%= '' %><%= hostname %>/$1 permanent;
|
|
26
|
+
#}
|
|
27
|
+
|
|
28
|
+
location ~* \.(gz|ico|pdf|jpg|jpeg|gif|png|css|js|swf|html)$ {
|
|
29
|
+
if (-f $request_filename) {
|
|
30
|
+
expires max;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
#location / {
|
|
35
|
+
# @cluster;
|
|
36
|
+
#}
|
|
37
|
+
location @cluster {
|
|
38
|
+
proxy_pass http://thin_cluster;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
|
|
2
|
+
#
|
|
3
|
+
# Network
|
|
4
|
+
#
|
|
5
|
+
myhostname = <%= myhostname %>
|
|
6
|
+
mydomain = <%= mydomain %>
|
|
7
|
+
# list of IPs I trust
|
|
8
|
+
mynetworks = 192.168.0.0/16 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
|
|
9
|
+
mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost, <%= `hostname -f` %>
|
|
10
|
+
#inet_interfaces = loopback-only
|
|
11
|
+
#inet_protocols = ipv4
|
|
12
|
+
disable_dns_lookups = no
|
|
13
|
+
relayhost =
|
|
14
|
+
|
|
15
|
+
#
|
|
16
|
+
# System
|
|
17
|
+
#
|
|
18
|
+
mail_name = <%= mail_name %>
|
|
19
|
+
smtpd_banner = <%= smtpd_banner %>
|
|
20
|
+
biff = yes
|
|
21
|
+
bounce_queue_lifetime = 5d
|
|
22
|
+
maximal_queue_lifetime = 5d
|
|
23
|
+
message_size_limit = <%= message_size_limit %>
|
|
24
|
+
|
|
25
|
+
# TOTO XXX: appending .domain is the MUA's job.
|
|
26
|
+
append_dot_mydomain = no
|
|
27
|
+
|
|
28
|
+
#
|
|
29
|
+
# Authentication
|
|
30
|
+
#
|
|
31
|
+
smtpd_sasl_type = dovecot
|
|
32
|
+
smtpd_sasl_path = private/auth
|
|
33
|
+
smtpd_sasl_auth_enable = yes
|
|
34
|
+
smtpd_sasl_security_options = noanonymous
|
|
35
|
+
#smtpd_sasl_local_domain = $mydomain
|
|
36
|
+
unknown_local_recipient_reject_code = 450
|
|
37
|
+
|
|
38
|
+
#
|
|
39
|
+
# TLS parameters
|
|
40
|
+
#
|
|
41
|
+
smtpd_use_tls = yes
|
|
42
|
+
smtpd_tls_auth_only = yes
|
|
43
|
+
smtpd_tls_cert_file=/etc/ssl/certs/smtpd.pem
|
|
44
|
+
smtpd_tls_key_file=/etc/ssl/private/smtpd.pem
|
|
45
|
+
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
|
|
46
|
+
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
|
47
|
+
smtpd_tls_loglevel = 0
|
|
48
|
+
smtpd_tls_received_header = yes
|
|
49
|
+
smtpd_tls_session_cache_timeout = 3600s
|
|
50
|
+
tls_random_source = dev:/dev/urandom
|
|
51
|
+
#smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
#
|
|
55
|
+
# Local
|
|
56
|
+
#
|
|
57
|
+
myorigin = /etc/mailname
|
|
58
|
+
mydestination = $mydomain, localhost
|
|
59
|
+
alias_maps = hash:/etc/aliases
|
|
60
|
+
local_recipient_maps = $alias_maps
|
|
61
|
+
|
|
62
|
+
#
|
|
63
|
+
# Mailbox
|
|
64
|
+
#
|
|
65
|
+
mailbox_command = <%= dovecot %>
|
|
66
|
+
mailbox_size_limit = 0
|
|
67
|
+
mail_spool_directory = /var/spool/postfix
|
|
68
|
+
recipient_delimiter = +
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# XXX
|
|
72
|
+
#default_transport = error
|
|
73
|
+
#relay_transport = error
|
|
74
|
+
|
|
75
|
+
#
|
|
76
|
+
# Virtual
|
|
77
|
+
#
|
|
78
|
+
|
|
79
|
+
## if DSPAM active
|
|
80
|
+
#virtual_transport = lmtp:inet:localhost:2424
|
|
81
|
+
## else - use dovecot
|
|
82
|
+
virtual_transport = dovecot
|
|
83
|
+
|
|
84
|
+
dovecot_destination_recipient_limit = 1
|
|
85
|
+
|
|
86
|
+
virtual_mailbox_domains = <%= "#{adapter}:#{root_path}/#{adapter}/virtual_mailbox_domains.cf" %>
|
|
87
|
+
virtual_mailbox_maps = <%= "#{adapter}:#{root_path}/#{adapter}/virtual_mailbox_maps.cf" %>
|
|
88
|
+
virtual_alias_maps = <%= "#{adapter}:#{root_path}/#{adapter}/virtual_alias_maps.cf" %>,<%= "#{adapter}:#{root_path}/#{adapter}/email2email.cf" %>
|
|
89
|
+
smtpd_sender_login_maps = <%= "#{adapter}:#{root_path}/#{adapter}/sender_login_maps.cf" %>
|
|
90
|
+
|
|
91
|
+
#
|
|
92
|
+
# Restrictions
|
|
93
|
+
#
|
|
94
|
+
|
|
95
|
+
# Relay control: local or authenticated clients may specify any domain.
|
|
96
|
+
smtpd_relay_restrictions = permit_mynetworks,
|
|
97
|
+
permit_sasl_authenticated,
|
|
98
|
+
reject_unauth_destination
|
|
99
|
+
|
|
100
|
+
smtpd_recipient_restrictions = \
|
|
101
|
+
permit_mynetworks \
|
|
102
|
+
# reject_rbl_client dnsbl.sorbs.net \
|
|
103
|
+
# reject_rbl_client bl.spamcop.net \
|
|
104
|
+
# reject_rbl_client zen.spamhaus.org \
|
|
105
|
+
permit_sasl_authenticated \
|
|
106
|
+
reject_unauth_destination
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
# Don't accept mail from domains that don't exist.
|
|
110
|
+
smtpd_sender_restrictions = reject_unknown_sender_domain
|
|
111
|
+
|
|
112
|
+
# Block clients that speak too early.
|
|
113
|
+
#smtpd_data_restrictions = reject_unauth_pipelining
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
#
|
|
117
|
+
# Appends from AutomateIt
|
|
118
|
+
#
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Postfix master process configuration file. For details on the format
|
|
3
|
+
# of the file, see the master(5) manual page (command: "man 5 master").
|
|
4
|
+
#
|
|
5
|
+
# Do not forget to execute "postfix reload" after editing this file.
|
|
6
|
+
#
|
|
7
|
+
# ==========================================================================
|
|
8
|
+
# service type private unpriv chroot wakeup maxproc command + args
|
|
9
|
+
# (yes) (yes) (yes) (never) (100)
|
|
10
|
+
# ==========================================================================
|
|
11
|
+
|
|
12
|
+
# SMTP port 25 for recieving mail
|
|
13
|
+
smtp inet n - - - - smtpd
|
|
14
|
+
# -o content_filter=lmtp:unix:/var/run/dspam/dspam.sock
|
|
15
|
+
|
|
16
|
+
# Submission port 587 for sending mails from authenticated users
|
|
17
|
+
submission inet n - - - - smtpd
|
|
18
|
+
-o smtpd_tls_security_level=encrypt
|
|
19
|
+
-o smtpd_sasl_auth_enable=yes
|
|
20
|
+
-o smtpd_sasl_security_options=noanonymous
|
|
21
|
+
-o smtpd_sasl_local_domain=$myhostname
|
|
22
|
+
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
|
23
|
+
-o smtpd_sender_restrictions=reject_sender_login_mismatch
|
|
24
|
+
|
|
25
|
+
# Local SMTP port 7711 for reinjection from dspam after scanning
|
|
26
|
+
localhost:7711 inet n - n - - smtpd -o content_filter=smtp-amavis:[127.0.0.1]:3377 -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8
|
|
27
|
+
## FI DSPAM
|
|
28
|
+
|
|
29
|
+
# Local SMTP port 7733 for reinjection from amavis after scanning
|
|
30
|
+
localhost:7733 inet n - n - - smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_restriction_classes= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes
|
|
31
|
+
## FI AMAVIS
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# not strictly necessary, but is a good idea to have. It defines a service to use when sending the mail into amavisd-new
|
|
35
|
+
smtp-amavis unix - - y - 2 smtp -o smtp_data_done_timeout=1200 -o disable_dns_lookups=yes
|
|
36
|
+
## FI AMAVIS
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
#smtps inet n - - - - smtpd
|
|
40
|
+
# -o smtpd_tls_wrappermode=yes
|
|
41
|
+
# -o smtpd_sasl_auth_enable=yes
|
|
42
|
+
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
|
43
|
+
# -o milter_macro_daemon_name=ORIGINATING
|
|
44
|
+
#628 inet n - - - - qmqpd
|
|
45
|
+
pickup fifo n - - 60 1 pickup
|
|
46
|
+
cleanup unix n - - - 0 cleanup
|
|
47
|
+
qmgr fifo n - n 300 1 qmgr
|
|
48
|
+
#qmgr fifo n - - 300 1 oqmgr
|
|
49
|
+
tlsmgr unix - - - 1000? 1 tlsmgr
|
|
50
|
+
rewrite unix - - - - - trivial-rewrite
|
|
51
|
+
bounce unix - - - - 0 bounce
|
|
52
|
+
defer unix - - - - 0 bounce
|
|
53
|
+
trace unix - - - - 0 bounce
|
|
54
|
+
verify unix - - - - 1 verify
|
|
55
|
+
flush unix n - - 1000? 0 flush
|
|
56
|
+
proxymap unix - - n - - proxymap
|
|
57
|
+
proxywrite unix - - n - 1 proxymap
|
|
58
|
+
smtp unix - - - - - smtp
|
|
59
|
+
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
|
|
60
|
+
relay unix - - - - - smtp
|
|
61
|
+
-o smtp_fallback_relay=
|
|
62
|
+
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
|
|
63
|
+
showq unix n - - - - showq
|
|
64
|
+
error unix - - - - - error
|
|
65
|
+
retry unix - - - - - error
|
|
66
|
+
discard unix - - - - - discard
|
|
67
|
+
local unix - n n - - local
|
|
68
|
+
virtual unix - n n - - virtual
|
|
69
|
+
lmtp unix - - - - - lmtp
|
|
70
|
+
anvil unix - - - - 1 anvil
|
|
71
|
+
scache unix - - - - 1 scache
|
|
72
|
+
|
|
73
|
+
dovecot unix - n n - - pipe
|
|
74
|
+
flags=DRhu user=vmail:vmail argv=<%= dovecot %> -d ${recipient}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -----------------------------
|
|
2
|
+
# PostgreSQL configuration file
|
|
3
|
+
# -----------------------------
|
|
4
|
+
|
|
5
|
+
# - Connection Settings -
|
|
6
|
+
|
|
7
|
+
listen_addresses = 'localhost' # what IP address(es) to listen on;
|
|
8
|
+
# comma-separated list of addresses;
|
|
9
|
+
# defaults to 'localhost', '*' = all
|
|
10
|
+
# (change requires restart)
|
|
11
|
+
port = <%= port %> # (change requires restart)
|
|
12
|
+
max_connections = <%= max_connections %> # (change requires restart)
|
|
13
|
+
# Note: Increasing max_connections costs ~400 bytes of shared memory per
|
|
14
|
+
# connection slot, plus lock space (see max_locks_per_transaction).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# - Memory -
|
|
18
|
+
|
|
19
|
+
shared_buffers = 32MB # min 128kB
|
|
20
|
+
# (change requires restart)
|
|
21
|
+
#temp_buffers = 8MB # min 800kB
|
|
22
|
+
#max_prepared_transactions = 0 # zero disables the feature
|
|
23
|
+
# (change requires restart)
|
|
24
|
+
# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
|
|
25
|
+
# per transaction slot, plus lock space (see max_locks_per_transaction).
|
|
26
|
+
# It is not advisable to set max_prepared_transactions nonzero unless you
|
|
27
|
+
# actively intend to use prepared transactions.
|
|
28
|
+
#work_mem = 1MB # min 64kB
|
|
29
|
+
#maintenance_work_mem = 16MB # min 1MB
|
|
30
|
+
#max_stack_depth = 2MB # min 100kB
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# - Kernel Resource Usage -
|
|
34
|
+
|
|
35
|
+
#max_files_per_process = 1000 # min 25
|
|
36
|
+
# (change requires restart)
|
|
37
|
+
#shared_preload_libraries = '' # (change requires restart)
|
|
38
|
+
ssl=false
|
|
39
|
+
|
|
40
|
+
# - Locale and Formatting -
|
|
41
|
+
|
|
42
|
+
#datestyle = 'iso, mdy'
|
|
43
|
+
data_directory = '/var/lib/postgresql/9.1/main'
|
|
44
|
+
# These settings are initialized by initdb, but they can be changed.
|
|
45
|
+
lc_messages = 'en_US.UTF-8' # locale for system error message
|
|
46
|
+
# strings
|
|
47
|
+
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
|
|
48
|
+
lc_numeric = 'en_US.UTF-8' # locale for number formatting
|
|
49
|
+
lc_time = 'en_US.UTF-8' # locale for time formatting
|
|
50
|
+
|
|
51
|
+
# default configuration for text search
|
|
52
|
+
default_text_search_config = 'pg_catalog.english'
|
|
53
|
+
|
|
54
|
+
shared_buffers = 300kB
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
gem 'hoe'
|
|
4
|
+
gem 'open4'
|
|
5
|
+
gem 'rails', '~> 3.2'
|
|
6
|
+
gem 'devise'
|
|
7
|
+
gem 'thin'
|
|
8
|
+
gem 'pg'
|
|
9
|
+
|
|
10
|
+
gem 'automateit', '0.0.0', :path => "vendor/gems/automateit"
|
|
11
|
+
|
|
12
|
+
gem 'simple_form'
|
|
13
|
+
gem 'paper_trail'
|
|
14
|
+
|
|
15
|
+
['haml', 'jquery', 'chosen'].each do |g|
|
|
16
|
+
gem "#{g}-rails"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
#group :assets do
|
|
20
|
+
gem 'sass-rails', '~> 3.2.3'
|
|
21
|
+
gem 'coffee-rails', '~> 3.2.1'
|
|
22
|
+
gem 'therubyracer', :platforms => :ruby
|
|
23
|
+
gem 'uglifier', '>= 1.0.3'
|
|
24
|
+
#end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
development:
|
|
2
|
+
adapter: postgresql
|
|
3
|
+
database: rmails
|
|
4
|
+
username: rmails_app
|
|
5
|
+
password: <%= password %>
|
|
6
|
+
host: <%= dbhost %>
|
|
7
|
+
port: <%= dbport %>
|
|
8
|
+
|
|
9
|
+
production:
|
|
10
|
+
adapter: postgresql
|
|
11
|
+
database: rmails
|
|
12
|
+
username: rmails_app
|
|
13
|
+
password: <%= password %>
|
|
14
|
+
host: <%= dbhost %>
|
|
15
|
+
port: <%= dbport %>
|
data/system/dist/sudoers
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Defaults env_reset
|
|
2
|
+
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
3
|
+
|
|
4
|
+
# Host alias specification
|
|
5
|
+
|
|
6
|
+
# User alias specification
|
|
7
|
+
|
|
8
|
+
# Cmnd alias specification
|
|
9
|
+
|
|
10
|
+
# User privilege specification
|
|
11
|
+
root ALL=(ALL:ALL) ALL
|
|
12
|
+
|
|
13
|
+
# Members of the admin group may gain root privileges
|
|
14
|
+
%admin ALL=(ALL) ALL
|
|
15
|
+
|
|
16
|
+
# Allow members of group sudo to execute any command
|
|
17
|
+
%sudo ALL=(ALL:ALL) ALL
|
|
18
|
+
|
|
19
|
+
%rmails ALL = NOPASSWD: /etc/init.d/postfix start, \
|
|
20
|
+
/etc/init.d/postfix stop, \
|
|
21
|
+
/etc/init.d/dovecot start, \
|
|
22
|
+
/etc/init.d/dovecot stop, \
|
|
23
|
+
/etc/init.d/nginx start, \
|
|
24
|
+
/etc/init.d/nginx stop, \
|
|
25
|
+
/etc/init.d/dspam start, \
|
|
26
|
+
/etc/init.d/dspam stop, \
|
|
27
|
+
/etc/init.d/opendkim start, \
|
|
28
|
+
/etc/init.d/opendkim stop \
|
|
29
|
+
/etc/init.d/amavis start, \
|
|
30
|
+
/etc/init.d/amavis stop \
|
|
31
|
+
/etc/init.d/spamassassin start, \
|
|
32
|
+
/etc/init.d/spamassassin stop
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# See sudoers(5) for more information on "#include" directives:
|
|
37
|
+
#includedir /etc/sudoers.d
|