Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

io_debug: Extra option for only logging on failure

Open
#776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
go

Research direction

Start by tracing the existing io_debug configuration handling and the SMTP communication logging path; the issue provides no file or test entry point. Confirm how success and error outcomes are identified, then define tests covering off, on, and on_failure behavior so the new option logs complete communication only for failed interactions.

Written by the indexing model from the issue text.

Description

new feature

Use case

io_debug is currently a boolean flag.

Turning it on to log everything when debugging either Maddy's sources or on bringing up a new server makes sense. However, it would also be useful for longer-term debugging of more complex issues with server setup if it could log the entire communication only when an error has occurred. Thus successful connections do not need the extra info, whilst problem communication can capture this for days or weeks without needing to generate overly verbose logs.

There is also the possibility that extended logging on failure/rejections/etc. could be valuable for feeding into systems like fail2ban or CrowdSec for blacklisting spam and attackers, enabling such systems to differentiate better between malicious connections and innnocent failures.

Your idea for a solution

How your solution would work in general?
I haven;t yet looked to see how difficult this would be in terms of implementation. But for the interface, simply adding a third option to the config directive - "on", "off", and e.g. "on_failure" seems suitable to me.

  • I'm willing to help with the implementation
    • I think I can implement but would appreciate guidance and a review of changes to ensure it's implemented in the required places.
Dominant language
Go
Stars
6.1k
Forks
327
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from foxcpp/maddy

All issues in foxcpp/maddy

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.