]> git.ipfire.org Git - thirdparty/mlmmj.git/log
thirdparty/mlmmj.git
3 months agomlmmj-process: clean up queue file on second do_all_the_voodoo_here failure 86/head
Michael S. Tsirkin [Sun, 8 Feb 2026 22:24:33 +0000 (17:24 -0500)] 
mlmmj-process: clean up queue file on second do_all_the_voodoo_here failure

The owner-forwarding path re-opens donemailname with O_TRUNC and calls
do_all_the_voodoo_here a second time. If this call fails, the truncated
queue file is left behind. Add unlink(donemailname) and free(donemailname)
to match the cleanup already done at the first call site.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 months agotests: add test for owner path queue file cleanup
Michael S. Tsirkin [Sat, 17 Jan 2026 13:01:09 +0000 (08:01 -0500)] 
tests: add test for owner path queue file cleanup

Test that the queue file is cleaned up when do_all_the_voodoo_here
fails in the owner-forwarding path (second voodoo call).

Uses ulimit -n to limit file descriptors. With a tight limit, the
first voodoo succeeds but the second fails on dup().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agoRelease 1.7.1 RELEASE_1_7_1
Baptiste Daroussin [Fri, 13 Feb 2026 14:10:35 +0000 (15:10 +0100)] 
Release 1.7.1

3 months agomlmmj-process: guard fclose on failed fopen
Michael S. Tsirkin [Tue, 10 Feb 2026 11:37:45 +0000 (06:37 -0500)] 
mlmmj-process: guard fclose on failed fopen

Avoid undefined behavior when queue file opens fail in moderation
notification paths.

3 months agoprepstdreply: fix resource leaks in error paths
Michael S. Tsirkin [Mon, 12 Jan 2026 15:37:43 +0000 (10:37 -0500)] 
prepstdreply: fix resource leaks in error paths

Use close_text() instead of free() when cleaning up txt in error paths.
The txt parameter is a fully initialized text structure from open_text(),
so it needs proper cleanup via close_text() to free all internal resources.

Also add missing close_text() call when prepstdreply_to() fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agodo_all_the_voodoo_here: fix memory leaks and NULL dereference
Michael S. Tsirkin [Mon, 12 Jan 2026 15:37:34 +0000 (10:37 -0500)] 
do_all_the_voodoo_here: fix memory leaks and NULL dereference

Fix two pre-existing issues:

1. Memory leak: unfolded variable from tll_pop_front() was never freed
   in the header processing loop. Add free(unfolded) at loop end and
   before continue statements.

2. NULL dereference: posteraddr can be NULL if From: header is missing
   or malformed. Pass empty string to process_headers_fd() when NULL
   to avoid undefined behavior in xasprintf().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agosend_help: fix FILE* leak in send_help_noexit
Michael S. Tsirkin [Fri, 9 Jan 2026 10:24:34 +0000 (05:24 -0500)] 
send_help: fix FILE* leak in send_help_noexit

Add missing fclose(mail.fp) after send_single_mail(). The file is
opened with fopen() but never closed before returning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agosubscriberfuncs: fix FILE* leak in generate_subconfirm
Michael S. Tsirkin [Fri, 9 Jan 2026 10:24:27 +0000 (05:24 -0500)] 
subscriberfuncs: fix FILE* leak in generate_subconfirm

Add missing fclose(mail.fp) after send_single_mail(). The file is
opened with fopen() but never closed before exit().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agodo_all_the_voodoo_here: fix FILE* leaks in error paths
Michael S. Tsirkin [Fri, 9 Jan 2026 10:01:42 +0000 (05:01 -0500)] 
do_all_the_voodoo_here: fix FILE* leaks in error paths

Four error paths return without closing the FILE* f:
- process_headers_fd() failure in MIME header case
- process_headers_fd() failure in !hdrsadded case
- dprintf() failure when writing header terminator
- dumpfd2fd() failure when dumping mail body

Add fclose(f) before each return -1.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agolistcontrol: fix resource leaks in CTRL_GET error path
Michael S. Tsirkin [Fri, 9 Jan 2026 10:01:32 +0000 (05:01 -0500)] 
listcontrol: fix resource leaks in CTRL_GET error path

When send_single_mail() fails, the code returns without freeing
bounceaddr, archivefilename, or closing mail.fp. Also add cleanup on
the success path which is missing the same resources.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agofix missing fdopen() NULL checks across multiple files
Michael S. Tsirkin [Thu, 8 Jan 2026 12:48:45 +0000 (07:48 -0500)] 
fix missing fdopen() NULL checks across multiple files

If fdopen() fails (e.g., due to memory pressure), passing NULL to
subsequent stdio operations (getline, fclose, scan_headers, etc.)
causes undefined behavior, typically segmentation faults.

Add NULL checks after fdopen() calls in multiple files:

subscriberfuncs.c:
- find_subscriber(): return false on fdopen failure
- autosubscribe_sender(): return early on fdopen failure

mlmmj-send.c:
- send_mail_many_fd(): return -1 on fdopen failure
- main(): exit with failure on fdopen failure

mlmmj-process.c:
- is_moderator(): exit with failure on fdopen failure

listcontrol.c:
- listcontrol(): return -1 on fdopen failure, freeing resources

prepstdreply.c:
- init_file_lines_fd(): return NULL on fdopen failure
- get_msgid_line(): return id on fdopen failure (graceful degradation)
- open_text_fd(): return NULL on fdopen failure

do_all_the_voodoo_here.c:
- do_all_the_voodoo_here(): return -1 on fdopen or dup failure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agomlmmj: fix resource leaks in dsnparseaddr()
Michael S. Tsirkin [Thu, 8 Jan 2026 12:41:26 +0000 (07:41 -0500)] 
mlmmj: fix resource leaks in dsnparseaddr()

The dsnparseaddr() function has three resource leaks:

1. The file handle 'f' is never closed after parsing the DSN mail
2. The 'boundary' string is allocated but never freed
3. The 'emails' list is populated but never freed on exit

Free all three resources before all return paths.

Fixes: a1f1fbc8 ("mlmmj-bounce: make sure mlmmj-bounce is never called directly")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agomlmmj: fix multiple resource leaks in send_probe()
Michael S. Tsirkin [Thu, 8 Jan 2026 12:40:30 +0000 (07:40 -0500)] 
mlmmj: fix multiple resource leaks in send_probe()

The send_probe() function has several resource leaks:

1. bfd (bounce directory file descriptor) is opened but never closed
2. fd (probe file descriptor) is opened but never closed on success
3. mail.fp is not closed on send_single_mail() failure path
4. queuefilename is allocated by prepstdreply() but never freed
5. myaddr and from are not freed on send_single_mail() failure path

Clean up all resources properly on both success and failure
paths.

Fixes: 958d3143 ("probes: fix a regression causing the probes not to sent the bounce numbers")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agodo_all_the_voodoo_here: fix memory leak of fromemails and posteraddr
Michael S. Tsirkin [Thu, 8 Jan 2026 12:39:22 +0000 (07:39 -0500)] 
do_all_the_voodoo_here: fix memory leak of fromemails and posteraddr

The function has two related memory leaks:

1. fromemails strlist is populated by find_email_adr() but never freed.
   The list goes out of scope when the if block ends, but the allocated
   strings remain unreachable.

2. posteraddr is set to tll_front(fromemails), which is just a pointer
   to the first element. This creates a dependency on the leaked list.

Fix:
- Copy the string using xstrdup() so posteraddr owns its memory
- Add tll_length() check before accessing tll_front() to avoid NULL pointer dereference (can occur with empty or malformed From header)
- Free the fromemails list immediately after extracting the value
- Free posteraddr on all return paths (error and success)

Fixes: 59181abe ("customheaders allow substitution on variable $posteraddr$")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agoprepstdreply: fix resource leaks on prepstdreply_to() failure
Michael S. Tsirkin [Thu, 8 Jan 2026 12:37:15 +0000 (07:37 -0500)] 
prepstdreply: fix resource leaks on prepstdreply_to() failure

When prepstdreply_to() returns false, the prepstdreply() function
returns NULL without:
1. Freeing the allocated retstr (queue filename)
2. Closing the opened outfd file descriptor

Add the cleanup.

Fixes: 660caa29 ("prepstdreply: split the function to make it more testable")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agomlmmj-send: fix memory leak of verp variable
Michael S. Tsirkin [Thu, 8 Jan 2026 12:36:23 +0000 (07:36 -0500)] 
mlmmj-send: fix memory leak of verp variable

The verp variable is allocated via ctrlvalue() or xstrdup().
We free it in posfix case before it's assigned but we
forgot to free it when it's assigned NULL, so it will leak.

Free verp each time before it's assigned NULL.

Fixes: 4e53dbc8 ("VERP support")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agosend_mail: fix memory leak in newsmtp()
Michael S. Tsirkin [Thu, 8 Jan 2026 12:34:40 +0000 (07:34 -0500)] 
send_mail: fix memory leak in newsmtp()

The newsmtp() function allocates memory for relayhost and smtphelo
but never frees them.

- relayhost: allocated via xstrdup() or ctrlvalue()
- smtphelo: allocated via ctrlvalue() or hostnamestr()

Both allocations are only used temporarily to call initsmtp(), which
copies the values it needs. So, just free() both.

Fixes: 48418b61 ("mlmmj-bounce: use send_mail directly and stop executing mlmmj-send")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agotest: add a test about previous patch
Baptiste Daroussin [Fri, 13 Feb 2026 13:22:27 +0000 (14:22 +0100)] 
test: add a test about previous patch

3 months agomlmmj-process: move owner file open inside conditional
Michael S. Tsirkin [Thu, 8 Jan 2026 13:47:20 +0000 (08:47 -0500)] 
mlmmj-process: move owner file open inside conditional

The openat() call for the "owner" control file is executed
unconditionally for all recipextra values, but it's only needed
when recipextra equals "owner". Move the openat() and xasprintf()
calls inside the conditional block where they are actually used.

Fixes: ac9e3eef ("mlmmj-process: pass the owner via file descriptor to mlmmj-send")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agotest: add a unit test about previous commit
Baptiste Daroussin [Fri, 13 Feb 2026 13:16:23 +0000 (14:16 +0100)] 
test: add a unit test about previous commit

3 months agomlmmj-send: only unlink subfilename when it was a real path
Michael S. Tsirkin [Mon, 12 Jan 2026 15:42:45 +0000 (10:42 -0500)] 
mlmmj-send: only unlink subfilename when it was a real path

When resending failed mails (case '3'), subfilename can be either:
- A numeric string like "5" representing an inherited file descriptor
- An actual file path

The strtoim() call sets errp=NULL when subfilename parses as a number,
and errp!=NULL when it's a path that needs to be opened.

Only call unlink() when errp!=NULL, i.e., when we opened a real file.
Otherwise unlink("5") would try to delete a file literally named "5"
in the current directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agoAdd a test case about the previous commit
Baptiste Daroussin [Fri, 13 Feb 2026 13:09:24 +0000 (14:09 +0100)] 
Add a test case about the previous commit

3 months agomlmmj-process: clean up queue file on do_all_the_voodoo_here failure
Michael S. Tsirkin [Fri, 9 Jan 2026 10:12:29 +0000 (05:12 -0500)] 
mlmmj-process: clean up queue file on do_all_the_voodoo_here failure

When do_all_the_voodoo_here() fails, the partially written queue file
is left behind. Add unlink() to match the cleanup done in the earlier
rawmailfd open failure path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agotest: add test case about the keep queued resend file on failure
Baptiste Daroussin [Fri, 13 Feb 2026 12:54:23 +0000 (13:54 +0100)] 
test: add test case about the keep queued resend file on failure

3 months agomlmmj-send: keep queued resend file on failure
Michael S. Tsirkin [Fri, 9 Jan 2026 10:40:57 +0000 (05:40 -0500)] 
mlmmj-send: keep queued resend file on failure

Avoid deleting the queued recipients file when resending a failed mail if
sending fails again (e.g., fdopen/connect errors), preventing message loss.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agotest: add 2 new tests convering the previous commit
Baptiste Daroussin [Fri, 13 Feb 2026 12:47:42 +0000 (13:47 +0100)] 
test: add 2 new tests convering the previous commit

3 months agorequeuemail: fix single-recipient send failure losing address
Michael S. Tsirkin [Sat, 17 Jan 2026 10:40:01 +0000 (05:40 -0500)] 
requeuemail: fix single-recipient send failure losing address

When send_mail() fails for the only (or last) recipient, the address
gets popped into the 'addr' parameter, leaving 'addrs' empty. The
early return was checking only if addrs was empty, ignoring addr.

Effect: when sending to a single recipient fails, that recipient is
not saved to the requeue file and is lost entirely. The return value
of 0 (false) propagates back as "success", causing the caller to
delete the queue file as if sending succeeded.

Fix by only returning early when there is nothing to save (both addrs
empty AND addr NULL). This ensures failed recipients are properly
requeued for retry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 months agolistcontrol: replace __attribute__((fallthrough)) with comment
Konstantin Ryabitsev [Thu, 12 Feb 2026 15:10:12 +0000 (10:10 -0500)] 
listcontrol: replace __attribute__((fallthrough)) with comment

The __attribute__((fallthrough)) statement was added in GCC 7. Older
versions treat it as an empty declaration and emit a warning. Use a
/* fallthrough */ comment instead, which GCC (-Wimplicit-fallthrough)
and Clang both recognise as an intentional fallthrough annotation.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
3 months agoRename __unused macro to MLMMJ_UNUSED
Konstantin Ryabitsev [Thu, 12 Feb 2026 14:49:39 +0000 (09:49 -0500)] 
Rename __unused macro to MLMMJ_UNUSED

Identifiers with double-underscore prefixes are reserved for the C
implementation. Older glibc headers (bits/stat.h) use __unused as a
struct field name, so the mlmmj macro expansion produces invalid syntax
when that header is included transitively via fcntl.h.

Rename to MLMMJ_UNUSED to avoid the conflict and stay out of the
reserved namespace.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
3 months agoAdd a test case about the NULL deref in case of double call to
Baptiste Daroussin [Fri, 13 Feb 2026 12:39:40 +0000 (13:39 +0100)] 
Add a test case about the NULL deref in case of double call to
list+owner

3 months agomlmmj-process: fix NULL deref in owner mail reprocessing path 82/head 83/head
Konstantin Ryabitsev [Thu, 12 Feb 2026 15:25:15 +0000 (10:25 -0500)] 
mlmmj-process: fix NULL deref in owner mail reprocessing path

When mail is addressed to listname+owner, mlmmj-process calls
do_all_the_voodoo_here() a second time to strip envelope headers
before forwarding to the list owner. This second call reuses the
same allheaders list that was already populated by the first call.

Inside do_all_the_voodoo_here(), scan_headers() appends the new
mail's headers to the passed-in allhdrs list, while allunfoldeds
is a fresh local list containing only the headers from the current
scan. The main loop then iterates all entries in allhdrs (which now
includes headers from both calls) while popping from allunfoldeds
(which only has entries from the second scan). Once the unfolded
entries are exhausted, tll_pop_front() on the empty list dereferences
NULL and crashes.

Fix this by passing a separate local strlist to the second call so
that allhdrs and allunfoldeds stay in sync.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
4 months agoRelease 1.7.0 RELEASE_1_7_0
Baptiste Daroussin [Sun, 11 Jan 2026 19:51:17 +0000 (20:51 +0100)] 
Release 1.7.0

4 months agotests: enable glibc malloc corruption detection 78/head
Michael S. Tsirkin [Fri, 9 Jan 2026 08:49:17 +0000 (03:49 -0500)] 
tests: enable glibc malloc corruption detection

Set MALLOC_CHECK_=3 in test environment to detect memory corruption
issues like double-free and buffer overflows. When detected, glibc
will print a diagnostic and abort the program.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 months agolistcontrol: fix double-free in CTRL_RELEASE error path
Michael S. Tsirkin [Thu, 8 Jan 2026 06:49:01 +0000 (01:49 -0500)] 
listcontrol: fix double-free in CTRL_RELEASE error path

moderatefilename is already freed before the autosubscribe block:

free(moderatefilename);
bool autosubscribe = statctrl(ml->ctrlfd, "autosubscribe");
if (autosubscribe) {
...
if (mfd == -1) {
free(sendfilename);
free(moderatefilename);  // double-free
return (-1);
}

Remove the second free.

Fixes: ac7f7646 ("autosubscribe: new feature")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 months agofix locking bug in log_oper() and run_digests()
Michael S. Tsirkin [Thu, 8 Jan 2026 13:23:28 +0000 (08:23 -0500)] 
fix locking bug in log_oper() and run_digests()

The condition
if (fd < 0 && !lock(fd, true))
makes no sense: it will try to lock a negative fd which
of course does nothing.

What is meant is
if (fd < 0 || !lock(fd, true))
if fd is not negative, lock it.

Fixes: 2af27b24 ("locking: use a more portable mechanism")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 months agofix locking logic
Michael S. Tsirkin [Thu, 8 Jan 2026 12:33:34 +0000 (07:33 -0500)] 
fix locking logic

The condition
if (fd == -1 && !lock(fd, true))
does not make sense: if fd is -1 it will try to lock the fd.
Of course locking -1 does nothing.

What is meant is
if (fd == -1 || !lock(fd, true))
in other words if fd is valid, lock it.

Affected locations:
- src/mlmmj.c: unsubscribe() - writing subscriber .new files
- src/subscriberfuncs.c: subscribe_type() - appending to subscriber files
- src/incindexfile.c: incindexfile() - updating list index

Without this fix, these operations proceed without file locking, which
can at least theoretically cause data corruption if multiple processes
operate on the same files concurrently.

Fixes: 2af27b24 ("locking: use a more portable mechanism")
Fixes: f9da8d13 ("mlmmj-sub: move all subcription code into a reusable function")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 months agomlmmj-process: address TODO to free parsed headers 77/head
Michael S. Tsirkin [Wed, 7 Jan 2026 09:13:35 +0000 (04:13 -0500)] 
mlmmj-process: address TODO to free parsed headers

Add free_parsed_hdrs() helper to free readhdrs and all strlist
variables (fromemails, toemails, ccemails, etc.) before exit.

This is a cosmetic fix since mlmmj-process is a short-lived
executable that exits immediately after processing, so the OS
reclaims all memory anyway. However, it improves code hygiene
and removes the XXX comment.

Fixes: 4059b78 ("do_all_the_voodo_here introducton plus a massive cleanup")
4 months agosubscriberfuncs: fix memory leak in autosubscribe_sender
Michael S. Tsirkin [Wed, 7 Jan 2026 08:42:53 +0000 (03:42 -0500)] 
subscriberfuncs: fix memory leak in autosubscribe_sender

The readhdrs structure allocated by scan_headers() was never freed,
causing a memory leak on every call to autosubscribe_sender(). Add
free_mailhdrs() calls to all return paths.

Fixes: ac7f764 ("autosubscribe: new feature")
4 months agomlmmj: move free_mailhdrs() to mlmmj.c and fix leak in prepstdreply
Michael S. Tsirkin [Wed, 7 Jan 2026 08:50:22 +0000 (03:50 -0500)] 
mlmmj: move free_mailhdrs() to mlmmj.c and fix leak in prepstdreply

Move free_mailhdrs() from subscriberfuncs.c to mlmmj.c (next to
save_hdr_if_needed) and declare it in mlmmj.h so it can be shared.

Also fix memory leak in get_msgid_line() which calls scan_headers()
but never freed the allocated readhdrs memory.

Fixes: 2550bb1 ("probe: send message-id is possibel in probe emails")
4 months agotests: fix charset in maxmailsize test expectations
Michael S. Tsirkin [Wed, 7 Jan 2026 08:33:47 +0000 (03:33 -0500)] 
tests: fix charset in maxmailsize test expectations

Change charset=utf8 to charset=utf-8 to match the listtexts change
from commit 2045851.

Fixes: 2045851 ("fix East Asian script garbled characters")
4 months agotests: fix charset in moderation_reject_invalid test expectation
Michael S. Tsirkin [Wed, 7 Jan 2026 08:33:36 +0000 (03:33 -0500)] 
tests: fix charset in moderation_reject_invalid test expectation

Change charset=utf8 to charset=utf-8 to match the listtexts change
from commit 2045851.

Fixes: 2045851 ("fix East Asian script garbled characters")
4 months agotests: fix charset in moderation_notmetoo test expectation
Michael S. Tsirkin [Wed, 7 Jan 2026 08:33:27 +0000 (03:33 -0500)] 
tests: fix charset in moderation_notmetoo test expectation

Change charset=utf8 to charset=utf-8 to match the listtexts change
from commit 2045851.

Fixes: 2045851 ("fix East Asian script garbled characters")
4 months agotests: fix charset in moderation_notifymod test expectation
Michael S. Tsirkin [Wed, 7 Jan 2026 08:33:17 +0000 (03:33 -0500)] 
tests: fix charset in moderation_notifymod test expectation

Change charset=utf8 to charset=utf-8 to match the listtexts change
from commit 2045851.

Fixes: 2045851 ("fix East Asian script garbled characters")
4 months agotests: fix charset in moderation test expectation
Michael S. Tsirkin [Wed, 7 Jan 2026 08:33:07 +0000 (03:33 -0500)] 
tests: fix charset in moderation test expectation

Change charset=utf8 to charset=utf-8 to match the listtexts change
from commit 2045851.

Fixes: 2045851 ("fix East Asian script garbled characters")
4 months agotests: fix charset in simple test expectation
Michael S. Tsirkin [Wed, 7 Jan 2026 08:32:49 +0000 (03:32 -0500)] 
tests: fix charset in simple test expectation

Change charset=utf8 to charset=utf-8 to match the listtexts change
from commit 2045851.

Fixes: 2045851 ("fix East Asian script garbled characters")
6 months agofix East Asian script garbled characters 76/head
liu shiwei [Thu, 27 Nov 2025 09:42:52 +0000 (17:42 +0800)] 
fix East Asian script garbled characters

the text files use `charset=utf8`,
 but according to the RFC3629,RFC2046,RFC6532, the correct way to write it is `charset=utf-8`.

6 months agomoderation: remove dead part of the message
Baptiste Daroussin [Thu, 13 Nov 2025 16:44:56 +0000 (17:44 +0100)] 
moderation: remove dead part of the message

6 months agoselfmoderate: adapt the text send to the user
Baptiste Daroussin [Thu, 13 Nov 2025 16:41:15 +0000 (17:41 +0100)] 
selfmoderate: adapt the text send to the user

6 months agorename modemailsender to selfmoderate
Baptiste Daroussin [Thu, 13 Nov 2025 15:33:55 +0000 (16:33 +0100)] 
rename modemailsender to selfmoderate

6 months agoautosubscribe: new feature
Baptiste Daroussin [Thu, 13 Nov 2025 15:31:09 +0000 (16:31 +0100)] 
autosubscribe: new feature

when a mailing list moderated for non subscribed people, if a moderator
accept the email of the sender automatically register the send in the
list of "nomail" subscribers.

6 months agomove and rename getinfo into an understandable name
Baptiste Daroussin [Thu, 13 Nov 2025 13:45:06 +0000 (14:45 +0100)] 
move and rename getinfo into an understandable name

6 months agoUse a generic function instead of findit
Baptiste Daroussin [Thu, 13 Nov 2025 13:07:29 +0000 (14:07 +0100)] 
Use a generic function instead of findit

6 months agomlmmj-send: small style improvements
Baptiste Daroussin [Thu, 13 Nov 2025 07:44:08 +0000 (08:44 +0100)] 
mlmmj-send: small style improvements

6 months agolistcontrol: style improvements
Baptiste Daroussin [Thu, 13 Nov 2025 07:36:04 +0000 (08:36 +0100)] 
listcontrol: style improvements

6 months agomlmmj-process: more style improvements
Baptiste Daroussin [Wed, 12 Nov 2025 16:49:50 +0000 (17:49 +0100)] 
mlmmj-process: more style improvements

6 months agomlmmj-process: small style changes
Baptiste Daroussin [Wed, 12 Nov 2025 16:46:19 +0000 (17:46 +0100)] 
mlmmj-process: small style changes

6 months agoimplement modemailsender test
Michael S. Tsirkin [Sun, 24 Aug 2025 20:50:27 +0000 (16:50 -0400)] 
implement modemailsender test

Implement a new moderation_modemailsender test.
It is identical to moderation_modemailsender, but
sets modemailsender and verifies that the moderation email
goes to the sender.

6 months agorefactor moderation test
Michael S. Tsirkin [Sun, 24 Aug 2025 21:49:02 +0000 (17:49 -0400)] 
refactor moderation test

add a subfunction that will allow adding more tests without duplication

6 months agoadd modemailsender option for sender moderation
Michael S. Tsirkin [Sun, 24 Aug 2025 17:45:28 +0000 (13:45 -0400)] 
add modemailsender option for sender moderation

Some people make their lists subscriber-only for the only reason
that they want senders to confirm they can receive email.
For example, this is a weak form of anti-spam (senders which can not
receive mail and reply to it are filtered out).

However, this annoys one-time contributors which really just want to
post a random mail here and there.

To address this, add a new modemailsender option for sending moderation
emails back to senders instead of moderators. They can now then confirm
it themselves - less work for moderators!

Specifically, when the control/modemailsender file is present,
moderation emails are sent to the original sender instead of moderators.
Only affects moderated lists.

6 months agoFix typo to correctly detect disabled nomail subscriptions 73/head
urosm [Sun, 9 Nov 2025 16:59:54 +0000 (17:59 +0100)] 
Fix typo to correctly detect disabled nomail subscriptions

11 months ago- emphasize headers with markdown modifier 70/head
Erwan MAS [Mon, 30 Jun 2025 11:22:17 +0000 (07:22 -0400)] 
- emphasize headers with markdown modifier

11 months agodelheaders: improve documentation
Baptiste Daroussin [Fri, 27 Jun 2025 09:18:36 +0000 (11:18 +0200)] 
delheaders: improve documentation

Fixes: #68

11 months agoadd more patterns to delheaders unit tests 69/head
Erwan MAS [Thu, 26 Jun 2025 15:26:04 +0000 (11:26 -0400)] 
add more patterns to delheaders  unit tests

11 months agoadd more unit tests to delheaders feature
Erwan MAS [Mon, 23 Jun 2025 18:40:09 +0000 (14:40 -0400)] 
add more unit tests to delheaders feature

11 months agoupdate license
Baptiste Daroussin [Mon, 16 Jun 2025 12:16:07 +0000 (14:16 +0200)] 
update license

11 months agoRelease 1.6.0 RELEASE_1.6.0
Baptiste Daroussin [Fri, 13 Jun 2025 14:14:53 +0000 (16:14 +0200)] 
Release 1.6.0

11 months agocustomheaders: remove blank prefix and skip empty lines
Baptiste Daroussin [Fri, 13 Jun 2025 14:04:16 +0000 (16:04 +0200)] 
customheaders: remove blank prefix and skip empty lines

Remove all the blanks prefixing any lines and skip empty lines when
adding custom headers as it can break email parsers

Fixes: #17

11 months agoChangelog: document $bouncenumbers$ new expansion
Baptiste Daroussin [Fri, 13 Jun 2025 14:06:59 +0000 (16:06 +0200)] 
Changelog: document $bouncenumbers$ new expansion

11 months agoprobe: send message-id is possibel in probe emails
Baptiste Daroussin [Fri, 13 Jun 2025 13:33:57 +0000 (15:33 +0200)] 
probe: send message-id is possibel in probe emails

When sending the probe emails, tries to add the message-id in the
message, to help users figuring finding the wrong email

Fixes: #8

11 months agorefactoring: isolate the code scanning the header
Baptiste Daroussin [Fri, 13 Jun 2025 13:32:57 +0000 (15:32 +0200)] 
refactoring: isolate the code scanning the header

Isolate the code scanning the header of a mail into its own function
for it to be reusable

11 months agocleanup: remove extra semicolon
Baptiste Daroussin [Fri, 13 Jun 2025 08:18:21 +0000 (10:18 +0200)] 
cleanup: remove extra semicolon

11 months agocustomheaders allow substitution on variable $posteraddr$ 66/head
Erwan MAS [Sat, 7 Jun 2025 18:37:00 +0000 (14:37 -0400)] 
customheaders allow substitution on variable $posteraddr$

12 months ago - fix build issues on Linux/Hurd 386 65/head
Erwan MAS [Fri, 30 May 2025 17:40:33 +0000 (13:40 -0400)] 
 - fix build issues on Linux/Hurd 386
 - unit test tests/mlmmj:smtp was incorrect because write_dot send 2 lines

12 months agoUpdate changelog
Baptiste Daroussin [Tue, 27 May 2025 11:37:05 +0000 (13:37 +0200)] 
Update changelog

12 months agoRelease 1.5.2 RELEASE_1.5.2
Baptiste Daroussin [Tue, 27 May 2025 10:05:37 +0000 (12:05 +0200)] 
Release 1.5.2

12 months agotest: restore usage of top_srcdir which was actually setup in kyua.conf
Baptiste Daroussin [Tue, 27 May 2025 09:35:47 +0000 (11:35 +0200)] 
test: restore usage of top_srcdir which was actually setup in kyua.conf

Add a test of the presence of the variable, it fails if the kyua.conf
path is not provided to the kyua call

12 months agoportability: fix socket size initialisation (fixes tests on alpine)
Baptiste Daroussin [Tue, 27 May 2025 09:18:02 +0000 (11:18 +0200)] 
portability: fix socket size initialisation (fixes tests on alpine)

12 months agotest: fix setting up listtext symlinks
Baptiste Daroussin [Tue, 27 May 2025 08:33:48 +0000 (10:33 +0200)] 
test: fix setting up listtext symlinks

Note top_srcdir is not a valide atf-c variable, no idea why it worked
most of the time

12 months agoportability: fix socket size initialisation (fixes tests on alpine)
Baptiste Daroussin [Tue, 27 May 2025 08:04:40 +0000 (10:04 +0200)] 
portability: fix socket size initialisation (fixes tests on alpine)

12 months agofakesmtp: (portability) fix run on alpine
Baptiste Daroussin [Tue, 27 May 2025 08:00:59 +0000 (10:00 +0200)] 
fakesmtp: (portability) fix run on alpine

12 months agomlmmj-bounce:basics_6 can only be run as non root
Baptiste Daroussin [Tue, 27 May 2025 07:00:05 +0000 (09:00 +0200)] 
mlmmj-bounce:basics_6 can only be run as non root

12 months ago32bit fix touch argument to remain on an always valid range
Baptiste Daroussin [Tue, 27 May 2025 06:54:15 +0000 (08:54 +0200)] 
32bit fix touch argument to remain on an always valid range

12 months ago- rewrite some tests involving time_t so he will perform better on 32 bits platform 53/head
Erwan MAS [Mon, 26 May 2025 20:40:13 +0000 (16:40 -0400)] 
- rewrite some tests involving time_t so he will perform better on 32 bits platform

12 months agoReleae 1.5.1 RELEASE_1.5.1
Baptiste Daroussin [Mon, 26 May 2025 12:49:54 +0000 (14:49 +0200)] 
Releae 1.5.1

12 months agoFix tests when there is an actual mailserver running on the host
Baptiste Daroussin [Mon, 26 May 2025 12:47:16 +0000 (14:47 +0200)] 
Fix tests when there is an actual mailserver running on the host

12 months ago- fgetc return a int not a char , and that was not portable on arm 64 52/head
Erwan MAS [Mon, 26 May 2025 03:45:12 +0000 (23:45 -0400)] 
- fgetc return a int not a char , and that was not portable on arm 64

12 months ago- fix issue with struct ml , not be initialized , test mod_get_addr_type failed 51/head
Erwan MAS [Sun, 25 May 2025 03:57:00 +0000 (23:57 -0400)] 
- fix issue with struct ml , not be initialized , test mod_get_addr_type failed

16 months agoRelease 1.5.0 RELEASE_1_5_0
Baptiste Daroussin [Wed, 29 Jan 2025 09:27:39 +0000 (10:27 +0100)] 
Release 1.5.0

16 months agorfc2047: add tests for us-ascii
Baptiste Daroussin [Wed, 8 Jan 2025 13:12:22 +0000 (14:12 +0100)] 
rfc2047: add tests for us-ascii

16 months agodecode_qp: add Q format support and reuse the function
Baptiste Daroussin [Wed, 8 Jan 2025 10:42:45 +0000 (11:42 +0100)] 
decode_qp: add Q format support and reuse the function

decode rfc2047's Q format using the strgen's decode_qp this reduces code
duplication

16 months agounistr: add tests for unistr_header_to_utf8
Baptiste Daroussin [Tue, 7 Jan 2025 17:37:58 +0000 (18:37 +0100)] 
unistr: add tests for unistr_header_to_utf8

16 months agounistr: remove declaration of removed unistr_dump
Baptiste Daroussin [Tue, 7 Jan 2025 16:58:29 +0000 (17:58 +0100)] 
unistr: remove declaration of removed unistr_dump

16 months agounistr: remove unused functions
Baptiste Daroussin [Tue, 7 Jan 2025 16:51:42 +0000 (17:51 +0100)] 
unistr: remove unused functions

17 months agoAdd option to copy From: to Reply-To: 43/head
Graham Leggett [Fri, 3 Jan 2025 14:27:36 +0000 (14:27 +0000)] 
Add option to copy From: to Reply-To:

The replyto boolean causes the original From: header to be copied
to Reply-To:, so that emails can be accepted from senders that
enforce DMARC policies.

20 months agoChangelog: add a missing change
Baptiste Daroussin [Mon, 23 Sep 2024 12:19:25 +0000 (14:19 +0200)] 
Changelog: add a missing change

20 months agoChangelog: add the 2 last changes
Baptiste Daroussin [Mon, 23 Sep 2024 12:17:52 +0000 (14:17 +0200)] 
Changelog: add the 2 last changes

20 months agobounce: fix recording twice bounces
Baptiste Daroussin [Mon, 23 Sep 2024 12:00:40 +0000 (14:00 +0200)] 
bounce: fix recording twice bounces

While here simplify bounce code

20 months agofoot filter: remove documentation
Baptiste Daroussin [Tue, 17 Sep 2024 15:00:35 +0000 (17:00 +0200)] 
foot filter: remove documentation

20 months agofoot_filter: remove
Baptiste Daroussin [Tue, 17 Sep 2024 14:15:01 +0000 (16:15 +0200)] 
foot_filter: remove

this is too naive and cannot cope with the complexity of emails.
Either mails are restricted to be plain/text and control/footer is
enough or preprocess with ah external program the email, this work
does not belong directly to mlmmj and I don't intend into maintaining
this code.

Fixes: #23
20 months agosubscribefunc: ensure we have an address to (un)subscribe
Baptiste Daroussin [Tue, 17 Sep 2024 14:14:14 +0000 (16:14 +0200)] 
subscribefunc: ensure we have an address to (un)subscribe