Repository: postalserver/postal Branch: main Commit: d532922ff7f5 Files: 525 Total size: 1.2 MB Directory structure: gitextract_spx0x18a/ ├── .dockerignore ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── config.yml │ └── workflows/ │ ├── ci.yml │ └── close.yml ├── .gitignore ├── .release-please-manifest.json ├── .rubocop.yml ├── .ruby-version ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── Gemfile ├── MIT-LICENCE ├── Procfile.dev ├── README.md ├── Rakefile ├── SECURITY.md ├── app/ │ ├── assets/ │ │ ├── config/ │ │ │ └── manifest.js │ │ ├── images/ │ │ │ └── .keep │ │ ├── javascripts/ │ │ │ └── application/ │ │ │ ├── application.coffee │ │ │ ├── elements/ │ │ │ │ ├── ajax.coffee │ │ │ │ ├── mail_graph.coffee │ │ │ │ ├── remembering.coffee │ │ │ │ └── searchable.coffee │ │ │ └── vendor/ │ │ │ ├── chartist.js │ │ │ └── jquery.multibox.js │ │ └── stylesheets/ │ │ └── application/ │ │ ├── application.scss │ │ ├── components/ │ │ │ ├── _admin_stats.scss │ │ │ ├── _button_set.scss │ │ │ ├── _checkbox_list.scss │ │ │ ├── _credential_list.scss │ │ │ ├── _danger_zone.scss │ │ │ ├── _data_table.scss │ │ │ ├── _delivery_list.scss │ │ │ ├── _domain_list.scss │ │ │ ├── _endpoint_list.scss │ │ │ ├── _error_explanation.scss │ │ │ ├── _field_set.scss │ │ │ ├── _flash_display.scss │ │ │ ├── _flash_message.scss │ │ │ ├── _footer.scss │ │ │ ├── _grid.scss │ │ │ ├── _headers_list.scss │ │ │ ├── _inlineError.scss │ │ │ ├── _invoice_list.scss │ │ │ ├── _ip_list.scss │ │ │ ├── _ip_pool_rule_list.scss │ │ │ ├── _large_list.scss │ │ │ ├── _limit.scss │ │ │ ├── _login_form.scss │ │ │ ├── _mail_graph.scss │ │ │ ├── _message_activity.scss │ │ │ ├── _message_header.scss │ │ │ ├── _message_list.scss │ │ │ ├── _message_properties_page.scss │ │ │ ├── _message_search.scss │ │ │ ├── _multibox.scss │ │ │ ├── _nav_bar.scss │ │ │ ├── _new_message_type.scss │ │ │ ├── _no_data.scss │ │ │ ├── _page_content.scss │ │ │ ├── _page_header.scss │ │ │ ├── _pagination.scss │ │ │ ├── _rentention_limits.scss │ │ │ ├── _route_list.scss │ │ │ ├── _route_name_input.scss │ │ │ ├── _server_header.scss │ │ │ ├── _sidebar.scss │ │ │ ├── _sidebar_server_list.scss │ │ │ ├── _simple_pagination.scss │ │ │ ├── _site_content.scss │ │ │ ├── _site_header.scss │ │ │ ├── _spam_check_list.scss │ │ │ ├── _starter_credit_pack.scss │ │ │ ├── _sub_page_box.scss │ │ │ ├── _suppression_list.scss │ │ │ ├── _suspension_box.scss │ │ │ ├── _title_with_links.scss │ │ │ ├── _user_list.scss │ │ │ ├── _webhook_list.scss │ │ │ └── _webhook_request_list.scss │ │ ├── elements/ │ │ │ ├── _bar.scss │ │ │ ├── _button.scss │ │ │ ├── _code_block.scss │ │ │ ├── _input.scss │ │ │ ├── _label.scss │ │ │ ├── _misc.scss │ │ │ └── _spam_range.scss │ │ ├── global/ │ │ │ ├── _fonts.scss │ │ │ ├── _mixins.scss │ │ │ ├── _reset.scss │ │ │ ├── _utility.scss │ │ │ └── _variables.scss │ │ └── vendor/ │ │ └── _chartist.scss │ ├── controllers/ │ │ ├── address_endpoints_controller.rb │ │ ├── application_controller.rb │ │ ├── concerns/ │ │ │ ├── .keep │ │ │ └── within_organization.rb │ │ ├── credentials_controller.rb │ │ ├── domains_controller.rb │ │ ├── help_controller.rb │ │ ├── http_endpoints_controller.rb │ │ ├── ip_addresses_controller.rb │ │ ├── ip_pool_rules_controller.rb │ │ ├── ip_pools_controller.rb │ │ ├── legacy_api/ │ │ │ ├── base_controller.rb │ │ │ ├── messages_controller.rb │ │ │ └── send_controller.rb │ │ ├── messages_controller.rb │ │ ├── organization_ip_pools_controller.rb │ │ ├── organizations_controller.rb │ │ ├── routes_controller.rb │ │ ├── servers_controller.rb │ │ ├── sessions_controller.rb │ │ ├── smtp_endpoints_controller.rb │ │ ├── track_domains_controller.rb │ │ ├── user_controller.rb │ │ ├── users_controller.rb │ │ ├── webhooks_controller.rb │ │ └── well_known_controller.rb │ ├── helpers/ │ │ └── application_helper.rb │ ├── lib/ │ │ ├── dkim_header.rb │ │ ├── dns_resolver.rb │ │ ├── message_dequeuer/ │ │ │ ├── base.rb │ │ │ ├── incoming_message_processor.rb │ │ │ ├── initial_processor.rb │ │ │ ├── outgoing_message_processor.rb │ │ │ ├── single_message_processor.rb │ │ │ └── state.rb │ │ ├── message_dequeuer.rb │ │ ├── query_string.rb │ │ ├── received_header.rb │ │ ├── reply_separator.rb │ │ ├── smtp_client/ │ │ │ ├── endpoint.rb │ │ │ ├── server.rb │ │ │ └── ssl_modes.rb │ │ ├── smtp_server/ │ │ │ ├── client.rb │ │ │ └── server.rb │ │ └── worker/ │ │ ├── jobs/ │ │ │ ├── base_job.rb │ │ │ ├── process_queued_messages_job.rb │ │ │ └── process_webhook_requests_job.rb │ │ └── process.rb │ ├── mailers/ │ │ ├── app_mailer.rb │ │ └── application_mailer.rb │ ├── models/ │ │ ├── additional_route_endpoint.rb │ │ ├── address_endpoint.rb │ │ ├── application_record.rb │ │ ├── bounce_message.rb │ │ ├── concerns/ │ │ │ ├── .keep │ │ │ ├── has_authentication.rb │ │ │ ├── has_dns_checks.rb │ │ │ ├── has_locking.rb │ │ │ ├── has_message.rb │ │ │ ├── has_soft_destroy.rb │ │ │ └── has_uuid.rb │ │ ├── credential.rb │ │ ├── domain.rb │ │ ├── http_endpoint.rb │ │ ├── incoming_message_prototype.rb │ │ ├── ip_address.rb │ │ ├── ip_pool.rb │ │ ├── ip_pool_rule.rb │ │ ├── organization.rb │ │ ├── organization_ip_pool.rb │ │ ├── organization_user.rb │ │ ├── outgoing_message_prototype.rb │ │ ├── queued_message.rb │ │ ├── route.rb │ │ ├── scheduled_task.rb │ │ ├── server.rb │ │ ├── smtp_endpoint.rb │ │ ├── statistic.rb │ │ ├── track_domain.rb │ │ ├── user.rb │ │ ├── user_invite.rb │ │ ├── webhook.rb │ │ ├── webhook_event.rb │ │ ├── webhook_request.rb │ │ └── worker_role.rb │ ├── scheduled_tasks/ │ │ ├── action_deletions_scheduled_task.rb │ │ ├── application_scheduled_task.rb │ │ ├── check_all_dns_scheduled_task.rb │ │ ├── cleanup_authie_sessions_scheduled_task.rb │ │ ├── expire_held_messages_scheduled_task.rb │ │ ├── process_message_retention_scheduled_task.rb │ │ ├── prune_suppression_lists_scheduled_task.rb │ │ ├── prune_webhook_requests_scheduled_task.rb │ │ ├── send_notifications_scheduled_task.rb │ │ └── tidy_queued_messages_task.rb │ ├── senders/ │ │ ├── base_sender.rb │ │ ├── http_sender.rb │ │ ├── send_result.rb │ │ └── smtp_sender.rb │ ├── services/ │ │ └── webhook_delivery_service.rb │ ├── util/ │ │ ├── has_prometheus_metrics.rb │ │ ├── health_server.rb │ │ └── user_creator.rb │ └── views/ │ ├── address_endpoints/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── app_mailer/ │ │ ├── password_reset.text.erb │ │ ├── server_send_limit_approaching.text.erb │ │ ├── server_send_limit_exceeded.text.erb │ │ ├── server_suspended.text.erb │ │ ├── test_message.text.erb │ │ └── verify_domain.text.erb │ ├── credentials/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── domains/ │ │ ├── _nav.html.haml │ │ ├── _verify_with_dns.html.haml │ │ ├── _verify_with_email.html.haml │ │ ├── index.html.haml │ │ ├── new.html.haml │ │ ├── setup.html.haml │ │ └── verify.html.haml │ ├── help/ │ │ ├── _header.html.haml │ │ ├── incoming.html.haml │ │ └── outgoing.html.haml │ ├── http_endpoints/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── ip_addresses/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ └── new.html.haml │ ├── ip_pool_rules/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── ip_pools/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── layouts/ │ │ ├── application.html.haml │ │ └── sub.html.haml │ ├── messages/ │ │ ├── _deliveries.html.haml │ │ ├── _header.html.haml │ │ ├── _index.html.haml │ │ ├── _list.html.haml │ │ ├── _message_header.html.haml │ │ ├── _search.html.haml │ │ ├── activity.html.haml │ │ ├── attachments.html.haml │ │ ├── headers.html.haml │ │ ├── held.html.haml │ │ ├── html.html.haml │ │ ├── incoming.html.haml │ │ ├── new.html.haml │ │ ├── outgoing.html.haml │ │ ├── plain.html.haml │ │ ├── show.html.haml │ │ ├── spam_checks.html.haml │ │ └── suppressions.html.haml │ ├── organization_ip_pools/ │ │ ├── _nav.html.haml │ │ └── index.html.haml │ ├── organizations/ │ │ ├── _nav.html.haml │ │ ├── delete.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── routes/ │ │ ├── _form.html.haml │ │ ├── _header.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── servers/ │ │ ├── _form.html.haml │ │ ├── _header.html.haml │ │ ├── _settings_header.html.haml │ │ ├── _sidebar.html.haml │ │ ├── advanced.html.haml │ │ ├── delete.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ ├── limits.html.haml │ │ ├── new.html.haml │ │ ├── queue.html.haml │ │ ├── retention.html.haml │ │ ├── show.html.haml │ │ └── spam.html.haml │ ├── sessions/ │ │ ├── begin_password_reset.html.haml │ │ ├── finish_password_reset.html.haml │ │ └── new.html.haml │ ├── shared/ │ │ └── _message_db_pagination.html.haml │ ├── smtp_endpoints/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── track_domains/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ ├── user/ │ │ └── edit.html.haml │ ├── users/ │ │ ├── _form.html.haml │ │ ├── edit.html.haml │ │ ├── index.html.haml │ │ └── new.html.haml │ └── webhooks/ │ ├── _form.html.haml │ ├── _header.html.haml │ ├── edit.html.haml │ ├── history.html.haml │ ├── history_request.html.haml │ ├── index.html.haml │ └── new.html.haml ├── bin/ │ ├── bundle │ ├── dev │ ├── postal │ ├── rails │ ├── rake │ ├── rspec │ ├── setup │ └── update ├── config/ │ ├── application.rb │ ├── boot.rb │ ├── database.yml │ ├── environment.rb │ ├── environments/ │ │ ├── development.rb │ │ ├── production.rb │ │ └── test.rb │ ├── examples/ │ │ ├── development.yml │ │ └── test.yml │ ├── initializers/ │ │ ├── _wait_for_migrations.rb │ │ ├── application_controller_renderer.rb │ │ ├── assets.rb │ │ ├── backtrace_silencers.rb │ │ ├── content_security_policy.rb │ │ ├── cookies_serializer.rb │ │ ├── filter_parameter_logging.rb │ │ ├── inflections.rb │ │ ├── logging.rb │ │ ├── mail_extensions.rb │ │ ├── mime_types.rb │ │ ├── new_framework_defaults_7_0.rb │ │ ├── omniauth.rb │ │ ├── permissions_policy.rb │ │ ├── postal.rb │ │ ├── record_key_for_dom.rb │ │ ├── secret_key.rb │ │ ├── secure_headers.rb │ │ ├── sentry.rb │ │ ├── session_store.rb │ │ ├── smtp.rb │ │ ├── smtp_extensions.rb │ │ ├── trusted_proxies.rb │ │ ├── wrap_parameters.rb │ │ └── zeitwerk.rb │ ├── locales/ │ │ └── en.yml │ ├── puma.rb │ └── routes.rb ├── config.ru ├── db/ │ ├── migrate/ │ │ ├── 20161003195209_create_authie_sessions.authie.rb │ │ ├── 20161003195210_add_indexes_to_authie_sessions.authie.rb │ │ ├── 20161003195211_add_parent_id_to_authie_sessions.authie.rb │ │ ├── 20161003195212_add_two_factor_auth_fields_to_authie.authie.rb │ │ ├── 20170418200606_initial_schema.rb │ │ ├── 20170421195414_add_token_hashes_to_authie_sessions.authie.rb │ │ ├── 20170421195415_add_index_to_token_hashes_on_authie_sessions.authie.rb │ │ ├── 20170428153353_remove_type_from_ip_pools.rb │ │ ├── 20180216114344_add_host_to_authie_sessions.authie.rb │ │ ├── 20200717083943_add_uuid_to_credentials.rb │ │ ├── 20210727210551_add_priority_to_ip_addresses.rb │ │ ├── 20240206173036_add_privacy_mode_to_servers.rb │ │ ├── 20240213165450_create_worker_roles.rb │ │ ├── 20240213171830_create_scheduled_tasks.rb │ │ ├── 20240214132253_add_lock_fields_to_webhook_requests.rb │ │ ├── 20240223141500_add_two_factor_required_to_sessions.authie.rb │ │ ├── 20240223141501_add_countries_to_authie_sessions.authie.rb │ │ └── 20240311205229_add_oidc_fields_to_user.rb │ ├── schema.rb │ └── seeds.rb ├── doc/ │ └── config/ │ ├── configuration.md │ ├── environment-variables.md │ └── yaml.yml ├── docker/ │ ├── ci-config/ │ │ └── signing.key │ └── wait-for.sh ├── docker-compose.yml ├── lib/ │ ├── assets/ │ │ └── .keep │ ├── migration_waiter.rb │ ├── postal/ │ │ ├── config.rb │ │ ├── config_schema.rb │ │ ├── error.rb │ │ ├── helm_config_exporter.rb │ │ ├── helpers.rb │ │ ├── http.rb │ │ ├── legacy_config_source.rb │ │ ├── message_db/ │ │ │ ├── click.rb │ │ │ ├── connection_pool.rb │ │ │ ├── database.rb │ │ │ ├── delivery.rb │ │ │ ├── live_stats.rb │ │ │ ├── load.rb │ │ │ ├── message.rb │ │ │ ├── migration.rb │ │ │ ├── migrations/ │ │ │ │ ├── 01_create_migrations.rb │ │ │ │ ├── 02_create_messages.rb │ │ │ │ ├── 03_create_deliveries.rb │ │ │ │ ├── 04_create_live_stats.rb │ │ │ │ ├── 05_create_raw_message_sizes.rb │ │ │ │ ├── 06_create_clicks.rb │ │ │ │ ├── 07_create_loads.rb │ │ │ │ ├── 08_create_stats.rb │ │ │ │ ├── 09_create_links.rb │ │ │ │ ├── 10_create_spam_checks.rb │ │ │ │ ├── 11_add_time_to_deliveries.rb │ │ │ │ ├── 12_add_hold_expiry.rb │ │ │ │ ├── 13_add_index_to_message_status.rb │ │ │ │ ├── 14_create_suppressions.rb │ │ │ │ ├── 15_create_webhook_requests.rb │ │ │ │ ├── 16_add_url_and_hook_to_webhooks.rb │ │ │ │ ├── 17_add_replaced_link_count_to_messages.rb │ │ │ │ ├── 18_add_endpoints_to_messages.rb │ │ │ │ ├── 19_convert_database_to_utf8mb4.rb │ │ │ │ └── 20_increase_links_url_size.rb │ │ │ ├── provisioner.rb │ │ │ ├── statistics.rb │ │ │ ├── suppression_list.rb │ │ │ └── webhooks.rb │ │ ├── message_inspection.rb │ │ ├── message_inspector.rb │ │ ├── message_inspectors/ │ │ │ ├── clamav.rb │ │ │ ├── rspamd.rb │ │ │ └── spam_assassin.rb │ │ ├── message_parser.rb │ │ ├── signer.rb │ │ ├── spam_check.rb │ │ └── yaml_config_exporter.rb │ ├── postal.rb │ ├── tasks/ │ │ ├── .keep │ │ ├── auto_annotate_models.rake │ │ └── postal.rake │ └── tracking_middleware.rb ├── log/ │ └── .keep ├── public/ │ ├── 404.html │ ├── 422.html │ ├── 500.html │ └── robots.txt ├── release-please-config.json ├── resource/ │ └── postfix-bounce.msg ├── script/ │ ├── default_dkim_record.rb │ ├── generate_tls_certificate.rb │ ├── insert-bounce.rb │ ├── make_user.rb │ ├── queue_size.rb │ ├── send_html_email.rb │ ├── smtp_server.rb │ ├── test_app_smtp.rb │ ├── version.rb │ └── worker.rb ├── spec/ │ ├── apis/ │ │ └── legacy_api/ │ │ ├── messages/ │ │ │ ├── deliveries_spec.rb │ │ │ └── message_spec.rb │ │ └── send/ │ │ ├── message_spec.rb │ │ └── raw_spec.rb │ ├── examples/ │ │ ├── dkim_signing/ │ │ │ ├── email1.msg │ │ │ └── email2.msg │ │ └── full_legacy_config_file.yml │ ├── factories/ │ │ ├── address_endpoint_factory.rb │ │ ├── credential_factory.rb │ │ ├── domain_factory.rb │ │ ├── http_endpoint_factory.rb │ │ ├── ip_address_factory.rb │ │ ├── ip_pool_factory.rb │ │ ├── ip_pool_rule_factory.rb │ │ ├── organization_factory.rb │ │ ├── queued_message_factory.rb │ │ ├── route_factory.rb │ │ ├── server_factory.rb │ │ ├── smtp_endpoint_factory.rb │ │ ├── track_domain_factory.rb │ │ ├── user_factory.rb │ │ ├── webhook_factory.rb │ │ ├── webhook_request_factory.rb │ │ └── worker_role_factory.rb │ ├── helpers/ │ │ ├── general_helpers.rb │ │ ├── message_db_mocking.rb │ │ ├── message_factory.rb │ │ └── test_logger.rb │ ├── lib/ │ │ ├── dkim_header_spec.rb │ │ ├── dns_resolver_spec.rb │ │ ├── message_dequeuer/ │ │ │ ├── base_spec.rb │ │ │ ├── incoming_message_processor_spec.rb │ │ │ ├── initial_message_processor_spec.rb │ │ │ ├── outgoing_message_processor_spec.rb │ │ │ ├── single_message_processor_spec.rb │ │ │ └── state_spec.rb │ │ ├── message_dequeuer_spec.rb │ │ ├── postal/ │ │ │ ├── legacy_config_source_spec.rb │ │ │ ├── message_db/ │ │ │ │ ├── connection_pool_spec.rb │ │ │ │ └── database_spec.rb │ │ │ ├── message_parser_spec.rb │ │ │ └── signer_spec.rb │ │ ├── postal_spec.rb │ │ ├── query_string_spec.rb │ │ ├── received_header_spec.rb │ │ ├── smtp_client/ │ │ │ ├── endpoint_spec.rb │ │ │ └── server_spec.rb │ │ ├── smtp_server/ │ │ │ ├── client/ │ │ │ │ ├── auth_spec.rb │ │ │ │ ├── data_spec.rb │ │ │ │ ├── finished_spec.rb │ │ │ │ ├── helo_spec.rb │ │ │ │ ├── mail_from_spec.rb │ │ │ │ ├── proxy_spec.rb │ │ │ │ └── rcpt_to_spec.rb │ │ │ └── client_spec.rb │ │ └── worker/ │ │ └── jobs/ │ │ ├── process_queued_messages_job_spec.rb │ │ └── process_webhook_requests_job_spec.rb │ ├── models/ │ │ ├── domain_spec.rb │ │ ├── organization_spec.rb │ │ ├── outgoing_message_prototype_spec.rb │ │ ├── queued_message_spec.rb │ │ ├── server_spec.rb │ │ ├── user/ │ │ │ ├── authentication_spec.rb │ │ │ └── oidc_spec.rb │ │ ├── user_spec.rb │ │ └── worker_role_spec.rb │ ├── rails_helper.rb │ ├── scheduled_tasks/ │ │ └── tidy_queued_messages_task_spec.rb │ ├── senders/ │ │ └── smtp_sender_spec.rb │ ├── services/ │ │ └── webhook_delivery_service_spec.rb │ └── spec_helper.rb ├── tmp/ │ └── .keep └── vendor/ └── assets/ ├── javascripts/ │ └── .keep └── stylesheets/ └── .keep ================================================ FILE CONTENTS ================================================ ================================================ FILE: .dockerignore ================================================ .byebug_history .cache .git/* .github/* .vscode/* .yardoc/* /.bundle config/postal/* doc/* Dockerfile log/* node_modules Procfile.local Procfile* public/assets storage/* tmp/* vendor/bundle vendor/bundle ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: 🐛 Bug report about: Create a report to help us improve Postal and fix issues. title: '' labels: '' assignees: '' --- ## Describe the bug A clear and concise description of what the bug is. ## To Reproduce 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error ## Expected behaviour A clear and concise description of what you expected to happen. ## Screenshots If applicable, add screenshots to help explain your problem. ## Environment details - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] - Type [e.g. desktop, mobile etc...] ## Additional information/context Add any other context about the problem here. It is particularily useful to include log extracts (after removing private information). ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: 💻 Installation help url: https://github.com/postalhq/postal/discussions/new?category=Installation-help about: If you have questions about running Postal on your servers, use GitHub Discussions. - name: 🙏 Help with using Postal url: https://github.com/postalserver/postal/discussions/new?category=Help-with-using-Postal about: If you need help using Postal's features, use GitHub Discussions. - name: 🦊 Feature Suggestions url: https://github.com/postalhq/postal/discussions/new?category=Feature-Suggestions about: Suggest a new feature that should be added to Postal. ================================================ FILE: .github/workflows/ci.yml ================================================ --- name: CI on: [push] jobs: release-please: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' outputs: release_created: ${{ steps.release-please.outputs.release_created }} tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0 version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0 all: ${{ toJSON(steps.release-please.outputs) }} steps: - uses: google-github-actions/release-please-action@v3 id: release-please with: command: manifest build: name: CI Image Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: docker/setup-buildx-action@v2 - uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/build-push-action@v4 with: push: true tags: ghcr.io/postalserver/postal:ci-${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max target: ci platforms: linux/amd64 test: name: Test Suite runs-on: ubuntu-latest needs: build steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - run: docker compose pull env: POSTAL_IMAGE: ghcr.io/postalserver/postal:ci-${{ github.sha }} - run: docker compose run postal sh -c 'bundle exec rspec' env: POSTAL_IMAGE: ghcr.io/postalserver/postal:ci-${{ github.sha }} release-branch: name: Release (branch) runs-on: ubuntu-latest needs: [build] if: >- startsWith(github.ref, 'refs/heads/') && startsWith(github.ref, 'refs/heads/release-please-') != true && startsWith(github.ref, 'refs/heads/dependabot/') != true steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v2 - uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - id: info run: | IMAGE=ghcr.io/postalserver/postal REF="${GITHUB_REF#refs/heads/}" if [ -z "$REF" ]; then exit 1; fi VER="$(git describe --tags 2>/dev/null)" echo "version=${VER}" >> "$GITHUB_OUTPUT" echo "branch=${REF}" >> "$GITHUB_OUTPUT" echo 'tags<> "$GITHUB_OUTPUT" if [[ "$REF" == "main" ]]; then echo "${IMAGE}:latest" >> "$GITHUB_OUTPUT" else echo "${IMAGE}:branch-${REF}" >> "$GITHUB_OUTPUT" fi echo 'EOF' >> "$GITHUB_OUTPUT" - uses: docker/build-push-action@v4 with: push: true tags: ${{ steps.info.outputs.tags }} cache-from: type=gha cache-to: type=gha,mode=max target: full platforms: linux/amd64 build-args: | VERSION=${{ steps.info.outputs.version }} BRANCH=${{ steps.info.outputs.branch }} publish-image: name: Publish Image runs-on: ubuntu-latest needs: [build, test, release-please] if: ${{ needs.release-please.outputs.release_created }} steps: - uses: actions/checkout@v4 - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v2 - uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/build-push-action@v4 with: push: true tags: | ghcr.io/postalserver/postal:stable ghcr.io/postalserver/postal:${{ needs.release-please.outputs.version }} cache-from: type=gha cache-to: type=gha,mode=max target: full build-args: | VERSION=${{ needs.release-please.outputs.version }} platforms: linux/amd64 ================================================ FILE: .github/workflows/close.yml ================================================ name: 'Close stale issues and PRs' on: schedule: - cron: '30 1 * * *' workflow_dispatch: permissions: issues: write pull-requests: write jobs: stale: runs-on: ubuntu-latest steps: - uses: actions/stale@v9 with: stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' stale-issue-label: stale stale-pr-label: stale days-before-issue-stale: 30 days-before-pr-stale: 45 days-before-issue-close: 5 days-before-pr-close: 10 exempt-all-assignees: true exempt-all-milestones: true exempt-issue-labels: bug,enhancement,docs,install,feature ================================================ FILE: .gitignore ================================================ # See https://help.github.com/articles/ignoring-files for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. /.bundle # Ignore all logfiles and tempfiles. /log/* /tmp/* !/log/.keep !/tmp/.keep # Ignore Byebug command history file. .byebug_history config/postal.yml config/smtp.cert config/smtp.key config/signing.key config/postal/**/* spec/config/postal.local.yml public/assets vendor/bundle Procfile.local VERSION BRANCH .rubocop-https* .env* ================================================ FILE: .release-please-manifest.json ================================================ { ".": "3.3.5" } ================================================ FILE: .rubocop.yml ================================================ AllCops: TargetRubyVersion: 3.0 NewCops: enable Exclude: - "bin/*" - "db/schema.rb" # Fixes missing gem exception when running Rubocop on GitHub Actions. - "vendor/bundle/**/*" - lib/tasks/auto_annotate_models.rake # Always use double quotes Style/StringLiterals: EnforcedStyle: double_quotes AutoCorrect: true # We prefer arrays of symbols to look like an array of symbols. # For example: [:one, :two, :three] as opposed to %i[one two three] Style/SymbolArray: EnforcedStyle: brackets # There should always be empty lines inside a class. For example # # class MyExample # # def some_method # end # # end Layout/EmptyLinesAroundClassBody: EnforcedStyle: empty_lines # We want to keep attr_* definitions separated on their own lines, rather than # all of them collapsed into a single attr_* call. The collapsed/grouped variant # is harder to read, and harder to see what's been changed in diffs. Style/AccessorGrouping: Enabled: false # Blocks are slightly different to classes, in these cases there should # not be new lines around the contents of the block. # # proc do # # Do something # end Layout/EmptyLinesAroundBlockBody: EnforcedStyle: no_empty_lines # Modules are the same as classes unless they're being used for namespacing # purposes in which case there should not be new lines. Layout/EmptyLinesAroundModuleBody: EnforcedStyle: empty_lines_except_namespace # Space is required following -> when writing a lambda: # # somethign = -> (var) { block } Layout/SpaceInLambdaLiteral: EnforcedStyle: require_space Layout/FirstHashElementIndentation: Enabled: false # We don't mind setting assignments in conditions so this has been disabled to # allow `if something = something_else` without worrying about brackets. Lint/AssignmentInCondition: Enabled: false # Top level documentation is quite rare... Style/Documentation: Enabled: false # We want to allow inner slashes in a regexp to be used when using /xxx/ form. Style/RegexpLiteral: AllowInnerSlashes: true # Blocks of if statements are perfectly fine and usually more readable than # putting everything onto a single line just because we can. Style/IfUnlessModifier: Enabled: false # We prefer assignments to happen within the condition rather than setting a # variable to the result of a condition. Style/ConditionalAssignment: EnforcedStyle: assign_inside_condition IncludeTernaryExpressions: false # Empty methods should not be compacted onto a single line Style/EmptyMethod: EnforcedStyle: expanded # As above, just flag them. Lint/UnusedBlockArgument: AutoCorrect: false # While we don't want to make heavy use of get_ or set_ methods we do often need # to use these when we want to refer to actually getting or setting something # (usually from another API). Naming/AccessorMethodName: Enabled: false # If we want a boolean called :true, we should be allowed that. These are likely # not mistakes. Lint/BooleanSymbol: Enabled: false # Using block.map(&:upcase) is not always the neatest way to show something. For # example if you have a block that just calls one thing, you don't want it # collapsed. # # action do |user| # user.delete # end # # This should be action(&:delete) because it is not clear what is actually # happening without the context of knowing what the inner variable should be # called. Style/SymbolProc: Enabled: false # Allow a maxmium of 5 arguments and don't include keyword arguments Metrics/ParameterLists: Max: 5 CountKeywordArgs: false # This cop checks for chaining of a block after another block that spans multiple lines. Style/MultilineBlockChain: Exclude: - "spec/**/*.rb" Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: consistent_comma Metrics/AbcSize: Enabled: false Style/FrozenStringLiteralComment: Enabled: true SafeAutoCorrect: true Naming/PredicateName: Enabled: false Layout/LineLength: # We want to reduce this back down to 120 but there are a fair number of offences # of this which need addressing individually and carefully. Max: 200 Metrics/PerceivedComplexity: # As above, we want to enable this again in the future, but for now we'll just # disable it entirely. Enabled: false Metrics/CyclomaticComplexity: # As above. Enabled: false Metrics/MethodLength: # As above. Enabled: false Metrics/BlockNesting: # As above. Enabled: false Style/StringConcatenation: Enabled: false Metrics/BlockLength: Enabled: false Metrics/ClassLength: Enabled: false Metrics/ModuleLength: Enabled: false Lint/UnusedMethodArgument: Enabled: false Style/SpecialGlobalVars: Enabled: false ================================================ FILE: .ruby-version ================================================ 3.4.6 ================================================ FILE: CHANGELOG.md ================================================ # CHANGELOG This file contains all the latest changes and updates to Postal. ## [3.3.5](https://github.com/postalserver/postal/compare/3.3.4...3.3.5) (2026-02-01) ### Bug Fixes * **deliveries:** escape delivery details to prevent HTML injection ([11419f9](https://github.com/postalserver/postal/commit/11419f99140e13688a9613cab3ee03f8d3cbae45)) * **health_server:** use rackup handler instead of rack handler ([7c47422](https://github.com/postalserver/postal/commit/7c47422c865e738c4d6af0fed1cca4405288341f)) * oidc scopes are invalid when concatenated ([#3332](https://github.com/postalserver/postal/issues/3332)) ([9c5f96a](https://github.com/postalserver/postal/commit/9c5f96ae90cf06dcd5db776806865752f667bd95)) * typo in process logging ([#3212](https://github.com/postalserver/postal/issues/3212)) ([b7e5232](https://github.com/postalserver/postal/commit/b7e5232e077b3c9b7a999dcb6676fba0ec61458e)) * typo in the credentials page ([fd3c7cc](https://github.com/postalserver/postal/commit/fd3c7ccdf6dc4ee0a76c9523cbd735159e4b8000)) * update url for v2 config ([#3225](https://github.com/postalserver/postal/issues/3225)) ([e00098b](https://github.com/postalserver/postal/commit/e00098b8003cf37f2708f536871b3ade377aed2d)) ### Documentation * **process.rb:** add help about time unit used by metric ([#3339](https://github.com/postalserver/postal/issues/3339)) ([f5325c4](https://github.com/postalserver/postal/commit/f5325c49ff1152ad53eaaec98717ad3412d379ae)) ### Miscellaneous Chores * **deps:** upgrade puma, net-imap and other deps ([c03c44b](https://github.com/postalserver/postal/commit/c03c44b442a29aa9881c1e1aae60bead9776a6b6)) * **dockerfile:** reduce container size ([86de372](https://github.com/postalserver/postal/commit/86de372382bd62bdd5d1372254f8817b0360bd56)) * remove version from docker-compose.yml ([c78000c](https://github.com/postalserver/postal/commit/c78000ca8f2998aa04648f465060768db6467de6)) * upgrade resolv to 0.6.2 ([d00d978](https://github.com/postalserver/postal/commit/d00d978872a96369544303d08f6a9d11cdf56b62)) * upgrade to rails 7.1 and ruby 3.4 ([#3457](https://github.com/postalserver/postal/issues/3457)) ([ab6d443](https://github.com/postalserver/postal/commit/ab6d4430baa33a05f1aa66e776cc2a5bcaa0ede8)) * upgrade uri gem to 1.0.3 ([f193b8e](https://github.com/postalserver/postal/commit/f193b8e77fc096382ab7aaa6a2c29641b4cb12df)) ## [3.3.4](https://github.com/postalserver/postal/compare/3.3.3...3.3.4) (2024-06-20) ### Bug Fixes * fix `postal version` command ([4fa88ac](https://github.com/postalserver/postal/commit/4fa88acea0dececd0eae485506a2ad8268fbea59)) * fix issue running message pruning task ([3a33e53](https://github.com/postalserver/postal/commit/3a33e53d843584757bb00898746aa059d7616db4)) * raise NotImplementedError when no call method on a scheduled task ([2b0919c](https://github.com/postalserver/postal/commit/2b0919c1454eabea93db96f50ecbd8e36bb89f1f)) ## [3.3.3](https://github.com/postalserver/postal/compare/3.3.2...3.3.3) (2024-04-18) ### Bug Fixes * **legacy-api:** allow _expansions to be provided as true to return all expansions ([39f704c](https://github.com/postalserver/postal/commit/39f704c256fc3e71a1dc009acc77796a1efffead)), closes [#2932](https://github.com/postalserver/postal/issues/2932) ## [3.3.2](https://github.com/postalserver/postal/compare/3.3.1...3.3.2) (2024-03-21) ### Code Refactoring * **versioning:** improve how current version and branch is determined and set ([07c6b31](https://github.com/postalserver/postal/commit/07c6b317f2b9dc04b6a8c88df1e6aa9e54597504)) ## [3.3.1](https://github.com/postalserver/postal/compare/3.3.0...3.3.1) (2024-03-21) ### Bug Fixes * **smtp-sender:** ensure relays without a host are excluded ([3a56ec8](https://github.com/postalserver/postal/commit/3a56ec8a74950e0162d98f1af5f58a67a82d6455)) * **smtp-sender:** fixes `SMTPSender.smtp_relays` ([b3264b9](https://github.com/postalserver/postal/commit/b3264b942776e254d3c351c94c435d172a514e18)) ### Miscellaneous Chores * **container:** add the branch name to the container ([bee5098](https://github.com/postalserver/postal/commit/bee509832edc151d97fe5bfc48c4973452873fc8)) * **github-actions:** don't generate commit- tags ([d65bbe0](https://github.com/postalserver/postal/commit/d65bbe0579037c5df962a18134bc007f5159d7e5)) * **github-actions:** don't run for dependabot or release-please PRs and fetch whole repo ([adaf2b0](https://github.com/postalserver/postal/commit/adaf2b07502e9ed91290873ad8465051c6fd814f)) * **github-actions:** include a version string on branch-*/latest images ([64bc7dc](https://github.com/postalserver/postal/commit/64bc7dcf7c0a8e006ab6eb6e8b4a52ad5e7e6528)) * **ui:** display branch in footer if present ([1823617](https://github.com/postalserver/postal/commit/18236171ebc398c157f2e61b15c7df9f91205284)) ### Code Refactoring * remove moonrope but maintain legacy API actions ([#2889](https://github.com/postalserver/postal/issues/2889)) ([4d9654d](https://github.com/postalserver/postal/commit/4d9654dac47d59c760be96388d0421de74d3e6ac)) ## [3.3.0](https://github.com/postalserver/postal/compare/3.2.2...3.3.0) (2024-03-18) ### Features * **prometheus:** add `postal_message_queue_latency` metric ([ee8d829](https://github.com/postalserver/postal/commit/ee8d829a854f91e476167869cafe35c2d37bb314)) * **worker:** allow number of threads to be configured ([7e2accc](https://github.com/postalserver/postal/commit/7e2acccd1ebd80750a3ebdb96cb5c36b5263cc24)) * **worker:** scale connection pool with worker threads ([ea542a0](https://github.com/postalserver/postal/commit/ea542a0694b3465b04fd3ebc439837df414deb1e)) ### Bug Fixes * **message-dequeuer:** ability to disable batching ([4fcb9e9](https://github.com/postalserver/postal/commit/4fcb9e9a2e34be5aa4bdf13f0529f40e564b72b4)) ### Miscellaneous Chores * **config-docs:** update docs for latest oidc defaults ([364eba6](https://github.com/postalserver/postal/commit/364eba6c5fce2f08a36489f42856ad5024a2062c)) * **config-docs:** update proxy protocol to mention v1 ([45dd8aa](https://github.com/postalserver/postal/commit/45dd8aaac56f15481cb7bf9081401cb28dc1e707)) ## [3.2.2](https://github.com/postalserver/postal/compare/3.2.1...3.2.2) (2024-03-14) ### Bug Fixes * don't use authentication on org & server deletion ([be45652](https://github.com/postalserver/postal/commit/be456523dd3aacb5c3eb45c9261da97ebffe603c)) * **smtp-server:** fixes proxy protocol ([9240612](https://github.com/postalserver/postal/commit/92406129cfcf1a06499a6f5aa18c73f1d6195793)) ### Miscellaneous Chores * allow config location message to be suppressed ([f760cdb](https://github.com/postalserver/postal/commit/f760cdb5a1d53e9c30ee495d129cbf12603a3cbd)) * hide further config messages ([1c67f72](https://github.com/postalserver/postal/commit/1c67f72209c93404d7024ce3d15f6f54f2d707c4)) * suppress config location on default-dkim-record ([aa76aae](https://github.com/postalserver/postal/commit/aa76aae2322af41af1bd60cfe1d69a11ac76324e)) ### Tests * add tests for the legacy API ([3d208d6](https://github.com/postalserver/postal/commit/3d208d632f4fc8a4adbfdb2bf4b377271eae6692)) ## [3.2.1](https://github.com/postalserver/postal/compare/3.2.0...3.2.1) (2024-03-13) ### Bug Fixes * fixes `postal default-dkim-record` ([58dddeb](https://github.com/postalserver/postal/commit/58dddebeb81dc6fab945d2b10a91588eddc471c2)) ## [3.2.0](https://github.com/postalserver/postal/compare/3.1.1...3.2.0) (2024-03-13) ### Features * add sha256 signatures to outgoing http requests ([#2874](https://github.com/postalserver/postal/issues/2874)) ([96d7365](https://github.com/postalserver/postal/commit/96d73653d7cb4dde1fbe74ccb3596147ef8cd9ed)) * automatically remove queued messages with stale locks ([#2872](https://github.com/postalserver/postal/issues/2872)) ([d84152e](https://github.com/postalserver/postal/commit/d84152eb5df6f963426d6ba8d02d39b3c146c8a5)) * openid connect support ([#2873](https://github.com/postalserver/postal/issues/2873)) ([5ed94f6](https://github.com/postalserver/postal/commit/5ed94f6f855735aa00544b2574dfb9e65d559a38)) ### Bug Fixes * **smtp-server:** add additional information to cram-md5 log entries ([9982bb8](https://github.com/postalserver/postal/commit/9982bb8c31ee4885d188666e2e8afdc218528df7)) ### Styles * **rubocop:** Style/TrailingCommaInArrayLiteral ([4e13577](https://github.com/postalserver/postal/commit/4e13577891dc827244abc6bf6d9ab4ee45860556)) ### Miscellaneous Chores * regenerate config docs ([5d8213a](https://github.com/postalserver/postal/commit/5d8213a98735f07fdf1700c7d01597654f41dbd0)) ## [3.1.1](https://github.com/postalserver/postal/compare/3.1.0...3.1.1) (2024-03-08) ### Bug Fixes * don't override paths in dockerfile ([9399e32](https://github.com/postalserver/postal/commit/9399e3223467cdacd010e70b58ad6093e128213d)) ### Tests * **smtp-sender:** add more tests for AUTH LOGIN ([22dcd49](https://github.com/postalserver/postal/commit/22dcd4901f188915cf4b3c758c6f2fc637a4e1e3)) ## [3.1.0](https://github.com/postalserver/postal/compare/3.0.2...3.1.0) (2024-03-06) ### Features * configurable trusted proxies for web requests ([3785c99](https://github.com/postalserver/postal/commit/3785c998513c634d225b489ccb43e926ce3f270a)) ### Bug Fixes * **message-dequeuer:** ensure SMTP endpoints are sent to SMTP sender appropriately ([e2d642c](https://github.com/postalserver/postal/commit/e2d642c0cbf443550886d90abc3a6edf3e4bc4fc)), closes [#2853](https://github.com/postalserver/postal/issues/2853) * **smtp-server:** listen on all interfaces by default ([d1e5b68](https://github.com/postalserver/postal/commit/d1e5b68200ea4b9710cc8714afb3271bad1f4f66)), closes [#2852](https://github.com/postalserver/postal/issues/2852) * **smtp-server:** remove ::ffff: from the start of ipv4 addresses ([0dc7359](https://github.com/postalserver/postal/commit/0dc7359431001c9ef1222913f8d1344093397596)) * **smtp-server:** reset ansi sequence after logging ([9bf6152](https://github.com/postalserver/postal/commit/9bf6152060ffb8b611b66818c1d1ac7c929b7ffe)) * **ui:** fixes typo on queue page ([33513a7](https://github.com/postalserver/postal/commit/33513a77c0df24d832ab7ed5237d68e2b1bde887)) * **web-server:** allow for trusted proxies not be set ([4e1deb2](https://github.com/postalserver/postal/commit/4e1deb2d2aeb61d9dddb3729916411c94e73c1c6)) ### Styles * **rubocop:** use _ when not using a variable in helm config exporter ([2c20ba6](https://github.com/postalserver/postal/commit/2c20ba65f64ccb0f8174e3f523dedb3806478782)) ## [3.0.2](https://github.com/postalserver/postal/compare/3.0.1...3.0.2) (2024-03-05) ### Bug Fixes * default to listening on all addresses when using legacy config ([48f6494](https://github.com/postalserver/postal/commit/48f6494240eb0374d5f865425b362e6f306b2653)) ### Miscellaneous Chores * removing arm64 support until we can get a reasonable build pipeline sorted ([e8e44f5](https://github.com/postalserver/postal/commit/e8e44f54b09426c8a04e466bc037851a0833d124)) ## [3.0.1](https://github.com/postalserver/postal/compare/3.0.0...3.0.1) (2024-03-05) ### Bug Fixes * fix issue with sending mail when smtp relays are configured ([6dd6e29](https://github.com/postalserver/postal/commit/6dd6e29929c70eaa8b9d3b33c184996b0b6abb82)) ## [3.0.0](https://github.com/postalserver/postal/compare/2.3.2...3.0.0) (2024-03-04) This version of Postal introduces a number of larger changes. Please be sure to follow the [upgrade guide](https://docs.postalserver.io/getting-started/upgrade-to-v3) when upgrading to Postal v3. Highlights include: * Removal of RabbitMQ dependency * Removal of `cron` and `requeuer` processes * Improved logging * Improved configuration * Adds prometheus metric exporters for workers and SMTP servers * Only accepted RFC-compliant end-of-DATA sequences (to avoid SMTP smuggling) ### Features * add health server and prometheus metrics to worker ([a2eb70e](https://github.com/postalserver/postal/commit/a2eb70e)) * add option to delay starting processes until all migrations are run ([1c5ff5a](https://github.com/postalserver/postal/commit/1c5ff5a)) * add prometheus metrics to smtp server ([2e7b36c](https://github.com/postalserver/postal/commit/2e7b36c)) * add prometheus metrics to worker ([bea7450](https://github.com/postalserver/postal/commit/bea7450)) * more consistent logging ([044058d](https://github.com/postalserver/postal/commit/044058d)) * new background work process ([dc8e895](https://github.com/postalserver/postal/commit/dc8e895)) * new configuration system (and schema) (#2819) ([0163ac3](https://github.com/postalserver/postal/commit/0163ac3)) * only accept RFC-compliant End-of-DATA sequence ([0140dc4](https://github.com/postalserver/postal/commit/0140dc4)) * add "postal:update" task ([b35eea6](https://github.com/postalserver/postal/commit/b35eea6338f1888bfac2ed377d0a412680483e90)) * add helm env var config exporter ([8938988](https://github.com/postalserver/postal/commit/893898835dcd9684ae3401549389b173a3feb1fb)) * include list-unsubscribe-post header in dkim signatures ([e1bae60](https://github.com/postalserver/postal/commit/e1bae60768c4cf151d5a6a141985c78753dce02d)), closes [#2789](https://github.com/postalserver/postal/issues/2789) [#2788](https://github.com/postalserver/postal/issues/2788) * support for additional SMTP client options ([0daa667](https://github.com/postalserver/postal/commit/0daa667b55fd9b948da643d37ec438e341809369)) ### Bug Fixes * fixes potential issue if machine hostname cannot be determined ([0fcf778](https://github.com/postalserver/postal/commit/0fcf778)) * raise an error if MX lookup times out during sending ([fadca88](https://github.com/postalserver/postal/commit/fadca88)), closes [#2833](https://github.com/postalserver/postal/issues/2833) * set correct component in health server log lines ([a7a9a18](https://github.com/postalserver/postal/commit/a7a9a18)) * translate unicode domain names to Punycode for compatibility with DNS (#2823) ([be0df7b](https://github.com/postalserver/postal/commit/be0df7b)) * remove user email verification ([e05f0b3](https://github.com/postalserver/postal/commit/e05f0b3616da8b962b763c48a2139882fd88047a)) * unescape in URLs which are stored for tracking ([1da1182](https://github.com/postalserver/postal/commit/1da1182c23e9673d8f109d8ed29e80983cdccabf)), closes [#2568](https://github.com/postalserver/postal/issues/2568) [#907](https://github.com/postalserver/postal/issues/907) [#115](https://github.com/postalserver/postal/issues/115) * update wording about tracking domain cnames ([0d3eccb](https://github.com/postalserver/postal/commit/0d3eccb368630b4fd21bd858a7829ec00c35f153)), closes [#2808](https://github.com/postalserver/postal/issues/2808) ### Documentation * add message_db.encoding to config docs ([0c1f925](https://github.com/postalserver/postal/commit/0c1f925)) * add new repo readme welcome image ([afa1726](https://github.com/postalserver/postal/commit/afa1726)) * add quick contributing instructions ([8d21adc](https://github.com/postalserver/postal/commit/8d21adc)) * update SECURITY policy ([cfc1c9b](https://github.com/postalserver/postal/commit/cfc1c9b)) * update docs for how IP address allocation works ([07eb152](https://github.com/postalserver/postal/commit/07eb152)), closes [#2209](https://github.com/postalserver/postal/issues/2209) ### Miscellaneous Chores * upgrade bundler to 2.5.6 ([1ae8ef6](https://github.com/postalserver/postal/commit/1ae8ef6)) * upgrade rails to 7.0 and other dependencies ([ecd09a2](https://github.com/postalserver/postal/commit/ecd09a2)) * upgrade ruby to 3.2.2 and nodejs to 20.x ([72715fe](https://github.com/postalserver/postal/commit/72715fe)) ## [2.3.2](https://github.com/postalserver/postal/compare/2.3.1...2.3.2) (2024-03-01) ### Bug Fixes * truncate output and details in deliveries to 250 characters ([694240d](https://github.com/postalserver/postal/commit/694240ddcdef1df9b32888de8fb743d2dee86462)), closes [#2831](https://github.com/postalserver/postal/issues/2831) ## [2.3.1](https://github.com/postalserver/postal/compare/2.3.0...2.3.1) (2024-02-23) ### Bug Fixes * update raw headers after changing messages to during parsing ([2834e2c](https://github.com/postalserver/postal/commit/2834e2c37971db9b0b0498e38b382cf1f8ee26eb)), closes [#2816](https://github.com/postalserver/postal/issues/2816) ### Miscellaneous Chores * **github-actions:** add 'docs' label to exclude from staleness checks ([57b72fb](https://github.com/postalserver/postal/commit/57b72fb4b7f7fc934cfa23906de65b8f6d6d1978)) * **github-actions:** add action to close stale issues and PRs ([d90a456](https://github.com/postalserver/postal/commit/d90a456dfa661d87e820160d2045c73c765564d2)) * **github-actions:** allow stale action to be run on demand ([559b08d](https://github.com/postalserver/postal/commit/559b08ddd31ecd904fd09c1e2822161b853166b9)) ## [2.3.0](https://github.com/postalserver/postal/compare/2.2.2...2.3.0) (2024-02-13) ### Features * privacy mode ([15f9671](https://github.com/postalserver/postal/commit/15f9671b667cf369255aaa27ee4257267990095c)) * remove strip_received_headers config option ([ed2e62b](https://github.com/postalserver/postal/commit/ed2e62b94fe76d7aeca0ede98f11a1c4f94c5996)) ### Bug Fixes * add ruby platform to gemfile ([1fceef7](https://github.com/postalserver/postal/commit/1fceef7cea76352fd6166fb3f1e8d0ff8591078e)) * explicitly disable TLS & starttls for unknown SSL modes ([42ab5b3](https://github.com/postalserver/postal/commit/42ab5b3a6b21992c89f8479137699dc9090f0ccc)), closes [#2564](https://github.com/postalserver/postal/issues/2564) * fix bug with received header in SMTP server ([ba5bfbd](https://github.com/postalserver/postal/commit/ba5bfbd6a0af9ea33bedb2948822417bd1a3fbc5)) * retry mysql connections on message DB pool ([f9f7fb3](https://github.com/postalserver/postal/commit/f9f7fb30fee46b661b6dccde4362383ea591532b)) * use correct method for disconnecting smtp connections ([7c23994](https://github.com/postalserver/postal/commit/7c23994d243ec7d9a17ee053f8c3fa8de0a33097)) ### Styles * **rubocop:** disable complexity cops for now ([930cf39](https://github.com/postalserver/postal/commit/930cf39dba37401f90e293c938dee07daf3d9a31)) * **rubocop:** disable Style/SpecialGlobalVars ([be97f43](https://github.com/postalserver/postal/commit/be97f4330897f96085eb29ed7019b1a3e50af88e)) * **rubocop:** disable Style/StringConcatenation cop ([d508772](https://github.com/postalserver/postal/commit/d508772a40ef26e5c3a8304aa1f2b8c7985081bd)) * **rubocop:** Layout/* ([0e0aca0](https://github.com/postalserver/postal/commit/0e0aca06c90f6d2f4db1c4090a35c4537c76e13a)) * **rubocop:** Layout/EmptyLineAfterMagicComment ([0e4ed5c](https://github.com/postalserver/postal/commit/0e4ed5ca0393f9a56e1efa7ae377d2e4b876bfe1)) * **rubocop:** Layout/EmptyLines ([0cf35a8](https://github.com/postalserver/postal/commit/0cf35a83926d499a279775bcc32dd4ea79b7a8c9)) * **rubocop:** Layout/EmptyLinesAroundBlockBody ([cfd8d63](https://github.com/postalserver/postal/commit/cfd8d63321d1821aad7fa9d6b8462c3d551aca61)) * **rubocop:** Layout/LeadingCommentSpace ([59f299b](https://github.com/postalserver/postal/commit/59f299b704533488b74075beb8692397eb434aab)) * **rubocop:** Layout/LineLength ([e142d0d](https://github.com/postalserver/postal/commit/e142d0da5fbee19e6f9f1741ff9dee0a2d7dd169)) * **rubocop:** Layout/MultilineMethodCallBraceLayout ([a5d5ba5](https://github.com/postalserver/postal/commit/a5d5ba5326728413bb95456e92c854977d225a7f)) * **rubocop:** Lint/DuplicateBranch ([a1dc0f7](https://github.com/postalserver/postal/commit/a1dc0f77ac69937d7f30c9401608dfbe66987d45)) * **rubocop:** Lint/DuplicateMethods ([bab6346](https://github.com/postalserver/postal/commit/bab6346239e4f50bdd51101c45f3a0cd66f47096)) * **rubocop:** Lint/IneffectiveAccessModifier ([6ad56ee](https://github.com/postalserver/postal/commit/6ad56ee9c9e5bad19b065fcec3ada3280adbb1f4)) * **rubocop:** Lint/MissingSuper ([4674e63](https://github.com/postalserver/postal/commit/4674e63b5ff84307f5b772e870e88109af2daf52)) * **rubocop:** Lint/RedundantStringCoercion ([12a5ef3](https://github.com/postalserver/postal/commit/12a5ef3279bf6c1e5c38bf7e846de1d17bf98c09)) * **rubocop:** Lint/ShadowedException ([0966b44](https://github.com/postalserver/postal/commit/0966b44018bc1e2f131358635776fcc3b75ee8eb)) * **rubocop:** Lint/ShadowingOuterLocalVariable ([7119e86](https://github.com/postalserver/postal/commit/7119e8642dffeee7a27f90145073e45664ea58d3)) * **rubocop:** Lint/SuppressedException ([278ef08](https://github.com/postalserver/postal/commit/278ef0886ac53e6bed15793301dc69c95a37dbde)) * **rubocop:** Lint/UnderscorePrefixedVariableName ([ec7dcf4](https://github.com/postalserver/postal/commit/ec7dcf4f9a0bdb367a90f1a3b35336909ebc60d7)) * **rubocop:** Lint/UnusedBlockArgument ([ee94e4e](https://github.com/postalserver/postal/commit/ee94e4e1a013bbe8fbdd8ef94f15ed0fa20709ac)) * **rubocop:** Lint/UselessAssignment ([7590a46](https://github.com/postalserver/postal/commit/7590a462341bddd412e660db9546ba1909aea9d7)) * **rubocop:** Naming/FileName ([919a601](https://github.com/postalserver/postal/commit/919a60116c5d81ed787061ff4614da4f1e067d4e)) * **rubocop:** Naming/MemoizedInstanceVariableName ([9563f30](https://github.com/postalserver/postal/commit/9563f30c96fba12073e845319b8d79a542d88109)) * **rubocop:** relax method length and block nexting for now ([b0ac9ef](https://github.com/postalserver/postal/commit/b0ac9ef0b96ab78c2961f45b6e9f20f87a6f1d07)) * **rubocop:** remaining offences ([ec63666](https://github.com/postalserver/postal/commit/ec636661d5c4b9e8f48e6f263ffef834acb68b39)) * **rubocop:** Security/YAMLLoad ([389ea77](https://github.com/postalserver/postal/commit/389ea7705047bf8700836137514b2497af3c6c01)) * **rubocop:** Style/AndOr ([b9f3f31](https://github.com/postalserver/postal/commit/b9f3f313f8ec992917bad3a51f0481f89675e935)) * **rubocop:** Style/ClassAndModuleChildren ([e896f46](https://github.com/postalserver/postal/commit/e896f4689a8fc54979f0a6c2b7ce14746856bad6)) * **rubocop:** Style/For ([04a3483](https://github.com/postalserver/postal/commit/04a34831c74a3a44547f93100c35db650bc4eef6)) * **rubocop:** Style/FrozenStringLiteralComment ([6ab36c0](https://github.com/postalserver/postal/commit/6ab36c09c966eb9a8b8ada52155f74d2537977f2)) * **rubocop:** Style/GlobalStdStream ([75be690](https://github.com/postalserver/postal/commit/75be6907483ea25f828461eb790d3f6f46ca683b)) * **rubocop:** Style/GlobalVars ([157d114](https://github.com/postalserver/postal/commit/157d11457c520147807901b75b3ba22d29172f24)) * **rubocop:** Style/HashEachMethods ([c995027](https://github.com/postalserver/postal/commit/c995027ff53962ae49341372f75e2bf43ecde0d2)) * **rubocop:** Style/HashExcept ([83ac764](https://github.com/postalserver/postal/commit/83ac76451071f097e7197f77fc5ad16e9cf58593)) * **rubocop:** Style/IdenticalConditionalBranches ([6a58ecf](https://github.com/postalserver/postal/commit/6a58ecf605250b8fa891cb14fca0c0e0ce0d7eb9)) * **rubocop:** Style/MissingRespondToMissing ([ffcb707](https://github.com/postalserver/postal/commit/ffcb707247fe2a69905aa6e4dc668abeb9924611)) * **rubocop:** Style/MultilineBlockChain ([c6326a6](https://github.com/postalserver/postal/commit/c6326a6524e6d71d23bc2c256f3f9416c38b0846)) * **rubocop:** Style/MutableConstant ([129dffa](https://github.com/postalserver/postal/commit/129dffab9ed8726ca4066e7052adc699129de2d2)) * **rubocop:** Style/NumericPredicate ([c558f1c](https://github.com/postalserver/postal/commit/c558f1c69ce9498564161d8cef3fcb8213103498)) * **rubocop:** Style/PreferredHashMethods ([013b3ea](https://github.com/postalserver/postal/commit/013b3ea9315c14f24b08574d68e1688f33d78b8d)) * **rubocop:** Style/SafeNavigation ([00a02f2](https://github.com/postalserver/postal/commit/00a02f2655b6e3296ad0e7ea9b9872da936b56ed)) * **rubocop:** Style/SelectByRegexp ([9ce28a4](https://github.com/postalserver/postal/commit/9ce28a427fadf6fafd942e009792be4b5539d40d)) * **rubocop:** Style/StringLiterals ([b4cc812](https://github.com/postalserver/postal/commit/b4cc81264c85d5f0061e5b5121a30d7bdcabc189)) * **rubocop:** Style/WordArray ([bd85920](https://github.com/postalserver/postal/commit/bd8592056573d1c6933d753ed50bdf9a7466e761)) * **rubocop:** update rubocop rules ([6d4dea7](https://github.com/postalserver/postal/commit/6d4dea7f7f0145ff2b99cf2505bc70a3e5925256)) ### Miscellaneous Chores * annotate models ([6214892](https://github.com/postalserver/postal/commit/6214892710e21c2aa29a319d5809f7bdf0d50529)) * silence message DB migrations during provisioning ([c83601a](https://github.com/postalserver/postal/commit/c83601af69f35e338b1f7c10ef7994f74b96f8bf)) ### Code Refactoring * remove reloading on the smtp server ([c3c304e](https://github.com/postalserver/postal/commit/c3c304e98b3274433248792b6403acf63d7a513b)) ### Tests * add initial tests for Postal::SMTPServer::Client ([dece1d4](https://github.com/postalserver/postal/commit/dece1d487ac2fdce104700939a79a5579b60a0cb)) * FactoryBot.lint will lint all registered factories ([25d7d66](https://github.com/postalserver/postal/commit/25d7d66b4709fe5442d554097a6ef074aeb15f72)) * remove FACTORIES_EXCLUDED_FROM_LINT ([1cf665a](https://github.com/postalserver/postal/commit/1cf665a0cf61d1eae3d08bdadf6fccaab6413023)) ## [2.2.2](https://github.com/postalserver/postal/compare/2.2.1...2.2.2) (2024-02-06) ### Bug Fixes * adds new connection pool which will discard failed clients ([54306a9](https://github.com/postalserver/postal/commit/54306a974802c2e4d17e0980531e2d0dba08150a)), closes [#2780](https://github.com/postalserver/postal/issues/2780) * re-add reconnect: true to database ([7bc5230](https://github.com/postalserver/postal/commit/7bc5230cbaae58fb6f8512d1d1b0e6a2eb989b56)) * upgrade nokogiri ([f05c2e4](https://github.com/postalserver/postal/commit/f05c2e4503688e59a5ef513a5a1064d0ebbb5813)) ### Tests * rename database spec file ([b9edcf5](https://github.com/postalserver/postal/commit/b9edcf5b7dda7f4976a9d3f90668bbdacea57350)) ## [2.2.1](https://github.com/postalserver/postal/compare/2.2.0...2.2.1) (2024-02-03) ### Bug Fixes * fixes issue starting application in production mode ([4528a14](https://github.com/postalserver/postal/commit/4528a14d273c141e5719f19c3b08c00364b47638)) ### Code Refactoring * remove Postal.database_url ([96ba4b8](https://github.com/postalserver/postal/commit/96ba4b8f309cfcd1d605e5c7fc05507b21c78c6f)) ## [2.2.0](https://github.com/postalserver/postal/compare/2.1.6...2.2.0) (2024-02-01) ### Features * load signing key path from POSTAL_SIGNING_KEY_PATH ([4a46f69](https://github.com/postalserver/postal/commit/4a46f690de3010f1ae4d6c17739530a4eae35c09)) * support for configuring postal with environment variables ([854aa5e](https://github.com/postalserver/postal/commit/854aa5ebc87de692b4691d48759aefd6fae9d133)) ### Bug Fixes * don't use indifferent access for job params ([2bad645](https://github.com/postalserver/postal/commit/2bad645d980ad4b712a3c863b5350e4ee2895071)), closes [#2477](https://github.com/postalserver/postal/issues/2477) [#2714](https://github.com/postalserver/postal/issues/2714) [#2476](https://github.com/postalserver/postal/issues/2476) [#2500](https://github.com/postalserver/postal/issues/2500) * extract x-postal-tag before holding ([6b2bf90](https://github.com/postalserver/postal/commit/6b2bf9062d662ede14617c4995ffaacca023a3b1)), closes [#2684](https://github.com/postalserver/postal/issues/2684) * fixes error messages in web ui ([71f51db](https://github.com/postalserver/postal/commit/71f51db3c2515addaf8b280667555427d64796be)) * ignore message DB migrations in autoloader ([3fb40e4](https://github.com/postalserver/postal/commit/3fb40e4e247893b314e42affa4604a7a71a52c59)) * move tracking middleware before host authorization ([49cceaa](https://github.com/postalserver/postal/commit/49cceaa6ca862965448041279fc439ecba163ff8)), closes [#2415](https://github.com/postalserver/postal/issues/2415) * use utc timestamps when determining raw table names ([ce19bf7](https://github.com/postalserver/postal/commit/ce19bf7988d522bf46aabf68090751427e286ffc)) ### Miscellaneous Chores * add binstubs for bundle and rspec ([41f6cf4](https://github.com/postalserver/postal/commit/41f6cf4d909518526af55ecb3fcccfa8fb8e1da2)) * add script to send html emails to a local SMTP server ([8794a2f](https://github.com/postalserver/postal/commit/8794a2f44783658a075a6f3985079ae4743412b1)) ### Code Refactoring * remove explicit autoload ([0f9882f](https://github.com/postalserver/postal/commit/0f9882f13204124df630606b1b9e36787c9c4011)) * remove Postal::Job.perform method ([990b575](https://github.com/postalserver/postal/commit/990b575902c45bb1678cc95f53ef3166c4b7092e)) ## [2.1.6](https://github.com/postalserver/postal/compare/2.1.5...2.1.6) (2024-01-30) ### Miscellaneous Chores * **build:** fixes docker login action credentials ([8810856](https://github.com/postalserver/postal/commit/88108566f8ab33f1a4263a36a5c1ffc071645ac3)) * update release please to include more categories in changelog ([e156c21](https://github.com/postalserver/postal/commit/e156c21dee304de7d10c2958c493cce73c2d8fea)) ## [2.1.5](https://github.com/postalserver/postal/compare/2.1.4...2.1.5) (2024-01-30) ### Bug Fixes * duplicate string before modifying it to prevent frozen string errors ([f0a8aca](https://github.com/postalserver/postal/commit/f0a8aca6e10064fb16daefff9e22dcc20a831868)) * fixed typo (rfc number) ([2f62baa](https://github.com/postalserver/postal/commit/2f62baa238fc1102706ee4acf079b7a876b05283)) * fixes typo in on track domains page ([77bd77b](https://github.com/postalserver/postal/commit/77bd77b629fcbc44b8d27deb0d33a457b02309f2)) * mail view encoding issue [#2462](https://github.com/postalserver/postal/issues/2462) ([#2596](https://github.com/postalserver/postal/issues/2596)) ([59f4478](https://github.com/postalserver/postal/commit/59f44781973489817efb5b3435d95d25f44f90ce)) * match IPv4 mapped IPv6 addresses when searching for SMTP-IP credentials ([8b525d0](https://github.com/postalserver/postal/commit/8b525d0381a9e0113af808b9ec2eb47bf78ec60b)) ## 2.1.4 ### Bug Fixes - Move RubyVer functionality to Utilities module ([5998bf](https://github.com/postalserver/postal/commit/5998bf376a274df19f29877e7f68ea75f298c9f9)) ## 2.1.3 ### Features - Upgrade to Ruby 3.2.1 & Rails 6.1 ([957b78](https://github.com/postalserver/postal/commit/957b784658cda8c4c95cf1f2b65e05d99d23d427)) - Make resent-sender header optional ([c6fb8d](https://github.com/postalserver/postal/commit/c6fb8d223bdeaccdc9e8bdbd031fe3f325ac0677)) - Log CRAM-MD5 authentication failures ([9b1ed1](https://github.com/postalserver/postal/commit/9b1ed1e7e16a8f55a5bd7b7ce72195a08ca2968d)) - Always use multipart/alternative parts in generated emails ([d0db13](https://github.com/postalserver/postal/commit/d0db1345a2bf8f538b01b974e74391da6fffe2b1)) ### Bug Fixes - Use non-blocking function to negotiate TLS connections ([a7dd19](https://github.com/postalserver/postal/commit/a7dd19baac8300f4d8ee89d0050479e08fdf9176)) - Fix to newline conversion process ([9f4ef8](https://github.com/postalserver/postal/commit/9f4ef8f57a839c5529b4f00a36b832740386b4ed)) - Remove custom scrollbars ([b22f1b](https://github.com/postalserver/postal/commit/b22f1bdb2e2d66b096ca993d6a5f4f708274a4a2)) - Truncate 'output' field to avoid overflowing varchar(512) in database ([a188a1](https://github.com/postalserver/postal/commit/a188a161cbdcfd70158b09b53cef622842357c26)) - Fix link replacement in multipart messsages ([7ea00d](https://github.com/postalserver/postal/commit/7ea00dfa3bc3c7650cc2b134beacbff22101a913)) - Fix confusing error message when deleting IP pools ([cefc7d](https://github.com/postalserver/postal/commit/cefc7d17b82f610001859a8e323ee1dfde149ba5)) - Connect to correct IP rather than hostname suring SMTP delivery ([159509](https://github.com/postalserver/postal/commit/159509a3ed29ae33cba522b255904992922dcfdf)) - Change retry timings to avoid re-sending messages too early ([c8d27b](https://github.com/postalserver/postal/commit/c8d27b2963af122d6555abdf0742d2d2d6f11ce5)) ## 2.1.2 ### Features - support for AMQPS for rabbitmq connections ([9f0697](https://github.com/postalserver/postal/commit/9f0697f194209f5fae5e451ba8fb888413fe37fa)) ### Bug Fixes - retry connections without SSL when SSL issue is encountered during smtp sending ([0dc682](https://github.com/postalserver/postal/commit/0dc6824a8f0315ea42b08f7e6812b821b62489c9)) ## 2.1.1 ### Features - allow @ and % in webhook urls ([c60c69](https://github.com/postalserver/postal/commit/c60c69db1800775776da4c28c68001f230fe5888)) ### Bug Fixes - fixes broken styling on errors ([a0c87e](https://github.com/postalserver/postal/commit/a0c87e7bf16a19f06c13797e3329a4fed91370a1)) - use the Postal logger system for the rails log ([5b04fa](https://github.com/postalserver/postal/commit/5b04faca39c69757bd7d695b82984f8b4a41cac3)) ## 2.1.0 ### Features - support for configuring the default spam threshold values for new servers ([724325](https://github.com/postalserver/postal/commit/724325a1b97d61ef1e134240e4f70aaad39dbf98)) - support for using rspamd for spam filtering ([a1277b](https://github.com/postalserver/postal/commit/a1277baba56ea6d6b4da4bba87b00cd3dbf0305e)) ### Bug Fixes - **dkim:** fixes timing race condition when signing emails ([232b60](https://github.com/postalserver/postal/commit/232b605f5bb8ab61156e1fb9860705fed017ed41)) - **docker:** fixes issue caused by changes to underlying ruby:2.6 image ([6570ff](https://github.com/postalserver/postal/commit/6570ff1f7797ff9a307dd96ed4ff37be14bf79ab)) ## 2.0.0 ### Features - **ui:** add footer with links to docs and discussions ([1247da](https://github.com/postalserver/postal/commit/1247dae2e060a695a13a30ba072ca5e6dea45202)) ### Bug Fixes - **dkim:** ensure DKIM-Signature headers are appropriately wrapped ([476129](https://github.com/postalserver/postal/commit/476129cc1ba44e9014768d5ba7193587f78cb5d5)) - **docs:** update port numbers to specify the actual port number the SMTP server is listening on ([4404b3](https://github.com/postalserver/postal/commit/4404b3e02c1722808157c3f590310ead9e28641d)) - **logging:** fix spelling of graylog ([2a11e0](https://github.com/postalserver/postal/commit/2a11e0c0a5b7c7f630af28cf4af5511d9bce6dda)) ## 2.0.0-beta.1 ### Features - **config:** support for loading a postal.local.yml config file from the config root if it exists ([8e3294](https://github.com/postalhq/postal/commit/8e3294ba1af4b797d36bd1ca9226190ed80f65cc)) - **smtp_server:** allow bind address to be configured ([4a410c](https://github.com/postalhq/postal/commit/4a410c8c9f6fa1ef993a68c37afeaf31230585f7)) - add priorities to IP address assignment ([21a8d8](https://github.com/postalhq/postal/commit/21a8d890459958375d4a49a5b7f31f4900a9e8b1)) ### Bug Fixes - **dkim:** fixes bug with signing dkim bodies ([189dfa](https://github.com/postalhq/postal/commit/189dfa509b4750f1e4cc6f43f6565edd3a35139c)) - **smtp_server:** attempt to redact plain-text passwords from log output ([fcb636](https://github.com/postalhq/postal/commit/fcb63616e1ce578d7d4fd1c96ddc4ee0f7a71534)) - **smtp_server:** fixes issue with malformed rcpt to ([e0ba05](https://github.com/postalhq/postal/commit/e0ba05acb11108d98a460ae3fac653ceefb5f672)) - **smtp_server:** refactor mx lookups to randomly order mx records with the same priority ([bc2239](https://github.com/postalhq/postal/commit/bc22394fdd4f26dddd576840b49d7c25802cda7d)) - **smtp_server:** updated line split logic, normalize all linebreaks to \r\n ([e8ba9e](https://github.com/postalhq/postal/commit/e8ba9ee4276e81af84ecb6ff6f0c024ef99f6ddc)) - add resolv 0.2.1 ([eef1a3](https://github.com/postalhq/postal/commit/eef1a365a28e133750c4d5a4ac0eeeed223e303d)) - always obey POSTAL_CONFIG_ROOT ([1d22ca](https://github.com/postalhq/postal/commit/1d22ca0f85b58b04aedde9071d9fc5ecd44af4de)) - fix issue with determining if an SMTP connection is encrypted or not ([73870d](https://github.com/postalhq/postal/commit/73870d6a92400fc8ec1493016817dfac074ffd06)) - remove a few leftover fast server artifacts ([5cd06e](https://github.com/postalhq/postal/commit/5cd06e126b6caac502245754b360194365152415)) - replace Fixnum with Integer ([52a23f](https://github.com/postalhq/postal/commit/52a23fa86f94c14dfc7edccbf414dda34c46bc12)) ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to Postal This doc explains how to go about running Postal in development to allow you to make contributions to the project. ## Dependencies You will need a MySQL database server to get started. Postal needs to be able to make databases within that server whenever new mail servers are created so the permissions that you use should be suitable for that. You'll also need Ruby. Postal currently uses Ruby 3.2.2. Install that using whichever version manager takes your fancy - rbenv, asdf, rvm etc. ## Clone You'll need to clone the repository ``` git clone git@github.com:postalserver/postal ``` Once cloned, you can install the Ruby dependencies using bundler. ``` bundle install ``` ## Configuration Configuration is handled using a config file. This lives in `config/postal/postal.yml`. An example configuration file is provided in `config/examples/development.yml`. This example is for development use only and not an example for production use. You'll also need a key for signing. You can generate one of these like this: ``` openssl genrsa -out config/postal/signing.key 2048 ``` If you're running the tests (and you probably should be), you'll find an example file for test configuration in `config/examples/test.yml`. This should be placed in `config/postal/postal.test.yml` with the appropriate values. If you prefer, you can configure Postal using environment variables. These should be placed in `.env` or `.env.test` as apprpriate. ## Running The neatest way to run postal is to ensure that `./bin` is your `$PATH` and then use one of the following commands. * `bin/dev` - will run all components of the application using Foreman * `bin/postal` - will run the Postal binary providing access to running individual components or other tools. ## Database initialization Use the commands below to initialize your database and make your first user. ``` postal initialize postal make-user ``` ================================================ FILE: Dockerfile ================================================ FROM ruby:3.4.6-slim-bookworm AS base SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update \ && apt-get install --no-install-recommends -y curl \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN (curl -sL https://deb.nodesource.com/setup_20.x | bash -) # Install main dependencies RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ netcat-openbsd \ libmariadb-dev \ libcap2-bin \ nano \ libyaml-dev \ nodejs \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN setcap 'cap_net_bind_service=+ep' /usr/local/bin/ruby # Configure 'postal' to work everywhere (when the binary exists # later in this process) ENV PATH="/opt/postal/app/bin:${PATH}" # Setup an application RUN useradd -r -d /opt/postal -m -s /bin/bash -u 999 postal USER postal RUN mkdir -p /opt/postal/app /opt/postal/config WORKDIR /opt/postal/app # Install bundler RUN gem install bundler -v 2.7.2 --no-doc # Install the latest and active gem dependencies and re-run # the appropriate commands to handle installs. COPY --chown=postal Gemfile Gemfile.lock ./ RUN bundle install # Copy the application (and set permissions) COPY ./docker/wait-for.sh /docker-entrypoint.sh COPY --chown=postal . . # Export the version ARG VERSION ARG BRANCH RUN if [ "$VERSION" != "" ]; then echo $VERSION > VERSION; fi \ && if [ "$BRANCH" != "" ]; then echo $BRANCH > BRANCH; fi # Set paths for when running in a container ENV POSTAL_CONFIG_FILE_PATH=/config/postal.yml # Set the CMD ENTRYPOINT [ "/docker-entrypoint.sh" ] CMD ["postal"] # ci target - use --target=ci to skip asset compilation FROM base AS ci # full target - default if no --target option is given FROM base AS full RUN RAILS_GROUPS=assets bundle exec rake assets:precompile RUN touch /opt/postal/app/public/assets/.prebuilt ================================================ FILE: Gemfile ================================================ # frozen_string_literal: true source "https://rubygems.org" gem "abbrev" gem "authie" gem "autoprefixer-rails" gem "bcrypt" gem "chronic" gem "domain_name" gem "dotenv" gem "dynamic_form" gem "execjs", "~> 2.7", "< 2.8" gem "gelf" gem "haml" gem "hashie" gem "highline", require: false gem "jwt" gem "kaminari" gem "klogger-logger" gem "konfig-config", "~> 3.0" gem "logger" gem "mail" gem "mutex_m" gem "mysql2" gem "nifty-utils" gem "nilify_blanks" gem "nio4r" gem "ostruct" gem "prometheus-client" gem "puma" gem "rackup" gem "rails", "= 7.1.5.2" gem "resolv" gem "secure_headers" gem "sentry-rails" gem "turbolinks", "~> 5" gem "webrick" group :oidc do # These are gems which are needed for OpenID connect. They are only required by the application # when OIDC is enabled in the Postal configuration. gem "omniauth_openid_connect" gem "omniauth-rails_csrf_protection" end group :development, :assets do gem "coffee-rails", "~> 5.0" gem "jquery-rails" gem "sass-rails" gem "uglifier", ">= 1.3.0" end group :development do gem "annotate" gem "rubocop" gem "rubocop-rails" end group :test do gem "database_cleaner-active_record" gem "factory_bot_rails" gem "rspec" gem "rspec-rails" gem "shoulda-matchers" gem "timecop" gem "webmock" end ================================================ FILE: MIT-LICENCE ================================================ Copyright 2017-2024 Krystal Hosting Ltd Copyright 2024 Adam Cooke Copyright 2024 Charlie Smurthwaite Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Procfile.dev ================================================ web: unset PORT; bundle exec puma -C config/puma.rb worker: bundle exec ruby script/worker.rb smtp: unset PORT; bundle exec ruby script/smtp_server.rb ================================================ FILE: README.md ================================================ ![GitHub Header](https://github.com/postalserver/.github/assets/4765/7a63c35d-2f47-412f-a6b3-aebc92a55310) **Postal** is a complete and fully featured mail server for use by websites & web servers. Think Sendgrid, Mailgun or Postmark but open source and ready for you to run on your own servers. * [Documentation](https://docs.postalserver.io) * [Installation Instructions](https://docs.postalserver.io/getting-started) * [FAQs](https://docs.postalserver.io/welcome/faqs) & [Features](https://docs.postalserver.io/welcome/feature-list) * [Discussions](https://github.com/postalserver/postal/discussions) - ask for help or request a feature * [Join us on Discord](https://discord.postalserver.io) ================================================ FILE: Rakefile ================================================ # frozen_string_literal: true # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks ================================================ FILE: SECURITY.md ================================================ # Security Policy ## Supported Versions We only support updates to the 3.x versions of Postal. | Version | Supported | | ------- | ------------------ | | 3.x.x | :white_check_mark: | | < 3.0 | :x: | ## Reporting a Vulnerability If you discover a vulnerability in Postal, please do not post an issue on GitHub. Instead you should send an e-mail to security@postalserver.io with details. We will get back to you directly. ================================================ FILE: app/assets/config/manifest.js ================================================ //= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css //= link application/application.css //= link application/application.js ================================================ FILE: app/assets/images/.keep ================================================ ================================================ FILE: app/assets/javascripts/application/application.coffee ================================================ #= require jquery #= require jquery_ujs #= require turbolinks #= require_tree ./vendor/. #= require_self #= require_tree . $ -> isFirefox = -> !!navigator.userAgent.match(/firefox/i) $('html').addClass('browser-firefox') if isFirefox() $(document).on 'turbolinks:load', -> $('.js-multibox').multibox({inputCount: 6, classNames: {container: "multibox", input: 'input input--text multibox__input'}}) $(document).on 'keyup', (event)-> return if $(event.target).is('input, select, textarea') if event.keyCode == 83 $('.js-focus-on-s').focus() event.preventDefault() if event.keyCode == 70 $('.js-focus-on-f').focus() event.preventDefault() $(document).on 'click', 'html.main .flashMessage', -> $(this).hide 'fast', -> $(this).remove() $(document).on 'click', '.js-toggle-helpbox', -> helpBox = $('.js-helpbox') if helpBox.hasClass('is-hidden') helpBox.removeClass('is-hidden') else helpBox.addClass('is-hidden') return false $(document).on 'input', 'input[type=range]', -> value = $(this).val() updateAttr = $(this).attr('data-update') if updateAttr && updateAttr.length $("." + $(this).attr('data-update')).text(parseFloat(value, 10).toFixed(1)) $(document).on 'change', '.js-checkbox-list-toggle', -> $this = $(this) value = $this.val() $list = $this.parent().find('.checkboxList') if value == 'false' then $list.show() else $list.hide() $(document).on 'click', '.js-toggle', -> $link = $(this) element = $link.attr('data-element') $(element, $link.parent()).toggle() false toggleCredentialInputs = (type)-> $('[data-credential-key-type]').hide() $('[data-credential-key-type] input').attr('disabled', true) if type == 'SMTP-IP' $('[data-credential-key-type=smtp-ip]').show() $('[data-credential-key-type=smtp-ip] input').attr('disabled', false) else $('[data-credential-key-type=all]').show() $(document).on 'change', 'select#credential_type', -> value = $(this).val() toggleCredentialInputs(value) $(document).on 'turbolinks:load', -> credentialTypeInput = $('select#credential_type') if credentialTypeInput.length toggleCredentialInputs(credentialTypeInput.val()) ================================================ FILE: app/assets/javascripts/application/elements/ajax.coffee ================================================ onStart = (event) -> $('.flashMessage').remove() $('input, select, textarea').blur() $target = $(event.target) if $target.is('form') $('.js-form-submit', $target).addClass('is-spinning') if $target.hasClass('button') $($target).addClass('is-spinning') onComplete = (event, xhr)-> $target = $(event.target) if xhr.responseJSON data = xhr.responseJSON if data.redirect_to Turbolinks.clearCache() Turbolinks.visit(data.redirect_to, {"action":"replace"}) console.log "Redirected to #{data.redirect_to}" if data.alert unSpin($target) alert(data.alert) if data.form_errors if $target.is('form') unSpin($target) handleErrors($target, data.form_errors) if data.flash unSpin($target) $('body .flashMessage').remove() for key, value of data.flash $message = $("
#{value}
") $('body').prepend($message) if data.region_html unSpin($target) $('.js-ajax-region').replaceWith(data.region_html) $('[autofocus]', '.js-ajax-region').focus() else console.log "Unsupported return." unSpin = ($target)-> $target.removeClass('is-spinning') $('.js-form-submit', $target).removeClass('is-spinning') handleErrors = (form, errors)-> html = $("