digital_heroes_startkit 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +37 -0
  4. data/Rakefile +36 -0
  5. data/app/assets/config/digital_heroes_startkit_manifest.js +0 -0
  6. data/app/assets/javascripts/authorization.coffee +79 -0
  7. data/app/assets/javascripts/avatar.coffee +16 -0
  8. data/app/assets/javascripts/datepicker.js +2 -0
  9. data/app/assets/javascripts/digital_heroes_startkit/cable.js +13 -0
  10. data/app/assets/javascripts/digital_heroes_startkit/channels/pills.coffee +23 -0
  11. data/app/assets/javascripts/digital_heroes_startkit/input.coffee +5 -0
  12. data/app/assets/javascripts/digital_heroes_startkit/pills.coffee +2 -0
  13. data/app/assets/javascripts/digital_heroes_startkit/snap.svg-min.js +21 -0
  14. data/app/assets/javascripts/digital_heroes_startkit.js +26 -0
  15. data/app/assets/javascripts/profile.coffee +53 -0
  16. data/app/assets/javascripts/profile_geodata.coffee +68 -0
  17. data/app/assets/javascripts/reg_fields_checkup.coffee +96 -0
  18. data/app/assets/javascripts/registration.coffee +35 -0
  19. data/app/assets/javascripts/resurrection.coffee +20 -0
  20. data/app/channels/application_cable/channel.rb +4 -0
  21. data/app/channels/application_cable/connection.rb +4 -0
  22. data/app/channels/pills_channel.rb +10 -0
  23. data/app/controllers/avatars_controller.rb +11 -0
  24. data/app/controllers/clients_controller.rb +62 -0
  25. data/app/controllers/email_access_cards_controller.rb +28 -0
  26. data/app/controllers/geodata_controller.rb +84 -0
  27. data/app/controllers/nickname_access_cards_controller.rb +30 -0
  28. data/app/controllers/oauth_controller.rb +178 -0
  29. data/app/controllers/openid_controller.rb +124 -0
  30. data/app/controllers/phone_access_cards_controller.rb +28 -0
  31. data/app/controllers/profile_controller.rb +114 -0
  32. data/app/controllers/response_controller.rb +17 -0
  33. data/app/controllers/start_kit_controller.rb +86 -0
  34. data/app/controllers/user_cards_controller.rb +305 -0
  35. data/app/jobs/log_analyzer_job.rb +50 -0
  36. data/app/jobs/password_resurrection_kill_job.rb +9 -0
  37. data/app/mailers/admin_mailer.rb +9 -0
  38. data/app/mailers/client_mailer.rb +3 -0
  39. data/app/mailers/kreator_mailer.rb +9 -0
  40. data/app/mailers/manager_mailer.rb +9 -0
  41. data/app/mailers/prometeus_mailer.rb +16 -0
  42. data/app/mailers/user_cards_mailer.rb +9 -0
  43. data/app/models/admin.rb +3 -0
  44. data/app/models/avatar.rb +23 -0
  45. data/app/models/city.rb +7 -0
  46. data/app/models/client.rb +31 -0
  47. data/app/models/country.rb +7 -0
  48. data/app/models/delayed_job.rb +20 -0
  49. data/app/models/email_access_card.rb +30 -0
  50. data/app/models/kreator.rb +3 -0
  51. data/app/models/log_error.rb +56 -0
  52. data/app/models/log_error_type.rb +3 -0
  53. data/app/models/manager.rb +3 -0
  54. data/app/models/nickname_access_card.rb +18 -0
  55. data/app/models/oauth_access_card.rb +38 -0
  56. data/app/models/phone_access_card.rb +19 -0
  57. data/app/models/prometeus.rb +50 -0
  58. data/app/models/user_card.rb +158 -0
  59. data/app/views/admin_mailer/greetings_email.html.erb +191 -0
  60. data/app/views/client_mailer/greetings_email.html.erb +191 -0
  61. data/app/views/kreator_mailer/greetings_email.html.erb +191 -0
  62. data/app/views/manager_mailer/greetings_email.html.erb +191 -0
  63. data/app/views/oauth/verify.slim +1 -0
  64. data/app/views/profile/_add_avatar.slim +12 -0
  65. data/app/views/profile/_user_profile.slim +95 -0
  66. data/app/views/profile/index.slim +12 -0
  67. data/app/views/user_cards/authorization.slim +72 -0
  68. data/app/views/user_cards/confirmation_but_access_code.slim +7 -0
  69. data/app/views/user_cards/confirmation_complete.slim +7 -0
  70. data/app/views/user_cards/registration.slim +86 -0
  71. data/app/views/user_cards/resurrection.slim +19 -0
  72. data/app/views/user_cards/resurrection_but_access_code.slim +7 -0
  73. data/app/views/user_cards/resurrection_no_access_code.slim +7 -0
  74. data/app/views/user_cards_mailer/email.html.erb +191 -0
  75. data/app/views/user_cards_mailer/resurrection.html.erb +191 -0
  76. data/config/initializers/session_manager.rb +2 -0
  77. data/config/routes.rb +53 -0
  78. data/lib/access_control.rb +3 -0
  79. data/lib/digital_heroes_startkit/engine.rb +25 -0
  80. data/lib/digital_heroes_startkit/version.rb +3 -0
  81. data/lib/digital_heroes_startkit.rb +5 -0
  82. data/lib/generators/digital_heroes_startkit/install_generator.rb +61 -0
  83. data/lib/generators/project/Capfile +36 -0
  84. data/lib/generators/project/Procfile +3 -0
  85. data/lib/generators/project/app/assets/stylesheets/application.scss +16 -0
  86. data/lib/generators/project/app/assets/stylesheets/base/_auth.scss +37 -0
  87. data/lib/generators/project/app/assets/stylesheets/base/_buttons.scss +62 -0
  88. data/lib/generators/project/app/assets/stylesheets/base/_checkbox.scss +71 -0
  89. data/lib/generators/project/app/assets/stylesheets/base/_datepicker.scss +620 -0
  90. data/lib/generators/project/app/assets/stylesheets/base/_form.scss +81 -0
  91. data/lib/generators/project/app/assets/stylesheets/base/_notice.scss +14 -0
  92. data/lib/generators/project/app/assets/stylesheets/base/_pills.scss +39 -0
  93. data/lib/generators/project/app/assets/stylesheets/base/_profile.scss +67 -0
  94. data/lib/generators/project/app/assets/stylesheets/base/_reset.scss +49 -0
  95. data/lib/generators/project/app/assets/stylesheets/base/_social.scss +52 -0
  96. data/lib/generators/project/app/assets/stylesheets/base/_user.scss +0 -0
  97. data/lib/generators/project/app/assets/stylesheets/base/_user_avatar.scss +18 -0
  98. data/lib/generators/project/app/assets/stylesheets/base/styles.scss.txt +35 -0
  99. data/lib/generators/project/app/assets/stylesheets/plugins/sumoselect.scss +296 -0
  100. data/lib/generators/project/app/controllers/application_controller.rb +3 -0
  101. data/lib/generators/project/app/views/layouts/_counts.html.erb +29 -0
  102. data/lib/generators/project/app/views/layouts/_footer.slim +6 -0
  103. data/lib/generators/project/app/views/layouts/_head.slim +7 -0
  104. data/lib/generators/project/app/views/layouts/_header.slim +47 -0
  105. data/lib/generators/project/app/views/layouts/_mobile_menu.slim +11 -0
  106. data/lib/generators/project/app/views/layouts/application.slim +26 -0
  107. data/lib/generators/project/app/views/layouts/mailer.html.erb +13 -0
  108. data/lib/generators/project/app/views/layouts/mailer.text.erb +1 -0
  109. data/lib/generators/project/config/application.access.yml +66 -0
  110. data/lib/generators/project/config/application.db.yml +5 -0
  111. data/lib/generators/project/config/application.google.yml +3 -0
  112. data/lib/generators/project/config/application.oauth.yml +135 -0
  113. data/lib/generators/project/config/application.robokassa.yml +10 -0
  114. data/lib/generators/project/config/application.sendgrid.yml +3 -0
  115. data/lib/generators/project/config/application.telegram.yml +22 -0
  116. data/lib/generators/project/config/application.yml +28 -0
  117. data/lib/generators/project/config/cable.yml +6 -0
  118. data/lib/generators/project/config/capistrano.yml +78 -0
  119. data/lib/generators/project/config/database.yml +52 -0
  120. data/lib/generators/project/config/deploy/application.secrets.yml +4 -0
  121. data/lib/generators/project/config/deploy/domain.crt +92 -0
  122. data/lib/generators/project/config/deploy/domain.key +51 -0
  123. data/lib/generators/project/config/deploy/nginx.conf +50 -0
  124. data/lib/generators/project/config/deploy/production.rb +67 -0
  125. data/lib/generators/project/config/deploy/secrets.yml +32 -0
  126. data/lib/generators/project/config/deploy/secrets.yml.enc +1 -0
  127. data/lib/generators/project/config/deploy/secrets.yml.key +1 -0
  128. data/lib/generators/project/config/deploy/staging.rb +61 -0
  129. data/lib/generators/project/config/deploy/virgin_conf/database.yml +42 -0
  130. data/lib/generators/project/config/deploy/virgin_conf/nginx_site.conf +47 -0
  131. data/lib/generators/project/config/deploy/virgin_conf/nginx_site_ssl.conf +57 -0
  132. data/lib/generators/project/config/deploy/virgin_conf/postfix.cf +685 -0
  133. data/lib/generators/project/config/deploy/virgin_conf/production.rb +67 -0
  134. data/lib/generators/project/config/deploy/virgin_conf/puma.rb +66 -0
  135. data/lib/generators/project/config/deploy/virgin_sh/capistrano.sh +18 -0
  136. data/lib/generators/project/config/deploy/virgin_sh/foreman.sh +19 -0
  137. data/lib/generators/project/config/deploy/virgin_sh/rvm_install.sh +10 -0
  138. data/lib/generators/project/config/deploy.rb +377 -0
  139. data/lib/generators/project/config/environments/development.rb +91 -0
  140. data/lib/generators/project/config/environments/production.rb +142 -0
  141. data/lib/generators/project/config/initializers/session_store.rb +3 -0
  142. data/lib/generators/project/config/locales/ru.yml +444 -0
  143. data/lib/generators/project/db/migrate/10_create_user_cards.rb +19 -0
  144. data/lib/generators/project/db/migrate/12_create_email_access_cards.rb +15 -0
  145. data/lib/generators/project/db/migrate/13_create_nickname_access_cards.rb +15 -0
  146. data/lib/generators/project/db/migrate/14_create_phone_access_cards.rb +16 -0
  147. data/lib/generators/project/db/migrate/15_create_oauth_access_cards.rb +19 -0
  148. data/lib/generators/project/db/migrate/1_create_kreators.rb +9 -0
  149. data/lib/generators/project/db/migrate/21_create_avatars.rb +12 -0
  150. data/lib/generators/project/db/migrate/30_create_countries.rb +12 -0
  151. data/lib/generators/project/db/migrate/32_create_cities.rb +12 -0
  152. data/lib/generators/project/db/migrate/3_create_admins.rb +9 -0
  153. data/lib/generators/project/db/migrate/44_add_sessions_table.rb +12 -0
  154. data/lib/generators/project/db/migrate/4_create_managers.rb +10 -0
  155. data/lib/generators/project/db/migrate/5_create_clients.rb +17 -0
  156. data/lib/generators/project/db/migrate/60_create_log_error_types.rb +9 -0
  157. data/lib/generators/project/db/migrate/61_create_log_errors.rb +12 -0
  158. data/lib/generators/project/db/migrate/78_create_delayed_jobs.rb +22 -0
  159. data/lib/generators/project/db/seeds.rb +27 -0
  160. data/lib/generators/project/geodata/cities.csv +25305 -0
  161. data/lib/generators/project/geodata/countries.csv +250 -0
  162. data/lib/generators/project/public/401.html +75 -0
  163. data/lib/generators/project/public/404.html +67 -0
  164. data/lib/generators/project/public/422.html +67 -0
  165. data/lib/generators/project/public/500.html +66 -0
  166. data/lib/generators/project/public/_receiver.html +10 -0
  167. data/lib/generators/project/public/apple-touch-icon-precomposed.png +0 -0
  168. data/lib/generators/project/public/apple-touch-icon.png +0 -0
  169. data/lib/generators/project/public/favicon.ico +0 -0
  170. data/lib/generators/project/public/robots.txt +1 -0
  171. data/lib/happy_birthday.rb +5 -0
  172. data/lib/link.rb +16 -0
  173. data/lib/oauth/oauth.rb +72 -0
  174. data/lib/oauth/oauth_fb.rb +48 -0
  175. data/lib/oauth/oauth_gg.rb +50 -0
  176. data/lib/oauth/oauth_im.rb +51 -0
  177. data/lib/oauth/oauth_mr.rb +53 -0
  178. data/lib/oauth/oauth_vk.rb +3 -0
  179. data/lib/oauth/oauth_yx.rb +51 -0
  180. data/lib/openid/openid.rb +46 -0
  181. data/lib/openid/openid_st.rb +2 -0
  182. data/lib/phone_cutter.rb +9 -0
  183. data/lib/response.rb +51 -0
  184. data/lib/session_manager.rb +47 -0
  185. data/lib/sms_lib.rb +30 -0
  186. data/lib/social_networks.rb +328 -0
  187. data/lib/tasks/digital_heroes_startkit_tasks.rake +83 -0
  188. data/lib/telegram.rb +33 -0
  189. metadata +497 -0
@@ -0,0 +1,685 @@
1
+ # Global Postfix configuration file. This file lists only a subset
2
+ # of all parameters. For the syntax, and for a complete parameter
3
+ # list, see the postconf(5) manual page (command: "man 5 postconf").
4
+ #
5
+ # For common configuration examples, see BASIC_CONFIGURATION_README
6
+ # and STANDARD_CONFIGURATION_README. To find these documents, use
7
+ # the command "postconf html_directory readme_directory", or go to
8
+ # http://www.postfix.org/BASIC_CONFIGURATION_README.html etc.
9
+ #
10
+ # For best results, change no more than 2-3 parameters at a time,
11
+ # and test if Postfix still works after every change.
12
+
13
+ # COMPATIBILITY
14
+ #
15
+ # The compatibility_level determines what default settings Postfix
16
+ # will use for main.cf and master.cf settings. These defaults will
17
+ # change over time.
18
+ #
19
+ # To avoid breaking things, Postfix will use backwards-compatible
20
+ # default settings and log where it uses those old backwards-compatible
21
+ # default settings, until the system administrator has determined
22
+ # if any backwards-compatible default settings need to be made
23
+ # permanent in main.cf or master.cf.
24
+ #
25
+ # When this review is complete, update the compatibility_level setting
26
+ # below as recommended in the RELEASE_NOTES file.
27
+ #
28
+ # The level below is what should be used with new (not upgrade) installs.
29
+ #
30
+ compatibility_level = 2
31
+
32
+ # SOFT BOUNCE
33
+ #
34
+ # The soft_bounce parameter provides a limited safety net for
35
+ # testing. When soft_bounce is enabled, mail will remain queued that
36
+ # would otherwise bounce. This parameter disables locally-generated
37
+ # bounces, and prevents the SMTP server from rejecting mail permanently
38
+ # (by changing 5xx replies into 4xx replies). However, soft_bounce
39
+ # is no cure for address rewriting mistakes or mail routing mistakes.
40
+ #
41
+ #soft_bounce = no
42
+
43
+ # LOCAL PATHNAME INFORMATION
44
+ #
45
+ # The queue_directory specifies the location of the Postfix queue.
46
+ # This is also the root directory of Postfix daemons that run chrooted.
47
+ # See the files in examples/chroot-setup for setting up Postfix chroot
48
+ # environments on different UNIX systems.
49
+ #
50
+ #queue_directory = /var/spool/postfix
51
+
52
+ # The command_directory parameter specifies the location of all
53
+ # postXXX commands.
54
+ #
55
+ command_directory = /usr/sbin
56
+
57
+ # The daemon_directory parameter specifies the location of all Postfix
58
+ # daemon programs (i.e. programs listed in the master.cf file). This
59
+ # directory must be owned by root.
60
+ #
61
+ daemon_directory = /usr/lib/postfix
62
+
63
+ # The data_directory parameter specifies the location of Postfix-writable
64
+ # data files (caches, random numbers). This directory must be owned
65
+ # by the mail_owner account (see below).
66
+ #
67
+ data_directory = /var/lib/postfix
68
+
69
+ # QUEUE AND PROCESS OWNERSHIP
70
+ #
71
+ # The mail_owner parameter specifies the owner of the Postfix queue
72
+ # and of most Postfix daemon processes. Specify the name of a user
73
+ # account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
74
+ # AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
75
+ # particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
76
+ # USER.
77
+ #
78
+ #mail_owner = postfix
79
+
80
+ # The default_privs parameter specifies the default rights used by
81
+ # the local delivery agent for delivery to external file or command.
82
+ # These rights are used in the absence of a recipient user context.
83
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
84
+ #
85
+ #default_privs = nobody
86
+
87
+ # INTERNET HOST AND DOMAIN NAMES
88
+ #
89
+ # The myhostname parameter specifies the internet hostname of this
90
+ # mail system. The default is to use the fully-qualified domain name
91
+ # from gethostname(). $myhostname is used as a default value for many
92
+ # other configuration parameters.
93
+ #
94
+ myhostname = cap_domain
95
+ #myhostname = virtual.domain.tld
96
+
97
+ # The mydomain parameter specifies the local internet domain name.
98
+ # The default is to use $myhostname minus the first component.
99
+ # $mydomain is used as a default value for many other configuration
100
+ # parameters.
101
+ #
102
+ mydomain = cap_domain
103
+
104
+ # SENDING MAIL
105
+ #
106
+ # The myorigin parameter specifies the domain that locally-posted
107
+ # mail appears to come from. The default is to append $myhostname,
108
+ # which is fine for small sites. If you run a domain with multiple
109
+ # machines, you should (1) change this to $mydomain and (2) set up
110
+ # a domain-wide alias database that aliases each user to
111
+ # user@that.users.mailhost.
112
+ #
113
+ # For the sake of consistency between sender and recipient addresses,
114
+ # myorigin also specifies the default domain name that is appended
115
+ # to recipient addresses that have no @domain part.
116
+ #
117
+ # Debian GNU/Linux specific: Specifying a file name will cause the
118
+ # first line of that file to be used as the name. The Debian default
119
+ # is /etc/mailname.
120
+ #
121
+ #myorigin = /etc/mailname
122
+ #myorigin = $myhostname
123
+ myorigin = $mydomain
124
+
125
+ # RECEIVING MAIL
126
+
127
+ # The inet_interfaces parameter specifies the network interface
128
+ # addresses that this mail system receives mail on. By default,
129
+ # the software claims all active interfaces on the machine. The
130
+ # parameter also controls delivery of mail to user@[ip.address].
131
+ #
132
+ # See also the proxy_interfaces parameter, for network addresses that
133
+ # are forwarded to us via a proxy or network address translator.
134
+ #
135
+ # Note: you need to stop/start Postfix when this parameter changes.
136
+ #
137
+ inet_interfaces = loopback-only
138
+ #inet_interfaces = $myhostname
139
+ #inet_interfaces = $myhostname, localhost
140
+
141
+ # The proxy_interfaces parameter specifies the network interface
142
+ # addresses that this mail system receives mail on by way of a
143
+ # proxy or network address translation unit. This setting extends
144
+ # the address list specified with the inet_interfaces parameter.
145
+ #
146
+ # You must specify your proxy/NAT addresses when your system is a
147
+ # backup MX host for other domains, otherwise mail delivery loops
148
+ # will happen when the primary MX host is down.
149
+ #
150
+ #proxy_interfaces =
151
+ #proxy_interfaces = 1.2.3.4
152
+
153
+ # The mydestination parameter specifies the list of domains that this
154
+ # machine considers itself the final destination for.
155
+ #
156
+ # These domains are routed to the delivery agent specified with the
157
+ # local_transport parameter setting. By default, that is the UNIX
158
+ # compatible delivery agent that lookups all recipients in /etc/passwd
159
+ # and /etc/aliases or their equivalent.
160
+ #
161
+ # The default is $myhostname + localhost.$mydomain + localhost. On
162
+ # a mail domain gateway, you should also include $mydomain.
163
+ #
164
+ # Do not specify the names of virtual domains - those domains are
165
+ # specified elsewhere (see VIRTUAL_README).
166
+ #
167
+ # Do not specify the names of domains that this machine is backup MX
168
+ # host for. Specify those names via the relay_domains settings for
169
+ # the SMTP server, or use permit_mx_backup if you are lazy (see
170
+ # STANDARD_CONFIGURATION_README).
171
+ #
172
+ # The local machine is always the final destination for mail addressed
173
+ # to user@[the.net.work.address] of an interface that the mail system
174
+ # receives mail on (see the inet_interfaces parameter).
175
+ #
176
+ # Specify a list of host or domain names, /file/name or type:table
177
+ # patterns, separated by commas and/or whitespace. A /file/name
178
+ # pattern is replaced by its contents; a type:table is matched when
179
+ # a name matches a lookup key (the right-hand side is ignored).
180
+ # Continue long lines by starting the next line with whitespace.
181
+ #
182
+ # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
183
+ #
184
+ mydestination = $myhostname, localhost.$mydomain, $mydomain
185
+ #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
186
+ #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
187
+ # mail.$mydomain, www.$mydomain, ftp.$mydomain
188
+
189
+ # REJECTING MAIL FOR UNKNOWN LOCAL USERS
190
+ #
191
+ # The local_recipient_maps parameter specifies optional lookup tables
192
+ # with all names or addresses of users that are local with respect
193
+ # to $mydestination, $inet_interfaces or $proxy_interfaces.
194
+ #
195
+ # If this parameter is defined, then the SMTP server will reject
196
+ # mail for unknown local users. This parameter is defined by default.
197
+ #
198
+ # To turn off local recipient checking in the SMTP server, specify
199
+ # local_recipient_maps = (i.e. empty).
200
+ #
201
+ # The default setting assumes that you use the default Postfix local
202
+ # delivery agent for local delivery. You need to update the
203
+ # local_recipient_maps setting if:
204
+ #
205
+ # - You define $mydestination domain recipients in files other than
206
+ # /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
207
+ # For example, you define $mydestination domain recipients in
208
+ # the $virtual_mailbox_maps files.
209
+ #
210
+ # - You redefine the local delivery agent in master.cf.
211
+ #
212
+ # - You redefine the "local_transport" setting in main.cf.
213
+ #
214
+ # - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
215
+ # feature of the Postfix local delivery agent (see local(8)).
216
+ #
217
+ # Details are described in the LOCAL_RECIPIENT_README file.
218
+ #
219
+ # Beware: if the Postfix SMTP server runs chrooted, you probably have
220
+ # to access the passwd file via the proxymap service, in order to
221
+ # overcome chroot restrictions. The alternative, having a copy of
222
+ # the system passwd file in the chroot jail is just not practical.
223
+ #
224
+ # The right-hand side of the lookup tables is conveniently ignored.
225
+ # In the left-hand side, specify a bare username, an @domain.tld
226
+ # wild-card, or specify a user@domain.tld address.
227
+ #
228
+ #local_recipient_maps = unix:passwd.byname $alias_maps
229
+ #local_recipient_maps = proxy:unix:passwd.byname $alias_maps
230
+ #local_recipient_maps =
231
+
232
+ # The unknown_local_recipient_reject_code specifies the SMTP server
233
+ # response code when a recipient domain matches $mydestination or
234
+ # ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
235
+ # and the recipient address or address local-part is not found.
236
+ #
237
+ # The default setting is 550 (reject mail) but it is safer to start
238
+ # with 450 (try again later) until you are certain that your
239
+ # local_recipient_maps settings are OK.
240
+ #
241
+ unknown_local_recipient_reject_code = 550
242
+
243
+ # TRUST AND RELAY CONTROL
244
+
245
+ # The mynetworks parameter specifies the list of "trusted" SMTP
246
+ # clients that have more privileges than "strangers".
247
+ #
248
+ # In particular, "trusted" SMTP clients are allowed to relay mail
249
+ # through Postfix. See the smtpd_recipient_restrictions parameter
250
+ # in postconf(5).
251
+ #
252
+ # You can specify the list of "trusted" network addresses by hand
253
+ # or you can let Postfix do it for you (which is the default).
254
+ #
255
+ # By default (mynetworks_style = subnet), Postfix "trusts" SMTP
256
+ # clients in the same IP subnetworks as the local machine.
257
+ # On Linux, this does works correctly only with interfaces specified
258
+ # with the "ifconfig" command.
259
+ #
260
+ # Specify "mynetworks_style = class" when Postfix should "trust" SMTP
261
+ # clients in the same IP class A/B/C networks as the local machine.
262
+ # Don't do this with a dialup site - it would cause Postfix to "trust"
263
+ # your entire provider's network. Instead, specify an explicit
264
+ # mynetworks list by hand, as described below.
265
+ #
266
+ # Specify "mynetworks_style = host" when Postfix should "trust"
267
+ # only the local machine.
268
+ #
269
+ #mynetworks_style = class
270
+ #mynetworks_style = subnet
271
+ mynetworks_style = host
272
+
273
+ # Alternatively, you can specify the mynetworks list by hand, in
274
+ # which case Postfix ignores the mynetworks_style setting.
275
+ #
276
+ # Specify an explicit list of network/netmask patterns, where the
277
+ # mask specifies the number of bits in the network part of a host
278
+ # address.
279
+ #
280
+ # You can also specify the absolute pathname of a pattern file instead
281
+ # of listing the patterns here. Specify type:table for table-based lookups
282
+ # (the value on the table right-hand side is not used).
283
+ #
284
+ #mynetworks = 168.100.189.0/28, 127.0.0.0/8
285
+ #mynetworks = $config_directory/mynetworks
286
+ #mynetworks = hash:/etc/postfix/network_table
287
+ mynetworks = 127.0.0.0/8
288
+
289
+ # The relay_domains parameter restricts what destinations this system will
290
+ # relay mail to. See the smtpd_recipient_restrictions description in
291
+ # postconf(5) for detailed information.
292
+ #
293
+ # By default, Postfix relays mail
294
+ # - from "trusted" clients (IP address matches $mynetworks) to any destination,
295
+ # - from "untrusted" clients to destinations that match $relay_domains or
296
+ # subdomains thereof, except addresses with sender-specified routing.
297
+ # The default relay_domains value is $mydestination.
298
+ #
299
+ # In addition to the above, the Postfix SMTP server by default accepts mail
300
+ # that Postfix is final destination for:
301
+ # - destinations that match $inet_interfaces or $proxy_interfaces,
302
+ # - destinations that match $mydestination
303
+ # - destinations that match $virtual_alias_domains,
304
+ # - destinations that match $virtual_mailbox_domains.
305
+ # These destinations do not need to be listed in $relay_domains.
306
+ #
307
+ # Specify a list of hosts or domains, /file/name patterns or type:name
308
+ # lookup tables, separated by commas and/or whitespace. Continue
309
+ # long lines by starting the next line with whitespace. A file name
310
+ # is replaced by its contents; a type:name table is matched when a
311
+ # (parent) domain appears as lookup key.
312
+ #
313
+ # NOTE: Postfix will not automatically forward mail for domains that
314
+ # list this system as their primary or backup MX host. See the
315
+ # permit_mx_backup restriction description in postconf(5).
316
+ #
317
+ #relay_domains = $mydestination
318
+
319
+ # INTERNET OR INTRANET
320
+
321
+ # The relayhost parameter specifies the default host to send mail to
322
+ # when no entry is matched in the optional transport(5) table. When
323
+ # no relayhost is given, mail is routed directly to the destination.
324
+ #
325
+ # On an intranet, specify the organizational domain name. If your
326
+ # internal DNS uses no MX records, specify the name of the intranet
327
+ # gateway host instead.
328
+ #
329
+ # In the case of SMTP, specify a domain, host, host:port, [host]:port,
330
+ # [address] or [address]:port; the form [host] turns off MX lookups.
331
+ #
332
+ # If you're connected via UUCP, see also the default_transport parameter.
333
+ #
334
+ #relayhost = $mydomain
335
+ #relayhost = [gateway.my.domain]
336
+ #relayhost = [mailserver.isp.tld]
337
+ #relayhost = uucphost
338
+ #relayhost = [an.ip.add.ress]
339
+
340
+ # REJECTING UNKNOWN RELAY USERS
341
+ #
342
+ # The relay_recipient_maps parameter specifies optional lookup tables
343
+ # with all addresses in the domains that match $relay_domains.
344
+ #
345
+ # If this parameter is defined, then the SMTP server will reject
346
+ # mail for unknown relay users. This feature is off by default.
347
+ #
348
+ # The right-hand side of the lookup tables is conveniently ignored.
349
+ # In the left-hand side, specify an @domain.tld wild-card, or specify
350
+ # a user@domain.tld address.
351
+ #
352
+ #relay_recipient_maps = hash:/etc/postfix/relay_recipients
353
+
354
+ # INPUT RATE CONTROL
355
+ #
356
+ # The in_flow_delay configuration parameter implements mail input
357
+ # flow control. This feature is turned on by default, although it
358
+ # still needs further development (it's disabled on SCO UNIX due
359
+ # to an SCO bug).
360
+ #
361
+ # A Postfix process will pause for $in_flow_delay seconds before
362
+ # accepting a new message, when the message arrival rate exceeds the
363
+ # message delivery rate. With the default 100 SMTP server process
364
+ # limit, this limits the mail inflow to 100 messages a second more
365
+ # than the number of messages delivered per second.
366
+ #
367
+ # Specify 0 to disable the feature. Valid delays are 0..10.
368
+ #
369
+ #in_flow_delay = 1s
370
+
371
+ # ADDRESS REWRITING
372
+ #
373
+ # The ADDRESS_REWRITING_README document gives information about
374
+ # address masquerading or other forms of address rewriting including
375
+ # username->Firstname.Lastname mapping.
376
+
377
+ # ADDRESS REDIRECTION (VIRTUAL DOMAIN)
378
+ #
379
+ # The VIRTUAL_README document gives information about the many forms
380
+ # of domain hosting that Postfix supports.
381
+
382
+ # "USER HAS MOVED" BOUNCE MESSAGES
383
+ #
384
+ # See the discussion in the ADDRESS_REWRITING_README document.
385
+
386
+ # TRANSPORT MAP
387
+ #
388
+ # See the discussion in the ADDRESS_REWRITING_README document.
389
+
390
+ # ALIAS DATABASE
391
+ #
392
+ # The alias_maps parameter specifies the list of alias databases used
393
+ # by the local delivery agent. The default list is system dependent.
394
+ #
395
+ # On systems with NIS, the default is to search the local alias
396
+ # database, then the NIS alias database. See aliases(5) for syntax
397
+ # details.
398
+ #
399
+ # If you change the alias database, run "postalias /etc/aliases" (or
400
+ # wherever your system stores the mail alias file), or simply run
401
+ # "newaliases" to build the necessary DBM or DB file.
402
+ #
403
+ # It will take a minute or so before changes become visible. Use
404
+ # "postfix reload" to eliminate the delay.
405
+ #
406
+ #alias_maps = dbm:/etc/aliases
407
+ #alias_maps = hash:/etc/aliases
408
+ #alias_maps = hash:/etc/aliases, nis:mail.aliases
409
+ #alias_maps = netinfo:/aliases
410
+
411
+ # The alias_database parameter specifies the alias database(s) that
412
+ # are built with "newaliases" or "sendmail -bi". This is a separate
413
+ # configuration parameter, because alias_maps (see above) may specify
414
+ # tables that are not necessarily all under control by Postfix.
415
+ #
416
+ #alias_database = dbm:/etc/aliases
417
+ #alias_database = dbm:/etc/mail/aliases
418
+ #alias_database = hash:/etc/aliases
419
+ #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
420
+
421
+ # ADDRESS EXTENSIONS (e.g., user+foo)
422
+ #
423
+ # The recipient_delimiter parameter specifies the separator between
424
+ # user names and address extensions (user+foo). See canonical(5),
425
+ # local(8), relocated(5) and virtual(5) for the effects this has on
426
+ # aliases, canonical, virtual, relocated and .forward file lookups.
427
+ # Basically, the software tries user+foo and .forward+foo before
428
+ # trying user and .forward.
429
+ #
430
+ recipient_delimiter = +
431
+
432
+ mailbox_size_limit = 0
433
+
434
+ # DELIVERY TO MAILBOX
435
+ #
436
+ # The home_mailbox parameter specifies the optional pathname of a
437
+ # mailbox file relative to a user's home directory. The default
438
+ # mailbox file is /var/spool/mail/user or /var/mail/user. Specify
439
+ # "Maildir/" for qmail-style delivery (the / is required).
440
+ #
441
+ #home_mailbox = Mailbox
442
+ #home_mailbox = Maildir/
443
+
444
+ # The mail_spool_directory parameter specifies the directory where
445
+ # UNIX-style mailboxes are kept. The default setting depends on the
446
+ # system type.
447
+ #
448
+ #mail_spool_directory = /var/mail
449
+ #mail_spool_directory = /var/spool/mail
450
+
451
+ # The mailbox_command parameter specifies the optional external
452
+ # command to use instead of mailbox delivery. The command is run as
453
+ # the recipient with proper HOME, SHELL and LOGNAME environment settings.
454
+ # Exception: delivery for root is done as $default_user.
455
+ #
456
+ # Other environment variables of interest: USER (recipient username),
457
+ # EXTENSION (address extension), DOMAIN (domain part of address),
458
+ # and LOCAL (the address localpart).
459
+ #
460
+ # Unlike other Postfix configuration parameters, the mailbox_command
461
+ # parameter is not subjected to $parameter substitutions. This is to
462
+ # make it easier to specify shell syntax (see example below).
463
+ #
464
+ # Avoid shell meta characters because they will force Postfix to run
465
+ # an expensive shell process. Procmail alone is expensive enough.
466
+ #
467
+ # IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
468
+ # ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
469
+ #
470
+ #mailbox_command = /usr/bin/procmail
471
+ #mailbox_command = /usr/bin/procmail -a "$EXTENSION"
472
+
473
+ # The mailbox_transport specifies the optional transport in master.cf
474
+ # to use after processing aliases and .forward files. This parameter
475
+ # has precedence over the mailbox_command, fallback_transport and
476
+ # luser_relay parameters.
477
+ #
478
+ # Specify a string of the form transport:nexthop, where transport is
479
+ # the name of a mail delivery transport defined in master.cf. The
480
+ # :nexthop part is optional. For more details see the sample transport
481
+ # configuration file.
482
+ #
483
+ # NOTE: if you use this feature for accounts not in the UNIX password
484
+ # file, then you must update the "local_recipient_maps" setting in
485
+ # the main.cf file, otherwise the SMTP server will reject mail for
486
+ # non-UNIX accounts with "User unknown in local recipient table".
487
+ #
488
+ # Cyrus IMAP over LMTP. Specify ``lmtpunix cmd="lmtpd"
489
+ # listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf.
490
+ #mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
491
+ #
492
+ # Cyrus IMAP via command line. Uncomment the "cyrus...pipe" and
493
+ # subsequent line in master.cf.
494
+ #mailbox_transport = cyrus
495
+
496
+ # The fallback_transport specifies the optional transport in master.cf
497
+ # to use for recipients that are not found in the UNIX passwd database.
498
+ # This parameter has precedence over the luser_relay parameter.
499
+ #
500
+ # Specify a string of the form transport:nexthop, where transport is
501
+ # the name of a mail delivery transport defined in master.cf. The
502
+ # :nexthop part is optional. For more details see the sample transport
503
+ # configuration file.
504
+ #
505
+ # NOTE: if you use this feature for accounts not in the UNIX password
506
+ # file, then you must update the "local_recipient_maps" setting in
507
+ # the main.cf file, otherwise the SMTP server will reject mail for
508
+ # non-UNIX accounts with "User unknown in local recipient table".
509
+ #
510
+ #fallback_transport = lmtp:unix:/file/name
511
+ #fallback_transport = cyrus
512
+ #fallback_transport =
513
+
514
+ # The luser_relay parameter specifies an optional destination address
515
+ # for unknown recipients. By default, mail for unknown@$mydestination,
516
+ # unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
517
+ # as undeliverable.
518
+ #
519
+ # The following expansions are done on luser_relay: $user (recipient
520
+ # username), $shell (recipient shell), $home (recipient home directory),
521
+ # $recipient (full recipient address), $extension (recipient address
522
+ # extension), $domain (recipient domain), $local (entire recipient
523
+ # localpart), $recipient_delimiter. Specify ${name?value} or
524
+ # ${name:value} to expand value only when $name does (does not) exist.
525
+ #
526
+ # luser_relay works only for the default Postfix local delivery agent.
527
+ #
528
+ # NOTE: if you use this feature for accounts not in the UNIX password
529
+ # file, then you must specify "local_recipient_maps =" (i.e. empty) in
530
+ # the main.cf file, otherwise the SMTP server will reject mail for
531
+ # non-UNIX accounts with "User unknown in local recipient table".
532
+ #
533
+ #luser_relay = $user@other.host
534
+ #luser_relay = $local@other.host
535
+ #luser_relay = admin+$local
536
+
537
+ # JUNK MAIL CONTROLS
538
+ #
539
+ # The controls listed here are only a very small subset. The file
540
+ # SMTPD_ACCESS_README provides an overview.
541
+
542
+ # The header_checks parameter specifies an optional table with patterns
543
+ # that each logical message header is matched against, including
544
+ # headers that span multiple physical lines.
545
+ #
546
+ # By default, these patterns also apply to MIME headers and to the
547
+ # headers of attached messages. With older Postfix versions, MIME and
548
+ # attached message headers were treated as body text.
549
+ #
550
+ # For details, see "man header_checks".
551
+ #
552
+ #header_checks = regexp:/etc/postfix/header_checks
553
+
554
+ # FAST ETRN SERVICE
555
+ #
556
+ # Postfix maintains per-destination logfiles with information about
557
+ # deferred mail, so that mail can be flushed quickly with the SMTP
558
+ # "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
559
+ # See the ETRN_README document for a detailed description.
560
+ #
561
+ # The fast_flush_domains parameter controls what destinations are
562
+ # eligible for this service. By default, they are all domains that
563
+ # this server is willing to relay mail to.
564
+ #
565
+ #fast_flush_domains = $relay_domains
566
+
567
+ # SHOW SOFTWARE VERSION OR NOT
568
+ #
569
+ # The smtpd_banner parameter specifies the text that follows the 220
570
+ # code in the SMTP server's greeting banner. Some people like to see
571
+ # the mail version advertised. By default, Postfix shows no version.
572
+ #
573
+ # You MUST specify $myhostname at the start of the text. That is an
574
+ # RFC requirement. Postfix itself does not care.
575
+ #
576
+ #smtpd_banner = $myhostname ESMTP $mail_name
577
+ #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
578
+ smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
579
+
580
+
581
+ # PARALLEL DELIVERY TO THE SAME DESTINATION
582
+ #
583
+ # How many parallel deliveries to the same user or domain? With local
584
+ # delivery, it does not make sense to do massively parallel delivery
585
+ # to the same user, because mailbox updates must happen sequentially,
586
+ # and expensive pipelines in .forward files can cause disasters when
587
+ # too many are run at the same time. With SMTP deliveries, 10
588
+ # simultaneous connections to the same domain could be sufficient to
589
+ # raise eyebrows.
590
+ #
591
+ # Each message delivery transport has its XXX_destination_concurrency_limit
592
+ # parameter. The default is $default_destination_concurrency_limit for
593
+ # most delivery transports. For the local delivery agent the default is 2.
594
+
595
+ #local_destination_concurrency_limit = 2
596
+ #default_destination_concurrency_limit = 20
597
+
598
+ # DEBUGGING CONTROL
599
+ #
600
+ # The debug_peer_level parameter specifies the increment in verbose
601
+ # logging level when an SMTP client or server host name or address
602
+ # matches a pattern in the debug_peer_list parameter.
603
+ #
604
+ #debug_peer_level = 2
605
+
606
+ # The debug_peer_list parameter specifies an optional list of domain
607
+ # or network patterns, /file/name patterns or type:name tables. When
608
+ # an SMTP client or server host name or address matches a pattern,
609
+ # increase the verbose logging level by the amount specified in the
610
+ # debug_peer_level parameter.
611
+ #
612
+ #debug_peer_list = 127.0.0.1
613
+ #debug_peer_list = some.domain
614
+
615
+ # The debugger_command specifies the external command that is executed
616
+ # when a Postfix daemon program is run with the -D option.
617
+ #
618
+ # Use "command .. & sleep 5" so that the debugger can attach before
619
+ # the process marches on. If you use an X-based debugger, be sure to
620
+ # set up your XAUTHORITY environment variable before starting Postfix.
621
+ #
622
+ debugger_command =
623
+ PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
624
+ ddd $daemon_directory/$process_name $process_id & sleep 5
625
+
626
+ # If you can't use X, use this to capture the call stack when a
627
+ # daemon crashes. The result is in a file in the configuration
628
+ # directory, and is named after the process name and the process ID.
629
+ #
630
+ # debugger_command =
631
+ # PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
632
+ # echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
633
+ # >$config_directory/$process_name.$process_id.log & sleep 5
634
+ #
635
+ # Another possibility is to run gdb under a detached screen session.
636
+ # To attach to the screen sesssion, su root and run "screen -r
637
+ # <id_string>" where <id_string> uniquely matches one of the detached
638
+ # sessions (from "screen -list").
639
+ #
640
+ # debugger_command =
641
+ # PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
642
+ # -dmS $process_name gdb $daemon_directory/$process_name
643
+ # $process_id & sleep 1
644
+
645
+ # INSTALL-TIME CONFIGURATION INFORMATION
646
+ #
647
+ # The following parameters are used when installing a new Postfix version.
648
+ #
649
+ # sendmail_path: The full pathname of the Postfix sendmail command.
650
+ # This is the Sendmail-compatible mail posting interface.
651
+ #
652
+ # sendmail_path =
653
+
654
+ # newaliases_path: The full pathname of the Postfix newaliases command.
655
+ # This is the Sendmail-compatible command to build alias databases.
656
+ #
657
+ # newaliases_path =
658
+
659
+ # mailq_path: The full pathname of the Postfix mailq command. This
660
+ # is the Sendmail-compatible mail queue listing command.
661
+ #
662
+ # mailq_path =
663
+
664
+ # setgid_group: The group for mail submission and queue management
665
+ # commands. This must be a group name with a numerical group ID that
666
+ # is not shared with other accounts, not even with the Postfix account.
667
+ #
668
+ # setgid_group =
669
+
670
+ # html_directory: The location of the Postfix HTML documentation.
671
+ #
672
+ # html_directory =
673
+
674
+ # manpage_directory: The location of the Postfix on-line manual pages.
675
+ #
676
+ # manpage_directory =
677
+
678
+ # sample_directory: The location of the Postfix sample configuration files.
679
+ # This parameter is obsolete as of Postfix 2.1.
680
+ #
681
+ # sample_directory =
682
+
683
+ # readme_directory: The location of the Postfix README files.
684
+ #
685
+ # readme_directory =