Skip to content

Add optional srvhostname argument for managesieve client #126

Merged
tonioo merged 1 commit into
tonioo:masterfrom
wildegnux:master
Jan 7, 2026
Merged

Add optional srvhostname argument for managesieve client #126
tonioo merged 1 commit into
tonioo:masterfrom
wildegnux:master

Conversation

@wildegnux

Copy link
Copy Markdown
Contributor

Add optional srvhostname argument for managesieve client to support passing differnt server_hostname to ssllib context.

My use case is the following.
I'm using this library for a test that managesieve (dovecot pigeonhole) is working as expected with TLS for a hostname. The hostname resolves to two ip addresses and I want to test each ip address individually.
The certificate served by dovecot is valid for the hostname, not the IP addresses and thus if I try connecting without this patch I would get the following error:

sievelib.managesieve.Error: SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '1.2.3.4'. (_ssl.c:1032)

passing the correct hostname instead of the ip to the sslib context fixes this.

…assing differnt server_hostname to ssllib context
@tonioo tonioo merged commit ffab5bf into tonioo:master Jan 7, 2026
7 checks passed
@codecov

codecov Bot commented Jan 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.56%. Comparing base (69f644c) to head (0914161).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
sievelib/managesieve.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #126   +/-   ##
=======================================
  Coverage   87.55%   87.56%           
=======================================
  Files          10       10           
  Lines        2073     2074    +1     
=======================================
+ Hits         1815     1816    +1     
  Misses        258      258           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonioo

tonioo commented Jan 7, 2026

Copy link
Copy Markdown
Owner

@wildegnux Thanks for this contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants