]> git.ipfire.org Git - thirdparty/mlmmj.git/log
thirdparty/mlmmj.git
2 years agolistcontrol: stop calling mlmmj-send for +get-<index>@
Baptiste Daroussin [Wed, 12 Apr 2023 16:45:08 +0000 (18:45 +0200)] 
listcontrol: stop calling mlmmj-send for +get-<index>@

This rewrite allow to reduce memory allocation and prevent fork/exec

move some functions from mlmmj-send to a library to allow reuse,
Duplicate bounce_from_adr temporary to allow rewrite using struct ml

2 years agomailing+get: add tests
Baptiste Daroussin [Wed, 12 Apr 2023 16:21:01 +0000 (18:21 +0200)] 
mailing+get: add tests

2 years agolistcontrol: remove useless intermediary variables
Baptiste Daroussin [Wed, 12 Apr 2023 16:15:39 +0000 (18:15 +0200)] 
listcontrol: remove useless intermediary variables

2 years agolistcontrol: simplify verifycation that param is digit only
Baptiste Daroussin [Wed, 12 Apr 2023 16:13:09 +0000 (18:13 +0200)] 
listcontrol: simplify verifycation that param is digit only

while here do not kill the program is the requested archive is not
there but gracefully die

2 years agomlmmj-send: xstrdup already abort in case of issue with memory
Baptiste Daroussin [Wed, 12 Apr 2023 15:54:46 +0000 (17:54 +0200)] 
mlmmj-send: xstrdup already abort in case of issue with memory

2 years agomailing+faq: add simple tests
Baptiste Daroussin [Wed, 12 Apr 2023 15:45:56 +0000 (17:45 +0200)] 
mailing+faq: add simple tests

2 years agomlmmj-process: fix typo
Baptiste Daroussin [Wed, 12 Apr 2023 15:45:30 +0000 (17:45 +0200)] 
mlmmj-process: fix typo

2 years agomailing+help: add testcase
Baptiste Daroussin [Wed, 12 Apr 2023 13:25:56 +0000 (15:25 +0200)] 
mailing+help: add testcase

2 years agolistcontrol: fix indentation
Baptiste Daroussin [Wed, 12 Apr 2023 13:19:43 +0000 (15:19 +0200)] 
listcontrol: fix indentation

2 years agomailing+list: simplify the code
Baptiste Daroussin [Wed, 12 Apr 2023 13:17:19 +0000 (15:17 +0200)] 
mailing+list: simplify the code

2 years agoctrlvalues: add a function to only check if an entry is contained
Baptiste Daroussin [Wed, 12 Apr 2023 13:10:20 +0000 (15:10 +0200)] 
ctrlvalues: add a function to only check if an entry is contained

this allows to reduce memory usage and simplify code

2 years agolistcontrol: reduce the number of branches by 1
Baptiste Daroussin [Wed, 12 Apr 2023 12:46:15 +0000 (14:46 +0200)] 
listcontrol: reduce the number of branches by 1

2 years agolistcontrol: add test for mailinglist+list@
Baptiste Daroussin [Wed, 12 Apr 2023 12:11:23 +0000 (14:11 +0200)] 
listcontrol: add test for mailinglist+list@

2 years agolistcontrol: remove the requirement to execute mlmmj-unsub
Baptiste Daroussin [Wed, 12 Apr 2023 10:18:19 +0000 (12:18 +0200)] 
listcontrol: remove the requirement to execute mlmmj-unsub

2 years agoconfunsub: factorize code
Baptiste Daroussin [Wed, 12 Apr 2023 10:09:19 +0000 (12:09 +0200)] 
confunsub: factorize code

2 years agosubscribe: cover confunsub-digest and confunsub-nomail
Baptiste Daroussin [Wed, 12 Apr 2023 09:59:42 +0000 (11:59 +0200)] 
subscribe: cover confunsub-digest and confunsub-nomail

2 years agosubscribe: more complete test coverage
Baptiste Daroussin [Wed, 12 Apr 2023 09:51:32 +0000 (11:51 +0200)] 
subscribe: more complete test coverage

2 years agomlmmj-sub: use stdbool
Baptiste Daroussin [Wed, 12 Apr 2023 09:41:35 +0000 (11:41 +0200)] 
mlmmj-sub: use stdbool

2 years agounsubscription: plug memory leaks
Baptiste Daroussin [Wed, 12 Apr 2023 09:38:55 +0000 (11:38 +0200)] 
unsubscription: plug memory leaks

2 years agosubscribe: cover subscribtion to both normal and digest mails
Baptiste Daroussin [Wed, 12 Apr 2023 09:24:03 +0000 (11:24 +0200)] 
subscribe: cover subscribtion to both normal and digest mails

2 years agosubscribe: cover nomail and digest mail with testcase
Baptiste Daroussin [Wed, 12 Apr 2023 09:15:55 +0000 (11:15 +0200)] 
subscribe: cover nomail and digest mail with testcase

2 years agolistcontrol: fix subscribtion confirmations
Baptiste Daroussin [Wed, 12 Apr 2023 09:06:56 +0000 (11:06 +0200)] 
listcontrol: fix subscribtion confirmations

2 years agolistcontrol: stop forking when unsubscribing
Baptiste Daroussin [Wed, 12 Apr 2023 08:47:51 +0000 (10:47 +0200)] 
listcontrol: stop forking when unsubscribing

2 years agomlmmj-unsub: use stdbool everywhere
Baptiste Daroussin [Wed, 12 Apr 2023 08:16:14 +0000 (10:16 +0200)] 
mlmmj-unsub: use stdbool everywhere

2 years agomlmmj-unsub: indentation fix
Baptiste Daroussin [Wed, 12 Apr 2023 08:14:10 +0000 (10:14 +0200)] 
mlmmj-unsub: indentation fix

2 years agosubscribtion: reduce confusion
Baptiste Daroussin [Wed, 12 Apr 2023 07:56:05 +0000 (09:56 +0200)] 
subscribtion: reduce confusion

Reduce confusion by renaming variables and function to more obvious name

2 years agocopy_file_range: deal with EXDEV
Baptiste Daroussin [Fri, 7 Apr 2023 12:47:30 +0000 (14:47 +0200)] 
copy_file_range: deal with EXDEV

in theory it is never supposed to happen, in practice it happened
on some version of the linux kernel.

2 years agosubscription: add end to end test
Baptiste Daroussin [Thu, 9 Mar 2023 08:26:20 +0000 (09:26 +0100)] 
subscription: add end to end test

2 years agosubscribtion cookie: properly remove the cookie
Baptiste Daroussin [Thu, 9 Mar 2023 08:25:28 +0000 (09:25 +0100)] 
subscribtion cookie: properly remove the cookie

2 years agosubconfirm: fix unsubscribe email
Baptiste Daroussin [Thu, 9 Mar 2023 08:07:54 +0000 (09:07 +0100)] 
subconfirm: fix unsubscribe email

2 years agomlmmj-sub: stop forking to send subscription confirmation
Baptiste Daroussin [Wed, 8 Mar 2023 17:29:44 +0000 (18:29 +0100)] 
mlmmj-sub: stop forking to send subscription confirmation

2 years agomlmmj-process: fix typo
Baptiste Daroussin [Wed, 8 Mar 2023 17:15:03 +0000 (18:15 +0100)] 
mlmmj-process: fix typo

2 years agomlmmj-process: avoid useless memory allocation
Baptiste Daroussin [Wed, 8 Mar 2023 17:14:23 +0000 (18:14 +0100)] 
mlmmj-process: avoid useless memory allocation

2 years agomlmmj-process: add tests for simple reception and subscription
Baptiste Daroussin [Wed, 8 Mar 2023 17:05:52 +0000 (18:05 +0100)] 
mlmmj-process: add tests for simple reception and subscription

While here ensure we exit with failures in case we have a bad envelop

2 years agomlmmj-send: remove non portable header
Baptiste Daroussin [Wed, 8 Mar 2023 16:24:24 +0000 (17:24 +0100)] 
mlmmj-send: remove non portable header

2 years agomlmmj-maintd: resend_queue: add a missing test
Baptiste Daroussin [Wed, 8 Mar 2023 14:37:47 +0000 (15:37 +0100)] 
mlmmj-maintd: resend_queue: add a missing test

2 years agomlmmj-maintd: resend_queue: fully test
Baptiste Daroussin [Wed, 8 Mar 2023 14:34:19 +0000 (15:34 +0100)] 
mlmmj-maintd: resend_queue: fully test

2 years agomlmmj-maintd: resend_queue: fix freeing non malloced memory
Baptiste Daroussin [Wed, 8 Mar 2023 12:30:48 +0000 (13:30 +0100)] 
mlmmj-maintd: resend_queue: fix freeing non malloced memory

2 years agomlmmj-maintd: resend_requeue: cleanup stale directory
Baptiste Daroussin [Wed, 8 Mar 2023 11:07:07 +0000 (12:07 +0100)] 
mlmmj-maintd: resend_requeue: cleanup stale directory

Now that we cleanly control the life cycle of our files, cleanup
the stale directory after ourself.

2 years agomlmmj-maintd: extend the test to cover addtohdr
Baptiste Daroussin [Wed, 8 Mar 2023 11:03:34 +0000 (12:03 +0100)] 
mlmmj-maintd: extend the test to cover addtohdr

2 years agomlmmj-send: document accepting -m as file descriptor
Baptiste Daroussin [Wed, 8 Mar 2023 10:40:34 +0000 (11:40 +0100)] 
mlmmj-send: document accepting -m as file descriptor

2 years agomlmmj-maintd: pass the mailfile to resend via file descriptor
Baptiste Daroussin [Wed, 8 Mar 2023 10:37:49 +0000 (11:37 +0100)] 
mlmmj-maintd: pass the mailfile to resend via file descriptor

This reduces the memory allocation and also plug some memory leak

2 years agomlmmj-maintd: fix and test resend_requeue
Baptiste Daroussin [Wed, 8 Mar 2023 10:08:56 +0000 (11:08 +0100)] 
mlmmj-maintd: fix and test resend_requeue

Pass the list of target mails to resend to via file descriptor:
This allows to stop creating a "resending" file and controls the life
cycle of the mail to be resent (deleted or not) from the mmlmmj-maintd
code

2 years agomlmmj-send: multiple fixes:
Baptiste Daroussin [Wed, 8 Mar 2023 10:08:08 +0000 (11:08 +0100)] 
mlmmj-send: multiple fixes:

fix possible use heap-after-free
allow passing mailarchive via file descriptor

2 years agomlmmj-process: pass the owner via file descriptor to mlmmj-send
Baptiste Daroussin [Wed, 8 Mar 2023 10:07:26 +0000 (11:07 +0100)] 
mlmmj-process: pass the owner via file descriptor to mlmmj-send

2 years agorequemail: fix double-free
Baptiste Daroussin [Wed, 8 Mar 2023 09:41:51 +0000 (10:41 +0100)] 
requemail: fix double-free

2 years agoprepstdreply: Fix corruption prefix pointer
Baptiste Daroussin [Wed, 8 Mar 2023 09:39:03 +0000 (10:39 +0100)] 
prepstdreply: Fix corruption prefix pointer

2 years agomlmmj-send: Pass file descriptor to mlmmj-send and reduce the number of IO
Baptiste Daroussin [Tue, 7 Mar 2023 17:11:22 +0000 (18:11 +0100)] 
mlmmj-send: Pass file descriptor to mlmmj-send and reduce the number of IO

2 years agomlmmj-send: accept file descriptor number as -s argument
Baptiste Daroussin [Tue, 7 Mar 2023 17:05:56 +0000 (18:05 +0100)] 
mlmmj-send: accept file descriptor number as -s argument

2 years agoprepstdreply: use stdio and getline(3) instead of mygetline()
Baptiste Daroussin [Tue, 7 Mar 2023 14:44:47 +0000 (15:44 +0100)] 
prepstdreply: use stdio and getline(3) instead of mygetline()

2 years agomlmmj-sub: fix error in error message
Baptiste Daroussin [Tue, 7 Mar 2023 10:04:25 +0000 (11:04 +0100)] 
mlmmj-sub: fix error in error message

2 years agolistcontrol: mark fallthrough to appease gcc12
Baptiste Daroussin [Tue, 7 Mar 2023 10:03:16 +0000 (11:03 +0100)] 
listcontrol: mark fallthrough to appease gcc12

2 years agomygetline: fix type for return value of read(2)
Baptiste Daroussin [Tue, 7 Mar 2023 09:59:59 +0000 (10:59 +0100)] 
mygetline: fix type for return value of read(2)

2 years agoconcatstr: remove, all use case has been replaced
Baptiste Daroussin [Mon, 6 Mar 2023 21:15:09 +0000 (22:15 +0100)] 
concatstr: remove, all use case has been replaced

2 years agoprepstdreply: replace concatstr with xasprintf
Baptiste Daroussin [Mon, 6 Mar 2023 21:08:16 +0000 (22:08 +0100)] 
prepstdreply: replace concatstr with xasprintf

2 years agorequeuemail: isolate test and fix regression
Baptiste Daroussin [Mon, 6 Mar 2023 13:19:37 +0000 (14:19 +0100)] 
requeuemail: isolate test and fix regression

2 years agomlmmj-sub: add a test for notifysub
Baptiste Daroussin [Mon, 6 Mar 2023 13:19:19 +0000 (14:19 +0100)] 
mlmmj-sub: add a test for notifysub

2 years agomlmmj-unsub: test notifysub
Baptiste Daroussin [Mon, 6 Mar 2023 10:22:58 +0000 (11:22 +0100)] 
mlmmj-unsub: test notifysub

2 years agoReplace many memset by initialisation inline at the declaration moment
Baptiste Daroussin [Thu, 2 Mar 2023 09:00:48 +0000 (10:00 +0100)] 
Replace many memset by initialisation inline at the declaration moment

While here, remove GNU extension only initialisation.

2 years agomlmmj-unsub: test unsubscription mail sent
Baptiste Daroussin [Fri, 17 Feb 2023 22:26:34 +0000 (23:26 +0100)] 
mlmmj-unsub: test unsubscription mail sent

2 years agomlmmj-sub: rewrite parsing subscription moderation
Baptiste Daroussin [Fri, 17 Feb 2023 21:36:29 +0000 (22:36 +0100)] 
mlmmj-sub: rewrite parsing subscription moderation

Rewrite around using getline(3)

2 years agomlmmj-sub: fix detecting the type of subscription when moderating
Baptiste Daroussin [Fri, 17 Feb 2023 21:27:59 +0000 (22:27 +0100)] 
mlmmj-sub: fix detecting the type of subscription when moderating

2 years agoremove old comments
liedekef [Fri, 17 Feb 2023 16:29:58 +0000 (17:29 +0100)] 
remove old comments

2 years agoupdate the php code to work with php 8, add the possibility to edit texts, see the...
liedekef [Fri, 17 Feb 2023 15:56:12 +0000 (16:56 +0100)] 
update the php code to work with php 8, add the possibility to edit texts, see the log and limit who can manage per list the settings or subscribers

2 years agoupdate the php code to work with php 8, add the possibility to edit texts, see the...
liedekef [Fri, 17 Feb 2023 15:55:54 +0000 (16:55 +0100)] 
update the php code to work with php 8, add the possibility to edit texts, see the log and limit who can manage per list the settings or subscribers

2 years agomlmmj-sub: simplifly code to map types and related strings
Baptiste Daroussin [Fri, 17 Feb 2023 19:39:05 +0000 (20:39 +0100)] 
mlmmj-sub: simplifly code to map types and related strings

2 years agomlmmj-sub: use xasprintf instead concatstr
Baptiste Daroussin [Fri, 17 Feb 2023 16:25:13 +0000 (17:25 +0100)] 
mlmmj-sub: use xasprintf instead concatstr

2 years agomlmmj-sub: prefer open_memstream over concatstr
Baptiste Daroussin [Fri, 17 Feb 2023 16:16:04 +0000 (17:16 +0100)] 
mlmmj-sub: prefer open_memstream over concatstr

2 years agomlmmj-sub: reduce memory allocation
Baptiste Daroussin [Fri, 17 Feb 2023 16:08:41 +0000 (17:08 +0100)] 
mlmmj-sub: reduce memory allocation

2 years agoprepstreply: fix regression
Baptiste Daroussin [Fri, 17 Feb 2023 15:35:47 +0000 (16:35 +0100)] 
prepstreply: fix regression

2 years agosend_mail: the file pointer can be reused
Baptiste Daroussin [Fri, 17 Feb 2023 15:35:36 +0000 (16:35 +0100)] 
send_mail: the file pointer can be reused

2 years agomlmmj-send: fix regression
Baptiste Daroussin [Fri, 17 Feb 2023 13:40:22 +0000 (14:40 +0100)] 
mlmmj-send: fix regression

2 years agoRevert "prepstdreply: use getline(3)"
Baptiste Daroussin [Fri, 17 Feb 2023 13:13:47 +0000 (14:13 +0100)] 
Revert "prepstdreply: use getline(3)"

This reverts commit 83d36de2a284ec62cf66ed7f128ee44fad66c65a.

2 years agomlmmj-sub: improve testing
Baptiste Daroussin [Fri, 17 Feb 2023 13:13:34 +0000 (14:13 +0100)] 
mlmmj-sub: improve testing

2 years agofakesmtpd: add a program to fake a smtpd server for testing purpose
Baptiste Daroussin [Fri, 17 Feb 2023 13:12:48 +0000 (14:12 +0100)] 
fakesmtpd: add a program to fake a smtpd server for testing purpose

2 years agomlmmj-sub: fix regressions
Baptiste Daroussin [Fri, 17 Feb 2023 13:12:13 +0000 (14:12 +0100)] 
mlmmj-sub: fix regressions

2 years agoendsmtp: remove debug
Baptiste Daroussin [Fri, 17 Feb 2023 09:04:58 +0000 (10:04 +0100)] 
endsmtp: remove debug

2 years agomailsending: always delete emails on success
Baptiste Daroussin [Thu, 16 Feb 2023 19:25:11 +0000 (20:25 +0100)] 
mailsending: always delete emails on success

2 years agomlmmj-send: -l 1 is not supported anymore
Baptiste Daroussin [Thu, 16 Feb 2023 15:07:25 +0000 (16:07 +0100)] 
mlmmj-send: -l 1 is not supported anymore

2 years agomlmmj-process: remove any call to mlmmj-send -l 1
Baptiste Daroussin [Thu, 16 Feb 2023 15:05:12 +0000 (16:05 +0100)] 
mlmmj-process: remove any call to mlmmj-send -l 1

2 years agomlmmj-maintd: sendqueue directly instead of calling mlmmj-send
Baptiste Daroussin [Thu, 16 Feb 2023 15:01:02 +0000 (16:01 +0100)] 
mlmmj-maintd: sendqueue directly instead of calling mlmmj-send

2 years agomlmmj-bounce: mlmmj-send -l 1 always exit success
Baptiste Daroussin [Thu, 16 Feb 2023 14:17:53 +0000 (15:17 +0100)] 
mlmmj-bounce: mlmmj-send -l 1 always exit success

2 years agosend_help: test, use send_mail and generalize its usage
Baptiste Daroussin [Thu, 16 Feb 2023 14:16:56 +0000 (15:16 +0100)] 
send_help: test, use send_mail and generalize its usage

2 years agolistcontrol: add basic tests
Baptiste Daroussin [Wed, 15 Feb 2023 18:58:13 +0000 (19:58 +0100)] 
listcontrol: add basic tests

2 years agomlmmj-unsub: can now be called from relative path
Baptiste Daroussin [Wed, 15 Feb 2023 14:23:35 +0000 (15:23 +0100)] 
mlmmj-unsub: can now be called from relative path

2 years agoconfig_sub: deduplicate and test code
Baptiste Daroussin [Wed, 15 Feb 2023 14:22:36 +0000 (15:22 +0100)] 
config_sub: deduplicate and test code

2 years agogenerate_subconfirm: deduplicate and test code
Baptiste Daroussin [Wed, 15 Feb 2023 14:02:23 +0000 (15:02 +0100)] 
generate_subconfirm: deduplicate and test code

2 years agogenerate_scubscription: deduplicate and test code
Baptiste Daroussin [Wed, 15 Feb 2023 13:13:24 +0000 (14:13 +0100)] 
generate_scubscription: deduplicate and test code

2 years agonotify-sub: do not call mlmmj-send anymore
Baptiste Daroussin [Wed, 15 Feb 2023 12:45:48 +0000 (13:45 +0100)] 
notify-sub: do not call mlmmj-send anymore

2 years agotest: add a helper function for any kind or email reception
Baptiste Daroussin [Wed, 15 Feb 2023 09:13:07 +0000 (10:13 +0100)] 
test: add a helper function for any kind or email reception

2 years agosend_single_mail: add tests and fix logic error
Baptiste Daroussin [Wed, 15 Feb 2023 08:47:24 +0000 (09:47 +0100)] 
send_single_mail: add tests and fix logic error

2 years agomlmmj-bounce: do not remove the previous probe
Baptiste Daroussin [Wed, 15 Feb 2023 08:01:27 +0000 (09:01 +0100)] 
mlmmj-bounce: do not remove the previous probe

When probing we are going to truncate the file if it already exists

2 years agomlmmj-bounce: fix typo
Baptiste Daroussin [Wed, 15 Feb 2023 08:00:39 +0000 (09:00 +0100)] 
mlmmj-bounce: fix typo

2 years agomlmmj-send: create function to deduplicate the code to save the queue
Baptiste Daroussin [Tue, 14 Feb 2023 16:47:04 +0000 (17:47 +0100)] 
mlmmj-send: create function to deduplicate the code to save the queue

2 years agomlmmj-bounce: fix error when converting to send_mail()
Baptiste Daroussin [Tue, 14 Feb 2023 16:46:34 +0000 (17:46 +0100)] 
mlmmj-bounce: fix error when converting to send_mail()

We actually needed to cleanup the bounce and not save the queue

2 years agosend_single_mail: add a helper to avoid duplicating code
Baptiste Daroussin [Tue, 14 Feb 2023 16:34:29 +0000 (17:34 +0100)] 
send_single_mail: add a helper to avoid duplicating code

2 years agotests: ignore gnu-zero-variadic-macro-arguments with clang
Baptiste Daroussin [Tue, 14 Feb 2023 14:57:35 +0000 (15:57 +0100)] 
tests: ignore gnu-zero-variadic-macro-arguments with clang

2 years agogcc: fix gcc12 warnings
Baptiste Daroussin [Tue, 14 Feb 2023 14:39:43 +0000 (15:39 +0100)] 
gcc: fix gcc12 warnings

2 years agounused: shut up the unused argument warning
Baptiste Daroussin [Tue, 14 Feb 2023 14:33:31 +0000 (15:33 +0100)] 
unused: shut up the unused argument warning

2 years agoadd missing c file
Baptiste Daroussin [Tue, 14 Feb 2023 14:26:02 +0000 (15:26 +0100)] 
add missing c file