Commit Graph
100 Commits
Author SHA1 Message Date
Adam Cooke cad2aa6808 fix(messages): sandbox rendered email HTML as extra XSS defence
The app-wide CSP already blocks inline script execution, but the HTML
preview iframe for a stored email was same-origin and un-sandboxed, and
the html_raw response had no per-action hardening. Add a sandbox on the
iframe and tighten the CSP on html_raw to script-src 'none' with
nosniff and no-referrer so the preview has defence in depth against a
future CSP bypass or regression.

Relates to GHSA-f6g9-8555-cw28.
2026-04-24 22:12:27 +01:00
Adam Cooke b611d577af chore: ignore node modules and yarn.lock 2026-04-24 21:34:57 +01:00
Adam Cooke 11419f9914 fix(deliveries): escape delivery details to prevent HTML injection 2026-02-01 14:48:54 +00:00
Adam Cooke d00d978872 chore: upgrade resolv to 0.6.2 2025-10-02 14:39:27 +01:00
Adam Cooke c78000ca8f chore: remove version from docker-compose.yml 2025-10-02 14:38:42 +01:00
Adam Cooke c03c44b442 chore(deps): upgrade puma, net-imap and other deps 2025-10-01 18:13:36 +01:00
Adam Cooke 86de372382 chore(dockerfile): reduce container size 2025-10-01 18:12:26 +01:00
Adam Cooke 7c47422c86 fix(health_server): use rackup handler instead of rack handler 2025-10-01 18:12:26 +01:00
Adam Cooke f193b8e77f chore: upgrade uri gem to 1.0.3 2025-10-01 16:47:59 +01:00
Adam Cooke ab6d4430ba chore: upgrade to rails 7.1 and ruby 3.4 (#3457) 2025-10-01 16:42:39 +01:00
Adam Cooke 2b0919c145 fix: raise NotImplementedError when no call method on a scheduled task 2024-06-20 14:27:20 +01:00
Adam Cooke 3a33e53d84 fix: fix issue running message pruning task 2024-06-20 14:27:20 +01:00
Adam Cooke 4fa88acea0 fix: fix postal version command 2024-06-20 14:27:18 +01:00
Adam Cooke 39f704c256 fix(legacy-api): allow _expansions to be provided as true to return all expansions
closes #2932
2024-04-18 14:38:44 +01:00
Adam Cooke 5a2f31ed77 doc: fix doc for Postal.version 2024-03-21 14:58:11 +00:00
Adam Cooke 07c6b317f2 refactor(versioning): improve how current version and branch is determined and set
Refactor `Postal.version`` and `Postal.branch` and remove `Postal::VERSION`.
2024-03-21 14:55:14 +00:00
Adam Cooke 3a56ec8a74 fix(smtp-sender): ensure relays without a host are excluded 2024-03-21 12:33:34 +00:00
Adam Cooke b3264b9427 fix(smtp-sender): fixes SMTPSender.smtp_relays 2024-03-21 12:27:54 +00:00
Adam Cooke 6ef388577e Merge pull request #2891 from postalserver/export-branch-to-image 2024-03-20 14:34:28 +00:00
Adam Cooke 18236171eb chore(ui): display branch in footer if present 2024-03-20 14:30:32 +00:00
Adam Cooke bee509832e chore(container): add the branch name to the container 2024-03-20 14:28:44 +00:00
Adam Cooke 4d9654dac4 refactor: remove moonrope but maintain legacy API actions (#2889) 2024-03-19 20:21:04 +00:00
Adam Cooke adaf2b0750 chore(github-actions): don't run for dependabot or release-please PRs and fetch whole repo 2024-03-19 16:54:18 +00:00
Adam Cooke 64bc7dcf7c chore(github-actions): include a version string on branch-*/latest images 2024-03-19 16:42:21 +00:00
Adam Cooke d65bbe0579 chore(github-actions): don't generate commit- tags 2024-03-19 10:27:15 +00:00
Adam Cooke be456523dd fix: don't use authentication on org & server deletion 2024-03-14 14:14:59 +00:00
Adam Cooke 3d208d632f test: add tests for the legacy API 2024-03-13 22:40:41 +00:00
Adam Cooke 92406129cf fix(smtp-server): fixes proxy protocol 2024-03-13 18:16:08 +00:00
Adam Cooke 58dddebeb8 fix: fixes postal default-dkim-record 2024-03-13 16:54:53 +00:00
Adam Cooke 96d73653d7 feat: add sha256 signatures to outgoing http requests (#2874) 2024-03-13 08:52:29 +00:00
Adam Cooke 9982bb8c31 fix(smtp-server): add additional information to cram-md5 log entries 2024-03-12 20:54:40 +00:00
Adam Cooke 5ed94f6f85 feat: openid connect support (#2873) 2024-03-12 17:40:07 +00:00
Adam Cooke 4e13577891 style(rubocop): Style/TrailingCommaInArrayLiteral 2024-03-12 11:45:44 +00:00
Adam Cooke d84152eb5d feat: automatically remove queued messages with stale locks (#2872) 2024-03-12 11:37:29 +00:00
Adam Cooke 9399e32234 fix: don't override paths in dockerfile
This allows for these paths to continue to be set in the config file or environment variable while still maintaining the default of having the default paths in the same directory as the postal config file.
2024-03-08 16:40:58 +00:00
Adam Cooke 22dcd4901f test(smtp-sender): add more tests for AUTH LOGIN
This adds tests for AUTH LOGIN when the username is not provided on the initial line
2024-03-08 14:08:53 +00:00
Adam Cooke 6df963651d Merge pull request #2850 from postalserver/release-please--branches--main
chore(main): release 3.1.0
2024-03-06 14:35:57 +00:00
Adam Cooke e2d642c0cb fix(message-dequeuer): ensure SMTP endpoints are sent to SMTP sender appropriately
closes #2853
2024-03-06 14:09:29 +00:00
Adam Cooke 4e1deb2d2a fix(web-server): allow for trusted proxies not be set 2024-03-06 14:05:44 +00:00
Adam Cooke d1e5b68200 fix(smtp-server): listen on all interfaces by default
This is the same behaviour as when using v1 configuration. Unlike the
web server which is proxied, most people are going to need this so having
the default remain seems like the easiest path for upgrades.

see #2852
2024-03-06 13:23:50 +00:00
Adam Cooke 33513a77c0 fix(ui): fixes typo on queue page 2024-03-05 22:57:39 +00:00
Adam Cooke 3785c99851 feat: configurable trusted proxies for web requests 2024-03-05 22:54:19 +00:00
Adam Cooke 9bf6152060 fix(smtp-server): reset ansi sequence after logging 2024-03-05 22:13:43 +00:00
Adam Cooke 0dc7359431 fix(smtp-server): remove ::ffff: from the start of ipv4 addresses 2024-03-05 22:13:42 +00:00
Adam Cooke 2c20ba65f6 style(rubocop): use _ when not using a variable in helm config exporter 2024-03-05 22:13:38 +00:00
Adam Cooke 48f6494240 fix: default to listening on all addresses when using legacy config 2024-03-05 19:34:23 +00:00
Adam Cooke e8e44f54b0 chore: removing arm64 support until we can get a reasonable build pipeline sorted 2024-03-05 19:24:19 +00:00
Adam Cooke 454d86734d Merge pull request #2844 from postalserver/release-please--branches--main
chore(main): release 3.0.1
2024-03-05 19:23:40 +00:00
Adam Cooke 78cb326d61 Merge pull request #2840 from postalserver/release-please--branches--main
chore(main): release 3.0.0
2024-03-05 15:51:12 +00:00
Adam Cooke fd33e21667 chore: update CHANGELOG about v3 2024-03-05 15:45:16 +00:00
Adam Cooke 90d3a3f8c9 refactor: be less verbose with message DB migrations 2024-03-04 21:03:15 +00:00
Adam Cooke b35eea6338 feat: add "postal:update" task
this will load the schema if no schema exists or update it if it does
2024-03-04 21:01:31 +00:00
Adam Cooke 893898835d feat: add helm env var config exporter 2024-03-04 20:58:38 +00:00
Adam Cooke ce30c070bd refactor: switch to use SecureRandom for random strings 2024-03-04 17:33:25 +00:00
Adam Cooke cae4b63599 refactor: refactor log use within SMTP server
Additionally adds logging when authentication is required but not provided.

closes #2794
closes #2791
2024-03-04 17:16:52 +00:00
Adam Cooke 0d3eccb368 fix: update wording about tracking domain cnames
closes #2808
2024-03-04 16:55:36 +00:00
Adam Cooke 1da1182c23 fix: unescape in URLs which are stored for tracking
closes #2568
closes #907
closes #115
2024-03-04 16:52:36 +00:00
Adam Cooke 658aa71483 fix: remove support for setting the 'ssl' option for app-level smtp use 2024-03-04 15:54:54 +00:00
Adam Cooke 1ca18dbc6e refactor: remove unused UserController#join method 2024-03-04 14:42:32 +00:00
Adam Cooke e05f0b3616 fix: remove user email verification 2024-03-04 14:41:18 +00:00
Adam Cooke e1bae60768 feat: include list-unsubscribe-post header in dkim signatures
closes #2789
closes #2788
2024-03-04 14:32:05 +00:00
Adam Cooke df096abdc7 docs: update readme 2024-03-04 14:28:04 +00:00
Adam Cooke 0daa667b55 feat: support for additional SMTP client options 2024-03-04 14:24:24 +00:00
Adam Cooke 9dd00f6edd fix: fix bug in smtp server when exceptions occur 2024-03-04 13:55:16 +00:00
Adam Cooke dbd0e279f5 chore: update MIT-LICENCE 2024-03-04 13:48:33 +00:00
Adam Cooke defb5114d0 fix: fix smtp TLS 2024-03-04 13:42:01 +00:00
Adam Cooke a4d039c44d fix: use local resolver for DNS tests (github actions blocks DNS seemingly) 2024-03-04 13:15:40 +00:00
Adam Cooke 87d35d7c41 refactor: change domain used for dns resolver testing 2024-03-04 12:48:05 +00:00
Adam Cooke 47b203c372 chore: release 3.0.0
Release-As: 3.0.0
2024-03-04 11:38:27 +00:00
Adam Cooke 2359829e22 Merge pull request #2803 from postalserver/v3
Postal v3
2024-03-04 10:28:51 +00:00
Adam Cooke 77e818a472 test: add test for multiline headers 2024-03-01 18:28:25 +00:00
Adam Cooke 2621a190b1 fix: fixes issue with SMTP sender with address endpoints 2024-03-01 18:27:53 +00:00
Adam Cooke 0140dc4483 feat: only accept RFC-compliant End-of-DATA sequence
Previously Postal was fairly forgiving about line endings. This requires that the end of data sequence is `<CR><LF>.<CR><LF>`.
2024-03-01 17:12:10 +00:00
Adam Cooke 66d26c8d4f Merge pull request #2834 from postalserver/release-please--branches--main
chore(main): release 2.3.2
2024-03-01 14:44:42 +00:00
Adam Cooke 694240ddcd fix: truncate output and details in deliveries to 250 characters
closes #2831
2024-03-01 13:14:48 +00:00
Adam Cooke a9ade3c8bc chore(gha): upgrade github checkout action, don't create arm images for CI, add qemu 2024-03-01 13:08:11 +00:00
Adam Cooke 0b468f97c5 chore: remove -j4 from bundle install as it shouldn't be needed 2024-03-01 13:00:10 +00:00
Adam Cooke afa1726d0d docs: add new repo readme welcome image
Signed-off-by: Adam Cooke <adam@krystal.io>
2024-03-01 12:43:53 +00:00
Adam Cooke 7963c8af16 chore: consolidate platforms in Gemfile 2024-03-01 11:00:26 +00:00
Adam Cooke 1d094be652 Merge pull request #2829 from postalserver/refactor-smtp-sender
Refactor SMTP Sender
2024-03-01 10:56:40 +00:00
Adam Cooke 5b022b9394 chore: reduce threads for bundling in docker 2024-03-01 10:21:51 +00:00
Adam Cooke 633c509a45 refactor: refactor the SMTP sender 2024-03-01 09:54:22 +00:00
Adam Cooke ae30cc7615 fix: ensure encoding is set for message db 2024-02-27 19:04:40 +00:00
Adam Cooke de88201f61 chore: add arm64 platform 2024-02-27 08:07:39 +00:00
Adam Cooke 0163ac3d10 feat: new configuration system (and schema) (#2819) 2024-02-26 12:41:57 +00:00
Adam Cooke a2eb70edf1 feat: add health server and prometheus metrics to worker 2024-02-23 22:51:38 +00:00
Adam Cooke 1ae8ef6401 chore: upgrade bundler to 2.5.6 2024-02-23 22:51:37 +00:00
Adam Cooke b89e0a9e82 refactor: remove token logins 2024-02-23 22:51:37 +00:00
Adam Cooke ecd09a2445 chore: upgrade rails to 7.0 and other dependencies 2024-02-23 22:51:37 +00:00
Adam Cooke cfc1c9b73e docs: update SECURITY policy 2024-02-23 22:51:37 +00:00
Adam Cooke 38465de120 refactor: remove unnecessary modules 2024-02-23 22:51:37 +00:00
Adam Cooke b8ad732152 refactor: move tracking middleware 2024-02-23 22:51:37 +00:00
Adam Cooke 64b2704b02 refactor: move lib/postal/user_creator to app/util/user_creator 2024-02-23 22:51:37 +00:00
Adam Cooke e3bc9da253 refactor: move lib/postal/received_header to app/lib/received_header 2024-02-23 22:51:36 +00:00
Adam Cooke 5cc9eb3df7 refactor: move lib/postal/reply_separator to app/lib/reply_separator 2024-02-23 22:51:36 +00:00
Adam Cooke 321ab95936 refactor: move lib/postal/smtp_server to app/lib/smtp_server 2024-02-23 22:51:36 +00:00
Adam Cooke 73a55a5053 refactor: move senders in to app/senders/ 2024-02-23 22:51:36 +00:00
Adam Cooke eb246bb4e7 refactor: move app/util/* to app/lib/ 2024-02-23 22:51:36 +00:00
Adam Cooke 93fc120f44 refactor: move worker from lib/worker to app/lib/worker 2024-02-23 22:51:36 +00:00
Adam Cooke a44e1f9081 refactor: refactors message dequeueing (#2810) 2024-02-23 22:51:36 +00:00