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.
Files changed (332) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/Gemfile +24 -0
  4. data/Gemfile.lock +167 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.markdown +9 -0
  7. data/Rakefile +31 -0
  8. data/Rakefile1 +9 -0
  9. data/Vagrantfile +51 -0
  10. data/app/assets/images/arrow_bottom.gif +0 -0
  11. data/app/assets/images/arrow_right.gif +0 -0
  12. data/app/assets/images/at-sign.png +0 -0
  13. data/app/assets/images/checkerboard.gif +0 -0
  14. data/app/assets/images/glyphicons-halflings-white.png +0 -0
  15. data/app/assets/images/glyphicons-halflings.png +0 -0
  16. data/app/assets/images/icon_draft.gif +0 -0
  17. data/app/assets/images/icon_layout.gif +0 -0
  18. data/app/assets/images/icon_move.gif +0 -0
  19. data/app/assets/images/icon_regular.gif +0 -0
  20. data/app/assets/images/icon_snippet.gif +0 -0
  21. data/app/assets/images/nav_arrow.png +0 -0
  22. data/app/assets/images/x.png +0 -0
  23. data/app/assets/javascripts/application.coffee.erb +27 -0
  24. data/app/assets/javascripts/canjs/can.construct.proxy.js +60 -0
  25. data/app/assets/javascripts/canjs/can.construct.super.js +44 -0
  26. data/app/assets/javascripts/canjs/can.control.plugin.js +245 -0
  27. data/app/assets/javascripts/canjs/can.control.view.js +88 -0
  28. data/app/assets/javascripts/canjs/can.dojo.js +3669 -0
  29. data/app/assets/javascripts/canjs/can.dojo.min.js +66 -0
  30. data/app/assets/javascripts/canjs/can.fixture.js +1020 -0
  31. data/app/assets/javascripts/canjs/can.jquery.js +2995 -0
  32. data/app/assets/javascripts/canjs/can.jquery.min.js +52 -0
  33. data/app/assets/javascripts/canjs/can.mootools.js +3462 -0
  34. data/app/assets/javascripts/canjs/can.mootools.min.js +63 -0
  35. data/app/assets/javascripts/canjs/can.observe.attributes.js +293 -0
  36. data/app/assets/javascripts/canjs/can.observe.backup.js +368 -0
  37. data/app/assets/javascripts/canjs/can.observe.delegate.js +359 -0
  38. data/app/assets/javascripts/canjs/can.observe.setter.js +58 -0
  39. data/app/assets/javascripts/canjs/can.observe.validations.js +374 -0
  40. data/app/assets/javascripts/canjs/can.view.modifiers.js +292 -0
  41. data/app/assets/javascripts/canjs/can.yui.js +3530 -0
  42. data/app/assets/javascripts/canjs/can.yui.min.js +65 -0
  43. data/app/assets/javascripts/canjs/can.zepto.js +3426 -0
  44. data/app/assets/javascripts/canjs/can.zepto.min.js +62 -0
  45. data/app/assets/javascripts/controls/admins.coffee.erb +105 -0
  46. data/app/assets/javascripts/controls/aliases.coffee.erb +91 -0
  47. data/app/assets/javascripts/controls/domains.coffee.erb +115 -0
  48. data/app/assets/javascripts/controls/settings.coffee.erb +47 -0
  49. data/app/assets/javascripts/controls/users.coffee.erb +94 -0
  50. data/app/assets/javascripts/lib/facebox.js +311 -0
  51. data/app/assets/javascripts/lib/html5.js +2 -0
  52. data/app/assets/javascripts/lib/jquery.js +9301 -0
  53. data/app/assets/javascripts/lib/jquery_formparams.js +108 -0
  54. data/app/assets/javascripts/lib/jquery_input_hint.js +20 -0
  55. data/app/assets/javascripts/lib/jquery_paginate.js +120 -0
  56. data/app/assets/javascripts/lib/jquery_ui_custom.js +6 -0
  57. data/app/assets/javascripts/lib/json2.js +487 -0
  58. data/app/assets/javascripts/lib/utils.coffee.erb +48 -0
  59. data/app/assets/javascripts/models/admin.coffee.erb +42 -0
  60. data/app/assets/javascripts/models/alias.coffee.erb +28 -0
  61. data/app/assets/javascripts/models/domain.coffee.erb +39 -0
  62. data/app/assets/javascripts/models/property.coffee.erb +18 -0
  63. data/app/assets/javascripts/models/user.coffee.erb +29 -0
  64. data/app/assets/stylesheets/application.sass +156 -0
  65. data/app/assets/stylesheets/base.css.sass +243 -0
  66. data/app/assets/stylesheets/facebox.css +80 -0
  67. data/app/assets/stylesheets/lib/bootstrap.css +9 -0
  68. data/app/assets/stylesheets/twitter/bootstrap-responsive.scss +1 -0
  69. data/app/assets/stylesheets/twitter/bootstrap.scss +63 -0
  70. data/app/assets/stylesheets/twitter/bootstrap/_accordion.scss +34 -0
  71. data/app/assets/stylesheets/twitter/bootstrap/_alerts.scss +79 -0
  72. data/app/assets/stylesheets/twitter/bootstrap/_breadcrumbs.scss +24 -0
  73. data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +229 -0
  74. data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +228 -0
  75. data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +158 -0
  76. data/app/assets/stylesheets/twitter/bootstrap/_close.scss +32 -0
  77. data/app/assets/stylesheets/twitter/bootstrap/_code.scss +61 -0
  78. data/app/assets/stylesheets/twitter/bootstrap/_component-animations.scss +22 -0
  79. data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +237 -0
  80. data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +689 -0
  81. data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +21 -0
  82. data/app/assets/stylesheets/twitter/bootstrap/_hero-unit.scss +25 -0
  83. data/app/assets/stylesheets/twitter/bootstrap/_labels-badges.scss +83 -0
  84. data/app/assets/stylesheets/twitter/bootstrap/_layouts.scss +16 -0
  85. data/app/assets/stylesheets/twitter/bootstrap/_media.scss +55 -0
  86. data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +690 -0
  87. data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +95 -0
  88. data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +497 -0
  89. data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +409 -0
  90. data/app/assets/stylesheets/twitter/bootstrap/_pager.scss +43 -0
  91. data/app/assets/stylesheets/twitter/bootstrap/_pagination.scss +123 -0
  92. data/app/assets/stylesheets/twitter/bootstrap/_popovers.scss +133 -0
  93. data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +122 -0
  94. data/app/assets/stylesheets/twitter/bootstrap/_reset.scss +216 -0
  95. data/app/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.scss +28 -0
  96. data/app/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.scss +193 -0
  97. data/app/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.scss +19 -0
  98. data/app/assets/stylesheets/twitter/bootstrap/_responsive-navbar.scss +189 -0
  99. data/app/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +74 -0
  100. data/app/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +53 -0
  101. data/app/assets/stylesheets/twitter/bootstrap/_sprites.scss +197 -0
  102. data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +235 -0
  103. data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +53 -0
  104. data/app/assets/stylesheets/twitter/bootstrap/_tooltip.scss +70 -0
  105. data/app/assets/stylesheets/twitter/bootstrap/_type.scss +247 -0
  106. data/app/assets/stylesheets/twitter/bootstrap/_utilities.scss +45 -0
  107. data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +301 -0
  108. data/app/assets/stylesheets/twitter/bootstrap/_wells.scss +29 -0
  109. data/app/assets/stylesheets/twitter/bootstrap/responsive.scss +48 -0
  110. data/app/controllers/admin_users_controller.rb +62 -0
  111. data/app/controllers/aliases_controller.rb +35 -0
  112. data/app/controllers/application_controller.rb +20 -0
  113. data/app/controllers/domains_controller.rb +48 -0
  114. data/app/controllers/server_controller.rb +28 -0
  115. data/app/controllers/users_controller.rb +35 -0
  116. data/app/helpers/admin_users_helper.rb +11 -0
  117. data/app/helpers/application_helper.rb +2 -0
  118. data/app/helpers/domains_helper.rb +25 -0
  119. data/app/helpers/server_helper.rb +30 -0
  120. data/app/mailers/.gitkeep +0 -0
  121. data/app/models/.gitkeep +0 -0
  122. data/app/models/admin_user.rb +54 -0
  123. data/app/models/certificate_manager.rb +46 -0
  124. data/app/models/property.rb +103 -0
  125. data/app/models/property/awstats.rb +15 -0
  126. data/app/models/property/dovecot.rb +61 -0
  127. data/app/models/property/dspam.rb +45 -0
  128. data/app/models/property/nginx.rb +47 -0
  129. data/app/models/property/postfix.rb +64 -0
  130. data/app/models/property_value_validator.rb +41 -0
  131. data/app/models/system_manager.rb +88 -0
  132. data/app/models/virtual_alias.rb +13 -0
  133. data/app/models/virtual_domain.rb +15 -0
  134. data/app/models/virtual_user.rb +51 -0
  135. data/app/views/admin_users/_form.html.haml +21 -0
  136. data/app/views/admin_users/first.html.haml +12 -0
  137. data/app/views/admin_users/index.html.haml +61 -0
  138. data/app/views/aliases/_form.html.haml +11 -0
  139. data/app/views/aliases/_list.html.haml +0 -0
  140. data/app/views/devise/confirmations/new.html.haml +9 -0
  141. data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
  142. data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
  143. data/app/views/devise/mailer/unlock_instructions.html.haml +5 -0
  144. data/app/views/devise/passwords/edit.html.haml +14 -0
  145. data/app/views/devise/passwords/new.html.haml +12 -0
  146. data/app/views/devise/registrations/edit.html.haml +18 -0
  147. data/app/views/devise/registrations/new.html.haml +10 -0
  148. data/app/views/devise/sessions/new.html.haml +16 -0
  149. data/app/views/devise/shared/_links.haml +17 -0
  150. data/app/views/devise/unlocks/new.html.haml +11 -0
  151. data/app/views/domains/_fields.html.haml +0 -0
  152. data/app/views/domains/_form.html.haml +7 -0
  153. data/app/views/domains/index.html.haml +133 -0
  154. data/app/views/domains/show.html.haml +1 -0
  155. data/app/views/layouts/_nav.html.haml +3 -0
  156. data/app/views/layouts/application.html.haml +29 -0
  157. data/app/views/server/_certificates.html.haml +10 -0
  158. data/app/views/server/_dovecot.html.haml +27 -0
  159. data/app/views/server/_dspam.html.haml +9 -0
  160. data/app/views/server/_postfix_info.html.haml +5 -0
  161. data/app/views/server/_postfix_test.html.haml +5 -0
  162. data/app/views/server/_status.html.haml +11 -0
  163. data/app/views/server/index.html.haml +36 -0
  164. data/app/views/users/_form.html.haml +11 -0
  165. data/app/views/users/_list.html.haml +0 -0
  166. data/bin/rmails +43 -0
  167. data/config.ru +4 -0
  168. data/config/application.rb +62 -0
  169. data/config/boot.rb +6 -0
  170. data/config/environment.rb +5 -0
  171. data/config/environments/development.rb +37 -0
  172. data/config/environments/production.rb +67 -0
  173. data/config/environments/test.rb +37 -0
  174. data/config/initializers/backtrace_silencers.rb +7 -0
  175. data/config/initializers/devise.rb +240 -0
  176. data/config/initializers/devise_encryptable.rb +37 -0
  177. data/config/initializers/devise_models.rb +86 -0
  178. data/config/initializers/inflections.rb +15 -0
  179. data/config/initializers/mime_types.rb +5 -0
  180. data/config/initializers/secret_token.rb +7 -0
  181. data/config/initializers/session_store.rb +8 -0
  182. data/config/initializers/simple_form.rb +142 -0
  183. data/config/initializers/simple_form_bootstrap.rb +45 -0
  184. data/config/initializers/wrap_parameters.rb +14 -0
  185. data/config/locales/cz.yml +45 -0
  186. data/config/locales/devise.cz.yml +47 -0
  187. data/config/locales/devise.en.yml +60 -0
  188. data/config/locales/en.yml +5 -0
  189. data/config/locales/server/cz.yml +14 -0
  190. data/config/locales/server/en.yml +7 -0
  191. data/config/locales/server/help/dovecot/cz.yml +21 -0
  192. data/config/locales/server/help/dovecot/en.yml +18 -0
  193. data/config/locales/server/help/dspam/cz.yml +10 -0
  194. data/config/locales/server/help/dspam/en.yml +4 -0
  195. data/config/locales/server/key/dovecot/cz.yml +23 -0
  196. data/config/locales/server/key/dovecot/en.yml +20 -0
  197. data/config/locales/server/key/dspam/cz.yml +10 -0
  198. data/config/locales/server/key/dspam/en.yml +4 -0
  199. data/config/locales/simple_form.en.yml +26 -0
  200. data/config/locales/views/admin_users/cz.yml +25 -0
  201. data/config/locales/views/admin_users/en.yml +5 -0
  202. data/config/locales/views/aliases/cz.yml +17 -0
  203. data/config/locales/views/aliases/en.yml +1 -0
  204. data/config/locales/views/devise/cz.yml +26 -0
  205. data/config/locales/views/devise/en.yml +13 -0
  206. data/config/locales/views/domains/cz.yml +15 -0
  207. data/config/locales/views/domains/en.yml +15 -0
  208. data/config/locales/views/server/cz.yml +19 -0
  209. data/config/locales/views/server/en.yml +3 -0
  210. data/config/locales/views/users/cz.yml +18 -0
  211. data/config/locales/views/users/en.yml +1 -0
  212. data/config/routes.rb +80 -0
  213. data/db/migrate/20121112201233_virtual_domain.rb +11 -0
  214. data/db/migrate/20121112201247_virtual_alias.rb +10 -0
  215. data/db/migrate/20121112201341_virtual_user.rb +34 -0
  216. data/db/migrate/20121112201359_create_admin_user.rb +30 -0
  217. data/db/migrate/20121112201411_server_configuration.rb +13 -0
  218. data/db/migrate/20130304083938_join_domains_users.rb +12 -0
  219. data/db/migrate/20130311214040_create_versions.rb +18 -0
  220. data/db/seeds.rb +45 -0
  221. data/lib/devise-encryptable.rb +1 -0
  222. data/lib/rmails.rb +5 -0
  223. data/lib/rmails/installer.rb +37 -0
  224. data/lib/rmails/version.rb +3 -0
  225. data/lib/tasks/.gitkeep +0 -0
  226. data/lib/templates/haml/scaffold/_form.html.haml +10 -0
  227. data/locals +0 -0
  228. data/log/.gitkeep +0 -0
  229. data/public/404.html +26 -0
  230. data/public/422.html +26 -0
  231. data/public/500.html +25 -0
  232. data/public/favicon.ico +0 -0
  233. data/public/fonts/London.eot +0 -0
  234. data/public/fonts/London.otf +0 -0
  235. data/public/fonts/London.woff +0 -0
  236. data/public/fonts/LondonBold.otf +0 -0
  237. data/public/robots.txt +5 -0
  238. data/rmails.gemspec +35 -0
  239. data/script/prepflog.pl +576 -0
  240. data/script/rails +6 -0
  241. data/system/config/automateit_env.rb +16 -0
  242. data/system/config/fields.yml +48 -0
  243. data/system/config/tags.yml +39 -0
  244. data/system/dist/README_AutomateIt_dist.txt +20 -0
  245. data/system/dist/amavis/spamassassin.cf.erb +85 -0
  246. data/system/dist/amavis/user.erb +33 -0
  247. data/system/dist/awstats/awstats.mail.conf.erb +41 -0
  248. data/system/dist/awstats/prepflog.pl +576 -0
  249. data/system/dist/dovecot/dovecot-sql.conf.ext.erb +14 -0
  250. data/system/dist/dovecot/dovecot.conf.erb +297 -0
  251. data/system/dist/dovecot/old_dovecot.conf.erb +63 -0
  252. data/system/dist/dspam/conf.erb +96 -0
  253. data/system/dist/dspam/pgsql.conf +33 -0
  254. data/system/dist/nginx/awstats.erb +17 -0
  255. data/system/dist/nginx/rmails.erb +40 -0
  256. data/system/dist/postfix/email2email.cf.erb +5 -0
  257. data/system/dist/postfix/main.cf.erb +118 -0
  258. data/system/dist/postfix/master.cf.erb +74 -0
  259. data/system/dist/postfix/sasl.conf.erb +3 -0
  260. data/system/dist/postfix/sender_login_maps.cf.erb +5 -0
  261. data/system/dist/postfix/virtual_alias_maps.cf.erb +5 -0
  262. data/system/dist/postfix/virtual_mailbox_domains.cf.erb +5 -0
  263. data/system/dist/postfix/virtual_mailbox_maps.cf.erb +5 -0
  264. data/system/dist/postgresql/postgresql.conf.erb +54 -0
  265. data/system/dist/rmails/Gemfile.1 +8 -0
  266. data/system/dist/rmails/Gemfile.2 +24 -0
  267. data/system/dist/rmails/database.yml.erb +15 -0
  268. data/system/dist/sudoers +37 -0
  269. data/system/lib/README_AutomateIt_lib.txt +22 -0
  270. data/system/lib/dkim_key.rb +9 -0
  271. data/system/lib/smtpd_key.rb +39 -0
  272. data/system/lib/ssl.rb +23 -0
  273. data/system/recipes/01_prepare_server.rb +84 -0
  274. data/system/recipes/02_setup_database.rb +65 -0
  275. data/system/recipes/03_setup_postfix.rb +124 -0
  276. data/system/recipes/04_setup_dovecot.rb +78 -0
  277. data/system/recipes/05_setup_nginx.rb +29 -0
  278. data/system/recipes/06_setup_dspam.rb +24 -0
  279. data/system/recipes/07_setup_amavis.rb +16 -0
  280. data/system/recipes/08_setup_spamassassin.rb +22 -0
  281. data/system/recipes/09_setup_awstats.rb +49 -0
  282. data/system/recipes/XX_start_services.rb +5 -0
  283. data/test/fixtures/.gitkeep +0 -0
  284. data/test/functional/.gitkeep +0 -0
  285. data/test/functional/aliases_controller_test.rb +7 -0
  286. data/test/functional/domains_controller_test.rb +7 -0
  287. data/test/functional/users_controller_test.rb +7 -0
  288. data/test/integration/.gitkeep +0 -0
  289. data/test/performance/browsing_test.rb +12 -0
  290. data/test/test_helper.rb +13 -0
  291. data/test/unit/.gitkeep +0 -0
  292. data/test/unit/helpers/aliases_helper_test.rb +4 -0
  293. data/test/unit/helpers/domains_helper_test.rb +4 -0
  294. data/test/unit/helpers/users_helper_test.rb +4 -0
  295. data/vendor/assets/javascripts/.gitkeep +0 -0
  296. data/vendor/assets/javascripts/canjs/can.construct.proxy.js +60 -0
  297. data/vendor/assets/javascripts/canjs/can.construct.super.js +44 -0
  298. data/vendor/assets/javascripts/canjs/can.control.plugin.js +245 -0
  299. data/vendor/assets/javascripts/canjs/can.control.view.js +88 -0
  300. data/vendor/assets/javascripts/canjs/can.dojo.js +3669 -0
  301. data/vendor/assets/javascripts/canjs/can.dojo.min.js +66 -0
  302. data/vendor/assets/javascripts/canjs/can.fixture.js +1020 -0
  303. data/vendor/assets/javascripts/canjs/can.jquery.js +2995 -0
  304. data/vendor/assets/javascripts/canjs/can.jquery.min.js +52 -0
  305. data/vendor/assets/javascripts/canjs/can.mootools.js +3462 -0
  306. data/vendor/assets/javascripts/canjs/can.mootools.min.js +63 -0
  307. data/vendor/assets/javascripts/canjs/can.observe.attributes.js +293 -0
  308. data/vendor/assets/javascripts/canjs/can.observe.backup.js +368 -0
  309. data/vendor/assets/javascripts/canjs/can.observe.delegate.js +359 -0
  310. data/vendor/assets/javascripts/canjs/can.observe.setter.js +58 -0
  311. data/vendor/assets/javascripts/canjs/can.observe.validations.js +374 -0
  312. data/vendor/assets/javascripts/canjs/can.view.modifiers.js +292 -0
  313. data/vendor/assets/javascripts/canjs/can.yui.js +3530 -0
  314. data/vendor/assets/javascripts/canjs/can.yui.min.js +65 -0
  315. data/vendor/assets/javascripts/canjs/can.zepto.js +3426 -0
  316. data/vendor/assets/javascripts/canjs/can.zepto.min.js +62 -0
  317. data/vendor/assets/javascripts/twitter/bootstrap-affix.js +104 -0
  318. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +90 -0
  319. data/vendor/assets/javascripts/twitter/bootstrap-button.js +96 -0
  320. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +176 -0
  321. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +158 -0
  322. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +150 -0
  323. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +239 -0
  324. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +103 -0
  325. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +151 -0
  326. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +135 -0
  327. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +275 -0
  328. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +60 -0
  329. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +300 -0
  330. data/vendor/assets/javascripts/twitter/my/bootstrap-typeahead.js +311 -0
  331. data/vendor/assets/stylesheets/.gitkeep +0 -0
  332. metadata +470 -0
File without changes
@@ -0,0 +1,10 @@
1
+ = simple_form_for(@<%= singular_table_name %>) do |f|
2
+ = f.error_notification
3
+
4
+ .form-inputs
5
+ <%- attributes.each do |attribute| -%>
6
+ = f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
7
+ <%- end -%>
8
+
9
+ .form-actions
10
+ = f.button :submit
data/locals ADDED
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
Binary file
Binary file
Binary file
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,35 @@
1
+ #require 'rmails/version.rb'
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "rmails"
5
+ s.version = '0.1.1' #Rmails::VERSION
6
+ s.default_executable = "rmails"
7
+ s.license = 'MIT'
8
+
9
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
10
+ s.authors = ["Pavel Novotny"]
11
+ s.date = %q{2013-01-12}
12
+ s.description = %q{Setup for e-mail server and its admin application}
13
+ s.email = %q{fandisek@gmail.com}
14
+ s.homepage = %q{http://rubygems.org/gems/rmails}
15
+ s.rubygems_version = %q{1.6.2}
16
+ s.summary = %q{Autoinstall e-mail server and configure it with Ruby on Rails}
17
+ s.bindir = 'bin'
18
+
19
+ s.add_dependency 'bundler'
20
+ s.add_dependency 'hoe'
21
+ s.add_dependency 'open4'
22
+ s.add_dependency 'rails'
23
+ s.add_dependency 'devise'
24
+ s.add_dependency 'thin'
25
+
26
+ s.files = `git ls-files`.split("\n")
27
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
29
+ s.require_paths = ["lib"]
30
+
31
+ #s.post_install do
32
+ # `sudo ln -s \`which rake\` /usr/local/bin/`
33
+ #end
34
+ end
35
+
@@ -0,0 +1,576 @@
1
+ #!/usr/bin/perl
2
+ eval 'exec perl -S $0 "$@"'
3
+ if 0;
4
+
5
+ =pod
6
+
7
+ =head1 NAME
8
+
9
+ prepflog.pl - Pre-processor for pflogsumm
10
+
11
+ =head1 SYNOPSIS
12
+
13
+ prepflog.pl [-d <today|yesterday>][--syslog_name=string]
14
+ [file1 [filen]]
15
+
16
+ prepflog.pl -[help|version]
17
+
18
+ If no file(s) specified, reads from stdin. Output is to stdout.
19
+
20
+ =head1 DESCRIPTION
21
+
22
+ Utility to filter out postfix log lines due to re-injection
23
+ into postfix of messages from a content filter or antivirus
24
+ scanner.
25
+
26
+ Reads from input and writes to output intercepting and
27
+ disregarding lines which are related to the second
28
+ passage of messages through postfix.
29
+
30
+ The output is suitable to pass to pflogsumm and should avoid
31
+ pflogsumm's double counting of these messages.
32
+
33
+ As with pflogsumm itself, only postfix lines are processed.
34
+ All other log lines are not passed on to the output.
35
+ A non standard syslog name can be handled via the
36
+ syslog_name parameter. Also log lines may be filtered by
37
+ today or yesterday's date.
38
+
39
+ =head1 OPTIONS
40
+
41
+ -d today extract log lines just for today
42
+
43
+ -d yesterday extract log lines just for yesterday
44
+
45
+ -help Emit short usage message and bail out.
46
+
47
+ --syslog_name=name
48
+
49
+ Set syslog_name to look for for Postfix log entries.
50
+
51
+ By default, prepflog looks for entries in logfiles
52
+ with a syslog name of "postfix," the default.
53
+ If you've set a non-default "syslog_name" parameter
54
+ in your Postfix configuration, use this option to
55
+ tell prepflog what that is.
56
+
57
+ -version Print program name and version and bail out.
58
+
59
+ =head1 EXAMPLES
60
+
61
+ Typical use of this pre-processor would be:
62
+
63
+ prepflog.pl -d yesterday /var/log/mail | pflogsumm.pl
64
+
65
+ Any other options can be specified to pflogsumm as normal.
66
+ The -d flag can however be omitted from pflogsumm if already
67
+ specified with prepflog.pl. It will do no harm if left.
68
+ If --syslog_name is used with prepflog.pl it must be specified
69
+ again with pflogsumm.
70
+
71
+ Processing of log files should be carried out just before
72
+ rotating them. Even so it is still possible to miss messages
73
+ unless processing considers all log files for a particular
74
+ day. A script that may be helpful for this is (which
75
+ considers that logfiles are compressed when rotated):
76
+
77
+ #!/bin/sh
78
+ LASTLOG=`ls -t /var/log/mail*.gz | head -n 1`
79
+ /bin/zcat $LASTLOG | /bin/cat - /var/log/mail | \
80
+ /usr/local/bin/prepflog.pl -d yesterday | \
81
+ /usr/local/bin/pflogsumm
82
+
83
+ =head1 CAVEATS
84
+
85
+ The current release is a beta version, which has
86
+ undergone internal testing. In particular it has not
87
+ been tested on a highly loaded server or a large
88
+ corpus of mail log examples
89
+
90
+ As always, use a program in a test environment until
91
+ you are comfortable about putting it into a production
92
+ environment.
93
+
94
+ =head1 BUGS
95
+
96
+ None known, but needs more testing.
97
+
98
+ =head1 NOTES
99
+
100
+ Compatible with postfix 2.3 or later and pflogsumm 1.1.3
101
+
102
+ =head1 SEE ALSO
103
+
104
+ pflogsumm(1)
105
+
106
+ =head1 AUTHOR
107
+
108
+ John Fawcett
109
+
110
+ This script has been adapted from the pflogsumm
111
+ written by Jim Seymour. Whole sections of pflogsumm
112
+ code have been imported here. The reason for this
113
+ is that having taken into account the way pflogsumm
114
+ works, it should be easier to integrate in the
115
+ future, if indeed that step is found to be a useful one.
116
+
117
+ Any feedback is welcome: john@gufonero.com
118
+
119
+ The script is currently available at:
120
+ http://www.gufonero.com/postfix/
121
+
122
+ =head1 COPYRIGHT AND LICENSE
123
+
124
+ Copyright (c) 2004 John Fawcett
125
+
126
+ The parts of the code derived from pflogsumm are
127
+ copyrighted by Jim Seymour.
128
+
129
+ This program is free software; you can redistribute it and/or
130
+ modify it under the terms of the GNU General Public License
131
+ as published by the Free Software Foundation; either version 2
132
+ of the License, or (at your option) any later version.
133
+
134
+ This program is distributed in the hope that it will be useful,
135
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
136
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
137
+ GNU General Public License for more details.
138
+
139
+ You may have received a copy of the GNU General Public License
140
+ along with this program; if not, write to the Free Software
141
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
142
+ USA.
143
+
144
+ An on-line copy of the GNU General Public License can be found
145
+ http://www.fsf.org/copyleft/gpl.html.
146
+
147
+ =cut
148
+
149
+ # Taken from pflogsumm
150
+ use strict;
151
+ use locale;
152
+ use Getopt::Long;
153
+ eval { require Date::Calc };
154
+ my $hasDateCalc = $@ ? 0 : 1;
155
+
156
+ my $release = "0.4";
157
+ my $debug = 0;
158
+
159
+ use vars qw(
160
+ $progName
161
+ $usageMsg
162
+ %opts
163
+ @monthNames %monthNums $thisYr $thisMon
164
+ );
165
+
166
+ # Constants used throughout pflogsumm
167
+ @monthNames = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
168
+ %monthNums = qw(
169
+ Jan 0 Feb 1 Mar 2 Apr 3 May 4 Jun 5
170
+ Jul 6 Aug 7 Sep 8 Oct 9 Nov 10 Dec 11);
171
+ ($thisMon, $thisYr) = (localtime(time()))[4,5];
172
+ $thisYr += 1900;
173
+
174
+
175
+ my ( $cmd, $qid,
176
+ $dateStr,
177
+ $msgMonStr, $msgMon, $msgDay, $msgTimeStr, $msgHr, $msgMin, $msgSec,
178
+ $msgYr);
179
+
180
+ $progName = "prepflog.pl";
181
+ $usageMsg =
182
+ "usage: $progName [-d <today|yesterday>] [--syslog_name=name] [file1 [filen]]
183
+
184
+ $progName -[version|help]";
185
+
186
+
187
+ GetOptions(
188
+ "d=s" => \$opts{'d'},
189
+ "help" => \$opts{'help'},
190
+ "syslog_name=s" => \$opts{'syslogName'},
191
+ "version" => \$opts{'version'},
192
+ ) || die "$usageMsg\n";
193
+ # internally: 0 == none, undefined == -1 == all
194
+ my $syslogName = $opts{'syslogName'}? $opts{'syslogName'} : "postfix";
195
+
196
+ if(defined($opts{'help'})) {
197
+ print "$usageMsg\n";
198
+ exit 0;
199
+ }
200
+
201
+ if(defined($opts{'version'})) {
202
+ print "$progName $release\n";
203
+ exit 0;
204
+ }
205
+
206
+ if($hasDateCalc) {
207
+ # manually import the Date::Calc routine we want
208
+ #
209
+ # This looks stupid, but it's the only way to shut Perl up about
210
+ # "Date::Calc::Delta_DHMS" used only once" if -w is on. (No,
211
+ # $^W = 0 doesn't work in this context.)
212
+ *Delta_DHMS = *Date::Calc::Delta_DHMS;
213
+ *Delta_DHMS = *Date::Calc::Delta_DHMS;
214
+ }
215
+
216
+ $dateStr = get_datestr($opts{'d'}) if(defined($opts{'d'}));
217
+
218
+ ########################################################
219
+ # start of prepflog code section
220
+ ########################################################
221
+
222
+ # variables used by prepflog
223
+ my %block = (); # array of lines which will be blocked
224
+ my %held_connect = (); # array of smtpd connect lines which will be output or disregarded
225
+ my %held_client = (); # array of smtpd client lines which will be output or disregarded
226
+ my %held_lookup = (); # maps queue ids to process ids and hosts keys
227
+ my %seen = (); # array of message ids for seen messages
228
+ my $lookup; # temporary variable to hold keys for lookups
229
+ my @out_queue = (); # queue for passing log lines back to main loop
230
+
231
+ ########################################################
232
+ # end of prepflog code section
233
+ ########################################################
234
+
235
+ while(<>) {
236
+ next if(defined($dateStr) && ! /^$dateStr/o);
237
+ s/: \[ID \d+ [^\]]+\] /: /o; # lose "[ID nnnnnn some.thing]" stuff
238
+ my $logRmdr;
239
+
240
+ # "Traditional" timestamp format?
241
+ if((($msgMonStr, $msgDay, $msgHr, $msgMin, $msgSec, $logRmdr) =
242
+ /^(...) {1,2}(\d{1,2}) (\d{2}):(\d{2}):(\d{2}) \S+ (.+)$/o) == 6)
243
+ {
244
+ # Convert string to numeric value for later "month rollover" check
245
+ $msgMon = $monthNums{$msgMonStr};
246
+ } else {
247
+ # RFC 3339 timestamp format?
248
+ next unless((($msgYr, $msgMon, $msgDay, $msgHr, $msgMin, $msgSec, $logRmdr) =
249
+ /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:[\+\-](?:\d{2}):(?:\d{2})|Z) \S+ (.+)$/o) == 10);
250
+ # RFC 3339 months start at "1", we index from 0
251
+ --$msgMon;
252
+ }
253
+
254
+ unless((($cmd, $qid) = $logRmdr =~ m#^(?:postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
255
+ (($cmd, $qid) = $logRmdr =~ m#^((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
256
+ {
257
+ #print UNPROCD "$_";
258
+ next;
259
+ }
260
+ chomp;
261
+
262
+
263
+
264
+ ########################################################
265
+ # start of prepflog code section
266
+ ########################################################
267
+
268
+ # Each log line is filtered through the preprocess routine.
269
+ # The task of preprocess is to decide whether to output a line. It may:
270
+ # 1. output the line immediately
271
+ # 2. disregard the line immediately
272
+ # 3. reserve judgement until some future line has been processed.
273
+ # 4. In this case, in response to some future log line, preprocess may:
274
+ # a. output the held line(s) and the future log line
275
+ # b. disregard the held line(s) and the future log line
276
+ #
277
+ # The preprocess routine may return:
278
+ # - nothing (cases 2, 3, 4b) in which case processing continues with the next log line.
279
+ # - one or more lines (cases 1, 4a). If preprocess will return multiple lines
280
+ # then the first line is returned on the first call.
281
+ # Any further lines are returned by calling preprocess with an empty input $_.
282
+ # When the preprocess returns nothing (ie preprocessing of a particular log
283
+ # line is finished), processing continues with the next log line.
284
+
285
+ while ( $_ = preprocess($logRmdr) )
286
+ {
287
+ print "$_\n";
288
+ $_ = "";
289
+ }
290
+ }
291
+ exit 0;
292
+
293
+ # preprocess checks if it was called with non-empty input $_
294
+ # in which case it processes $_ via getnext() which may
295
+ # add lines to the queue.
296
+ # If called with empty input the next line from the queue is
297
+ # returned.
298
+
299
+ sub preprocess
300
+ {
301
+ my $logRmdr = pop(@_);
302
+ if ($_ ne "")
303
+ {
304
+ getnext($logRmdr);
305
+ }
306
+ return shift(@out_queue);
307
+ }
308
+
309
+ # getnext contains the logic which decides which lines
310
+ # can be output, which can be blocked and which have
311
+ # to be held for future decision.
312
+
313
+ sub getnext
314
+ {
315
+ my $logRmdr = pop(@_);
316
+ if ($debug) { print "processing <".$logRmdr.">\n"; }
317
+ if( $cmd eq "qmgr" )
318
+ {
319
+
320
+ # If qmgr line has been blocked, disregard this log line
321
+ # (Key for the block array is qmgr:qid)
322
+ $lookup = "qmgr:".$qid;
323
+ if (is_blocked())
324
+ {
325
+ # If qmgr 'removed' line, free up space in the block array
326
+ # since there are no more qmgr lines for this qid
327
+ if( $logRmdr =~ /: removed/o )
328
+ {
329
+ remove_block();
330
+ }
331
+ return;
332
+ }
333
+ else
334
+ {
335
+ # qmgr line was not blocked so add to output queue
336
+ push (@out_queue, $_);
337
+ return;
338
+ }
339
+ }
340
+ if( $cmd eq "smtpd" )
341
+ {
342
+ if( $logRmdr =~ /\/smtpd\[(\d+)\]: disconnect from (.+)/o )
343
+ {
344
+ # If smtpd disconnect line has been blocked, disregard log line
345
+ # (Key in the block array is smtpd:pid:host)
346
+ # Free up space in the blocked array since we will not see any more
347
+ # smtpd lines for this message
348
+ $lookup = "smtpd:".$1 .":".$2;
349
+ if ( is_blocked())
350
+ {
351
+ remove_block();
352
+ return;
353
+ }
354
+
355
+ }
356
+ # If this is an smtpd reject/warning/hold/discard for previously held rows,
357
+ # add the held rows to the output queue followed by the current line
358
+ # (Key for the held array is qid)
359
+ if ( $logRmdr =~ /\/smtpd\[\d+\]: (.*): (reject(?:_warning)?|hold|discard): /o)
360
+ {
361
+ $lookup=$1;
362
+ output_held();
363
+ push (@out_queue, $_);
364
+ return;
365
+ }
366
+ # If this is an smtpd connect line then hold the line
367
+ # (Key for the held_connect array is pid:host)
368
+ if ($logRmdr =~ /\/smtpd\[(\d+)\]: connect from (.+)/o)
369
+ {
370
+ $lookup= $1.":".$2;
371
+ hold_connect();
372
+ return;
373
+ }
374
+ # If this is an smtpd client line then hold the line
375
+ # (Key for the held_client array is $qid)
376
+ # The value of pid:host will be stored to cross reference
377
+ # later to the smtpd connect line which is stored by pid:host
378
+
379
+ if ($logRmdr =~ /\/smtpd\[(\d+)\]: (.*): client=(.+?)(?:,|$)/o)
380
+ {
381
+ $lookup= $1.":".$3;
382
+ $qid= $2;
383
+ hold_client();
384
+ return;
385
+ }
386
+ }
387
+ # If this is smtp line giving final disposal of message
388
+ # (such as smtp,local,lmtp,pipe) and if it is blocked
389
+ # disregard this log line.
390
+ # (Key for the block array is deliver:qid)
391
+
392
+ if ($logRmdr =~ /\[\d+\]: (.*): to=<[^>]*>, (?:orig_to=<[^>]*>, )?relay=[^,]+, delay=[^,]+, (?:delays=[^,]+, )?(?:dsn=\d+\.\d+\.\d+, )?status=\S+.*$/o )
393
+ {
394
+ if ($debug) { print "final disposal\n"; }
395
+ $lookup="deliver:".$1;
396
+ if( is_blocked() )
397
+ {
398
+ return;
399
+ }
400
+ }
401
+ # Cleanup line links msg id to qid. If the msg id has already been seen
402
+ # held lines for this qid are disregarded. Otherwise they are added
403
+ # to output queue.
404
+ # (Key for the seen array is msg id)
405
+ if ( $cmd eq "cleanup" )
406
+ {
407
+ if ($logRmdr =~ /\/cleanup\[\d+\]: (.*): message-id=\s?<?(.*)>?/o )
408
+ {
409
+ $lookup = $2;
410
+ if ( is_seen())
411
+ {
412
+ # msg id has been seen already
413
+ # add a block on future qmgr lines for this message
414
+ # Key is qmgr:qid
415
+ $lookup = "qmgr:".$1;
416
+ add_block();
417
+ # add a block on future smtpd disconnect for this message
418
+ # Key is the same one used to hold smtpd connect line
419
+ $lookup= $1;
420
+ $lookup = "smtpd:".get_held_lookup();
421
+ add_block();
422
+ # add a block on future final disposal of message lines (such as
423
+ # smtp,local,lmtp,pipe etc).
424
+ # Key is deliver:qid
425
+ $lookup = "deliver:".$1;
426
+ add_block();
427
+ # The held lines can be deleted
428
+ # Key is qid
429
+ $lookup= $1;
430
+ remove_held();
431
+ # msg id must be removed from seen array to be able to
432
+ # handle multiple recipients or representation of rejected
433
+ # messages
434
+ # Key is msg id
435
+ $lookup = $2;
436
+ remove_seen();
437
+ return;
438
+ }
439
+ else
440
+ {
441
+ # msg id has not been seen so add held lines to output queue.
442
+ # Key is qid
443
+ $lookup=$1;
444
+ output_held();
445
+ remove_held();
446
+ # add current line to output queue
447
+ push (@out_queue, $_);
448
+ # add msg id to seen array
449
+ $lookup = $2;
450
+ add_seen();
451
+ return;
452
+ }
453
+ }
454
+ }
455
+ # default case, just add line to output queue
456
+ push (@out_queue, $_);
457
+ return;
458
+ }
459
+
460
+ ########################################################
461
+ # auxiliary routines for prepflog
462
+ ########################################################
463
+
464
+ # these were so simple, that they could have been left
465
+ # in the main body of the code, but I preferred
466
+ # extracting them to help readability in the main body
467
+
468
+ # add block
469
+ sub add_block
470
+ {
471
+ $block{$lookup}=1;
472
+ }
473
+
474
+ # check if blocked
475
+ sub is_blocked
476
+ {
477
+ return $block{$lookup};
478
+ }
479
+
480
+ # remove block
481
+ sub remove_block
482
+ {
483
+ delete $block{$lookup};
484
+ }
485
+
486
+ # hold the smtpd connect line
487
+ # Key is pid:host
488
+ sub hold_connect
489
+ {
490
+ $held_connect{$lookup} = $_;
491
+ }
492
+
493
+ # hold the smtpd client line
494
+ # Key is qid
495
+ # Cross reference stored to key of held
496
+ # smtpd connect line
497
+ sub hold_client
498
+ {
499
+ $held_lookup{$qid} = $lookup;
500
+ $held_client{$qid} = $_;
501
+ }
502
+
503
+ # lookup key to held_connect line
504
+ # Key for the lookup is qid.
505
+ sub get_held_lookup
506
+ {
507
+ return $held_lookup{$lookup};
508
+ }
509
+
510
+ # output held lines.
511
+ # Key is qid
512
+ sub output_held
513
+ {
514
+ # output smtpd connect
515
+ if( $held_connect{$held_lookup{$lookup}} )
516
+ {
517
+ push (@out_queue, $held_connect{$held_lookup{$lookup}});
518
+ }
519
+ # ouput smtpd client
520
+ if( $held_client{$lookup} )
521
+ {
522
+ push (@out_queue, $held_client{$lookup});
523
+ }
524
+ }
525
+
526
+ # remove held lines
527
+ # Key is qid
528
+ sub remove_held
529
+ {
530
+ delete $held_connect{$held_lookup{$lookup}};
531
+ delete $held_lookup{$lookup};
532
+ delete $held_client{$lookup};
533
+ }
534
+
535
+ # add msg id to those seen
536
+ sub add_seen
537
+ {
538
+ $seen{$lookup}=1;;
539
+ }
540
+
541
+ # check if msg id seen
542
+ sub is_seen
543
+ {
544
+ return $seen{$lookup};
545
+ }
546
+
547
+ # remove msg id from those seen
548
+ sub remove_seen
549
+ {
550
+ delete $seen{$lookup};
551
+ }
552
+
553
+
554
+ ########################################################
555
+ # end of prepflog code section
556
+ ########################################################
557
+
558
+ # Taken from pflogsumm
559
+ # return a date string to match in log
560
+ sub get_datestr {
561
+ my $dateOpt = $_[0];
562
+
563
+ my $time = time();
564
+
565
+ if($dateOpt eq "yesterday") {
566
+ # Back up to yesterday
567
+ $time -= ((localtime($time))[2] + 2) * 3600;
568
+ } elsif($dateOpt ne "today") {
569
+ die "$usageMsg\n";
570
+ }
571
+ my ($t_mday, $t_mon) = (localtime($time))[3,4];
572
+
573
+ return sprintf("%s %2d", $monthNames[$t_mon], $t_mday);
574
+ }
575
+
576
+