Compare commits

..
5 Commits
Author SHA1 Message Date
herel c601841aeb Merge pull request 'Chore/release 0.7.0 docker tags' (#3) from chore/release-0.7.0-docker-tags into main
Reviewed-on: #3
2026-08-28 13:23:52 +00:00
herel 1faa8f1982 chore: Bump version to 0.7.0 and update changelog
Document the changes shipped since 0.2.0: the X-WS-* header
detection fix (0.5.0), the custom POP3 implementation (0.6.0) and
the dependency and toolchain upgrades (0.7.0). Retitle the 0.2.0
entry to 0.3.0 to match the version actually released in
Cargo.toml.
2026-08-28 15:23:34 +02:00
herel 94df2c8d4f build: Tag Docker image with version on main, SHA otherwise
Derive the Docker tag from the crate version when building on the
main branch and fall back to the short commit SHA on any other
branch. Update the run, clean, shell and push targets to use the
same tag instead of the implicit latest tag.
2026-08-28 15:23:26 +02:00
herel 64f30a8494 Merge pull request 'build: Upgrade to Rust 1.98 and Debian trixie' (#2) from rust-upgrade into main
Reviewed-on: #2
2026-08-28 13:12:50 +00:00
herel bdff2b5505 build: Upgrade to Rust 1.98 and Debian trixie
Pin the toolchain to Rust 1.98 via rust-toolchain.toml and bump the
builder image to rust:1.98-trixie. Move the runtime image from Debian
bookworm to trixie, replacing libssl3 with libssl3t64 which is the
OpenSSL runtime package name in trixie.
2026-08-28 15:10:14 +02:00
6 changed files with 64 additions and 14 deletions
+39 -1
View File
@@ -5,7 +5,45 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.2.0] - 2025-12-04
## [0.7.0] - 2026-08-28
### Changed
- Upgraded dependencies: clap 4.6.6, imap 3.0.0-alpha.15, native-tls 0.2.18
- Migrated IMAP client to the imap 3.x `ClientBuilder` and `AppendCmd` APIs
- Docker images are now tagged with the crate version on main and the short commit SHA otherwise
- Upgraded build toolchain to Rust 1.98 (pinned via `rust-toolchain.toml`)
- Updated Docker images: builder `rust:1.98-trixie`, runtime Debian trixie with `libssl3t64`
### Removed
- Unused `imap-proto` dependency
- Unsound `lexical-core 0.7.6` dependency chain (RUSTSEC-2023-0086), `cargo audit` is now clean
## [0.6.0] - 2025-12-12
### Changed
- Replaced the third-party `rust-pop3-client` crate with a custom POP3 implementation
- POP3 messages are now retrieved as raw bytes over native-tls, without encoding or line ending conversions
- Reduced dependency footprint by dropping `rust-pop3-client`
### Fixed
- POP3 byte-stuffing (doubled leading dots) is now handled correctly
- Original email byte structure is preserved during retrieval
## [0.5.0] - 2025-12-10
### Fixed
- `X-WS-*` headers (e.g. `X-WS-Attachment-UUID`) are now detected as MIME headers so adjacent attachment headers (`Content-Type`, `Content-Disposition`) get normalized properly
### Added
- Test case for attachment header normalization
## [0.3.0] - 2025-12-04
### Added
Generated
+1 -1
View File
@@ -501,7 +501,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "rs_pop_imap_importer"
version = "0.6.0"
version = "0.7.0"
dependencies = [
"clap",
"dotenvy",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "rs_pop_imap_importer"
version = "0.6.0"
version = "0.7.0"
edition = "2024"
[lib]
+3 -3
View File
@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.91 AS builder
FROM rust:1.98-trixie AS builder
WORKDIR /usr/src/pop_imap_importer
@@ -29,11 +29,11 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo build --release
# Runtime stage
FROM debian:bookworm-slim
FROM debian:trixie-slim
# Install CA certificates and OpenSSL runtime libraries
RUN apt-get update && \
apt-get install -y ca-certificates libssl3 && \
apt-get install -y ca-certificates libssl3t64 && \
rm -rf /var/lib/apt/lists/*
# RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
+18 -8
View File
@@ -3,6 +3,16 @@
# Variables
IMAGE_NAME = pop-imap-importer
DOCKER_PLATFORM = linux/amd64
VERSION = $(shell grep -m1 '^version' Cargo.toml | cut -d'"' -f2)
GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
GIT_SHA = $(shell git rev-parse --short HEAD)
# Docker tag: version number on main branch, short commit SHA otherwise
ifeq ($(GIT_BRANCH),main)
DOCKER_TAG = $(VERSION)
else
DOCKER_TAG = $(GIT_SHA)
endif
# Default target
.PHONY: help
@@ -36,29 +46,29 @@ test: ## Run all tests
# Docker targets
.PHONY: build
build: ## Build the Docker image for linux/amd64 platform
docker build --platform=$(DOCKER_PLATFORM) -t $(IMAGE_NAME) .
build: ## Build the Docker image for linux/amd64 platform (tagged with version on main, commit SHA otherwise)
docker build --platform=$(DOCKER_PLATFORM) -t $(IMAGE_NAME):$(DOCKER_TAG) .
.PHONY: run
run: ## Run the Docker container
docker run --platform=$(DOCKER_PLATFORM) --rm -it $(IMAGE_NAME)
docker run --platform=$(DOCKER_PLATFORM) --rm -it $(IMAGE_NAME):$(DOCKER_TAG)
.PHONY: run-with-env
run-with-env: ## Run the Docker container with a custom .env file
docker run --platform=$(DOCKER_PLATFORM) --rm -it -v $(PWD)/.env:/app/.env $(IMAGE_NAME)
docker run --platform=$(DOCKER_PLATFORM) --rm -it -v $(PWD)/.env:/app/.env $(IMAGE_NAME):$(DOCKER_TAG)
.PHONY: clean
clean: ## Remove the Docker image
docker rmi $(IMAGE_NAME)
docker rmi $(IMAGE_NAME):$(DOCKER_TAG)
.PHONY: push
push: ## Push the Docker image to a registry (requires REPOSITORY variable)
ifndef REPOSITORY
$(error REPOSITORY is not set. Please set it with: make push REPOSITORY=your-repo/image-name)
endif
docker tag $(IMAGE_NAME) $(REPOSITORY):latest
docker push $(REPOSITORY):latest
docker tag $(IMAGE_NAME):$(DOCKER_TAG) $(REPOSITORY):$(DOCKER_TAG)
docker push $(REPOSITORY):$(DOCKER_TAG)
.PHONY: shell
shell: ## Run a shell in the Docker container
docker run --platform=$(DOCKER_PLATFORM) --rm -it $(IMAGE_NAME) sh
docker run --platform=$(DOCKER_PLATFORM) --rm -it $(IMAGE_NAME):$(DOCKER_TAG) sh
+2
View File
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.98.0"