]> git.ipfire.org Git - thirdparty/mlmmj.git/log
thirdparty/mlmmj.git
3 years agogetaddrsfromfd: complete the test
Baptiste Daroussin [Wed, 28 Dec 2022 16:43:32 +0000 (17:43 +0100)] 
getaddrsfromfd: complete the test

Add a test case for empty lines
Add a test case for 0 max number of entries

3 years agogetaddrsfromfd: rewrite using getline
Baptiste Daroussin [Wed, 28 Dec 2022 16:40:46 +0000 (17:40 +0100)] 
getaddrsfromfd: rewrite using getline

It simplifies the code

3 years agogetaddrsfromfd: add a test suite
Baptiste Daroussin [Wed, 28 Dec 2022 16:15:55 +0000 (17:15 +0100)] 
getaddrsfromfd: add a test suite

3 years agoRewrite find_subscriber using getline(3) instead of mmap
Baptiste Daroussin [Wed, 28 Dec 2022 15:42:12 +0000 (16:42 +0100)] 
Rewrite find_subscriber using getline(3) instead of mmap

It simplifies greatly the code

3 years agois_subbed: only keep the filedescriptor aware version
Baptiste Daroussin [Wed, 28 Dec 2022 15:25:34 +0000 (16:25 +0100)] 
is_subbed: only keep the filedescriptor aware version

3 years agoAdd test suite for getlistdelim and getlistaddr
Baptiste Daroussin [Wed, 28 Dec 2022 15:14:50 +0000 (16:14 +0100)] 
Add test suite for getlistdelim and getlistaddr

3 years agoConvert textcontent and ctrlcontent to ctrlvalue
Baptiste Daroussin [Wed, 28 Dec 2022 13:51:51 +0000 (14:51 +0100)] 
Convert textcontent and ctrlcontent to ctrlvalue

3 years agogetlistdelim/getlistaddr: rewrite to make use of ctrlvalue()
Baptiste Daroussin [Wed, 28 Dec 2022 12:06:54 +0000 (13:06 +0100)] 
getlistdelim/getlistaddr: rewrite to make use of ctrlvalue()

3 years agostatctrl: ensure relative the ctrl file descriptor
Baptiste Daroussin [Wed, 28 Dec 2022 11:52:56 +0000 (12:52 +0100)] 
statctrl: ensure relative the ctrl file descriptor

3 years agoctrlvalue: use filedescriptor to access the content of the control directory
Baptiste Daroussin [Wed, 28 Dec 2022 11:24:44 +0000 (12:24 +0100)] 
ctrlvalue: use filedescriptor to access the content of the control directory

3 years agotohdr: to not use an intermediary variable to write the to header
Baptiste Daroussin [Wed, 28 Dec 2022 09:40:48 +0000 (10:40 +0100)] 
tohdr: to not use an intermediary variable to write the to header

3 years agoTests: add a test suite for the mail sending functions
Baptiste Daroussin [Wed, 28 Dec 2022 09:28:25 +0000 (10:28 +0100)] 
Tests: add a test suite for the mail sending functions

3 years agoIsolate functions to send email in order to be able to reuse them
Baptiste Daroussin [Tue, 27 Dec 2022 16:18:07 +0000 (17:18 +0100)] 
Isolate functions to send email in order to be able to reuse them

While here add a test function for do_bouncemail and fix an issue
which could allow to crash mlmmj-send.
Stop forking in do_bouncemail, it is not necessary

3 years ago100% testing on endsmtp
Baptiste Daroussin [Tue, 27 Dec 2022 14:49:30 +0000 (15:49 +0100)] 
100% testing on endsmtp

3 years agosmtp: add more test
Baptiste Daroussin [Tue, 27 Dec 2022 14:42:24 +0000 (15:42 +0100)] 
smtp: add more test

3 years agomlmmj-bounce: make sure mlmmj-bounce is never called directly
Baptiste Daroussin [Tue, 27 Dec 2022 13:29:25 +0000 (14:29 +0100)] 
mlmmj-bounce: make sure mlmmj-bounce is never called directly

3 years agofactorize the code to save the last bounced mail
Baptiste Daroussin [Tue, 27 Dec 2022 13:04:02 +0000 (14:04 +0100)] 
factorize the code to save the last bounced mail

3 years agomlmmj-send: allow to be run from absolute path
Baptiste Daroussin [Tue, 27 Dec 2022 11:37:37 +0000 (12:37 +0100)] 
mlmmj-send: allow to be run from absolute path

mlmmj-send does not call anymore any external program

3 years agomlmmj-send: use file descriptors when easily possible
Baptiste Daroussin [Tue, 27 Dec 2022 11:06:30 +0000 (12:06 +0100)] 
mlmmj-send: use file descriptors when easily possible

3 years agomlmmj-bounce: factorize code to make it reusable
Baptiste Daroussin [Tue, 27 Dec 2022 11:00:53 +0000 (12:00 +0100)] 
mlmmj-bounce: factorize code to make it reusable

Add test suite for mlmmj-bounce

3 years agoadd is_subbedat which deals with file descriptors
Baptiste Daroussin [Tue, 27 Dec 2022 09:13:58 +0000 (10:13 +0100)] 
add is_subbedat which deals with file descriptors

3 years agoRemove useless variable in test
Baptiste Daroussin [Tue, 27 Dec 2022 08:27:03 +0000 (09:27 +0100)] 
Remove useless variable in test

3 years agosmtp: add simple tests about initsmtp and endsmtp
Baptiste Daroussin [Tue, 27 Dec 2022 08:25:09 +0000 (09:25 +0100)] 
smtp: add simple tests about initsmtp and endsmtp

3 years agoIsolate smtp code to allow reuse and add test for it
Baptiste Daroussin [Mon, 26 Dec 2022 16:26:35 +0000 (17:26 +0100)] 
Isolate smtp code to allow reuse and add test for it

3 years agoFix use after free
Baptiste Daroussin [Mon, 26 Dec 2022 15:57:54 +0000 (16:57 +0100)] 
Fix use after free

3 years agoapply fgetlistdelim
Baptiste Daroussin [Mon, 26 Dec 2022 15:57:06 +0000 (16:57 +0100)] 
apply fgetlistdelim

3 years agofgetlistdelim, read the delimiter from control with fd
Baptiste Daroussin [Mon, 26 Dec 2022 15:53:27 +0000 (16:53 +0100)] 
fgetlistdelim, read the delimiter from control with fd

3 years agoapply fgetlistaddr
Baptiste Daroussin [Mon, 26 Dec 2022 15:43:32 +0000 (16:43 +0100)] 
apply fgetlistaddr

3 years agofgetlistaddr: add a filedescriptor only version of getlistaddr
Baptiste Daroussin [Mon, 26 Dec 2022 15:35:43 +0000 (16:35 +0100)] 
fgetlistaddr: add a filedescriptor only version of getlistaddr

which reduces memory manipulation

3 years agoSimplify genlistfqdn and add test for it
Baptiste Daroussin [Mon, 26 Dec 2022 15:29:50 +0000 (16:29 +0100)] 
Simplify genlistfqdn and add test for it

3 years agoFix genlistname regression and add a test
Baptiste Daroussin [Mon, 26 Dec 2022 15:26:53 +0000 (16:26 +0100)] 
Fix genlistname regression and add a test

3 years agomlmmj-unsub: use file descriptors where possible
Baptiste Daroussin [Mon, 26 Dec 2022 15:09:10 +0000 (16:09 +0100)] 
mlmmj-unsub: use file descriptors where possible

3 years agomlmmjsub: use open_subscriber_directory
Baptiste Daroussin [Mon, 26 Dec 2022 14:57:17 +0000 (15:57 +0100)] 
mlmmjsub: use open_subscriber_directory

3 years agomlmmj-sub: preopen listdir and control dir
Baptiste Daroussin [Mon, 26 Dec 2022 14:53:30 +0000 (15:53 +0100)] 
mlmmj-sub: preopen listdir and control dir

It allows to manipulate reduce the close/open dance on those file
descriptors and reduce memory manipulation

3 years agostatctrl: add a version of statctrl using file descriptors
Baptiste Daroussin [Mon, 26 Dec 2022 14:49:41 +0000 (15:49 +0100)] 
statctrl: add a version of statctrl using file descriptors

3 years agomlmmj-sub: stop manipulating memory when subscribing
Baptiste Daroussin [Mon, 26 Dec 2022 14:35:14 +0000 (15:35 +0100)] 
mlmmj-sub: stop manipulating memory when subscribing

prefer file descriptors

3 years agomlmmj-sub: stop forking mlmmj-unsub to unscrubscribe
Baptiste Daroussin [Mon, 26 Dec 2022 14:23:52 +0000 (15:23 +0100)] 
mlmmj-sub: stop forking mlmmj-unsub to unscrubscribe

3 years agomlmmj-sub: add tests to check unsubscribtion of extra subscriptions
Baptiste Daroussin [Mon, 26 Dec 2022 14:17:39 +0000 (15:17 +0100)] 
mlmmj-sub: add tests to check unsubscribtion of extra subscriptions

3 years agotests: remove useless lines
Baptiste Daroussin [Mon, 26 Dec 2022 14:10:27 +0000 (15:10 +0100)] 
tests: remove useless lines

3 years agomlmmj-sub: add a couple of test with -b
Baptiste Daroussin [Mon, 26 Dec 2022 14:08:45 +0000 (15:08 +0100)] 
mlmmj-sub: add a couple of test with -b

3 years agois_subbed: do not manipulate memory, prefer file descriptor
Baptiste Daroussin [Mon, 26 Dec 2022 13:56:23 +0000 (14:56 +0100)] 
is_subbed: do not manipulate memory, prefer file descriptor

3 years agolistcontrol: factorize subscribtion confirmation code
Baptiste Daroussin [Mon, 26 Dec 2022 13:32:57 +0000 (14:32 +0100)] 
listcontrol: factorize subscribtion confirmation code

3 years agostatctrl: fix typo
Baptiste Daroussin [Mon, 26 Dec 2022 13:16:36 +0000 (14:16 +0100)] 
statctrl: fix typo

3 years agostatctrl: convert to stdbool and eliminate the use of concatstr
Baptiste Daroussin [Mon, 26 Dec 2022 13:10:35 +0000 (14:10 +0100)] 
statctrl: convert to stdbool and eliminate the use of concatstr

3 years agomlmmj-sub: eliminate useless intermediary variable
Baptiste Daroussin [Mon, 26 Dec 2022 13:10:04 +0000 (14:10 +0100)] 
mlmmj-sub: eliminate useless intermediary variable

3 years agomlmmj-unsub: readd lines removed by accidents
Baptiste Daroussin [Mon, 26 Dec 2022 12:49:01 +0000 (13:49 +0100)] 
mlmmj-unsub: readd lines removed by accidents

3 years agotests: fix init_sock on linux
Baptiste Daroussin [Mon, 5 Dec 2022 13:04:22 +0000 (14:04 +0100)] 
tests: fix init_sock on linux

3 years agotests: split digests and skip test which cannot be run as root
Baptiste Daroussin [Mon, 5 Dec 2022 12:27:08 +0000 (13:27 +0100)] 
tests: split digests and skip test which cannot be run as root

3 years agotests: split mlmmj-maintd "basic" tests to ease maintenance
Baptiste Daroussin [Mon, 5 Dec 2022 12:21:03 +0000 (13:21 +0100)] 
tests: split mlmmj-maintd "basic" tests to ease maintenance

3 years agotests: skip tests that cannot be passed as root, when run as root
Baptiste Daroussin [Mon, 5 Dec 2022 09:52:28 +0000 (10:52 +0100)] 
tests: skip tests that cannot be passed as root, when run as root

3 years agotests: split too long mlmmj-maintd tests to ease debug
Baptiste Daroussin [Mon, 5 Dec 2022 09:48:10 +0000 (10:48 +0100)] 
tests: split too long mlmmj-maintd tests to ease debug

3 years agoChangeuid: only change uid if actually needed
Baptiste Daroussin [Mon, 5 Dec 2022 09:11:57 +0000 (10:11 +0100)] 
Changeuid: only change uid if actually needed

3 years agoconfigure.ac: remove useless checks
Baptiste Daroussin [Mon, 5 Dec 2022 08:29:12 +0000 (09:29 +0100)] 
configure.ac: remove useless checks

3 years agoRevert "web: remove perl and php frontend"
Baptiste Daroussin [Mon, 5 Dec 2022 08:13:05 +0000 (09:13 +0100)] 
Revert "web: remove perl and php frontend"

This reverts commit 15152c0f3087e6fbfeac616d44915a6edd033c9d.

Keep the contrib for now, we will do the cleanup later

3 years agoweb: remove perl and php frontend
Baptiste Daroussin [Fri, 2 Dec 2022 16:08:41 +0000 (17:08 +0100)] 
web: remove perl and php frontend

I have no intention to maintain them

3 years agocleanup: eliminate unused parameter
Baptiste Daroussin [Fri, 2 Dec 2022 15:55:47 +0000 (16:55 +0100)] 
cleanup: eliminate unused parameter

3 years agoRelease 1.4.0.a1 RELEASE_1_4_0a1
Baptiste Daroussin [Fri, 2 Dec 2022 14:09:27 +0000 (15:09 +0100)] 
Release 1.4.0.a1

3 years agoModernize automake
Baptiste Daroussin [Fri, 2 Dec 2022 14:19:20 +0000 (15:19 +0100)] 
Modernize automake

3 years agoincindexfile: fix typo
Baptiste Daroussin [Fri, 2 Dec 2022 12:56:01 +0000 (13:56 +0100)] 
incindexfile: fix typo

3 years agolocking: use a more portable mechanism
Baptiste Daroussin [Fri, 2 Dec 2022 12:55:17 +0000 (13:55 +0100)] 
locking: use a more portable mechanism

3 years agotests: fix hardcoded path
Baptiste Daroussin [Fri, 2 Dec 2022 10:48:10 +0000 (11:48 +0100)] 
tests: fix hardcoded path

3 years agoglibc: fix warning with glibc which requires _GNU_SOURCE for asprintf
Baptiste Daroussin [Fri, 2 Dec 2022 09:18:44 +0000 (10:18 +0100)] 
glibc: fix warning with glibc which requires _GNU_SOURCE for asprintf

3 years agotests: fix tests on alpine
Baptiste Daroussin [Fri, 2 Dec 2022 09:18:30 +0000 (10:18 +0100)] 
tests: fix tests on alpine

3 years agoREADME: Let know new user that project requires a listtexts 1/head
Aurelien Rougemont [Thu, 24 Nov 2022 13:56:30 +0000 (14:56 +0100)] 
README: Let know new user that project requires a listtexts

  Without cloning the listtexts repository you just can't pass the
  autoreconf -i stage.

3 years agomlmmj-maintd: drop closefrom(2)
Baptiste Daroussin [Thu, 10 Nov 2022 17:05:08 +0000 (18:05 +0100)] 
mlmmj-maintd: drop closefrom(2)

At this point it is not useful, it is up the progrom that execute
mlmmj-maintd to not leak its fd.

3 years agoincindexfile: simplify code
Baptiste Daroussin [Thu, 10 Nov 2022 17:01:12 +0000 (18:01 +0100)] 
incindexfile: simplify code

3 years agoportability: include stdint.h to make sure uintmax_t is known
Baptiste Daroussin [Thu, 10 Nov 2022 15:48:22 +0000 (16:48 +0100)] 
portability: include stdint.h to make sure uintmax_t is known

3 years agoportability: handle systems without O_EXLOCK
Baptiste Daroussin [Thu, 10 Nov 2022 15:25:05 +0000 (16:25 +0100)] 
portability: handle systems without O_EXLOCK

3 years agoportability: use limits.h not sys/limits.h
Baptiste Daroussin [Tue, 8 Nov 2022 12:34:01 +0000 (13:34 +0100)] 
portability: use limits.h not sys/limits.h

3 years agoRemove versionning from README and fix
Baptiste Daroussin [Tue, 8 Nov 2022 12:22:00 +0000 (13:22 +0100)] 
Remove versionning from README and fix

3 years agoRemove test which is now performed earlier
Baptiste Daroussin [Fri, 28 Oct 2022 15:02:40 +0000 (17:02 +0200)] 
Remove test which is now performed earlier

3 years agoRemove useless header
Baptiste Daroussin [Fri, 28 Oct 2022 14:47:52 +0000 (16:47 +0200)] 
Remove useless header

3 years agomlmmj-maintd: remove write only variable
Baptiste Daroussin [Fri, 28 Oct 2022 14:46:54 +0000 (16:46 +0200)] 
mlmmj-maintd: remove write only variable

3 years agoRename do_unsubscribe into unsubsribe
Baptiste Daroussin [Fri, 28 Oct 2022 14:40:59 +0000 (16:40 +0200)] 
Rename do_unsubscribe into unsubsribe

3 years agomlmmj-unsub: make use of do_unsubscribe
Baptiste Daroussin [Fri, 28 Oct 2022 14:37:23 +0000 (16:37 +0200)] 
mlmmj-unsub: make use of do_unsubscribe

3 years agoAdd test for mlmmj-sub and mlmmj-unsub
Baptiste Daroussin [Fri, 28 Oct 2022 14:22:16 +0000 (16:22 +0200)] 
Add test for mlmmj-sub and mlmmj-unsub

while here validate that input email has a '@'

3 years agomlmmj-send: do not test version number
Baptiste Daroussin [Fri, 28 Oct 2022 13:49:42 +0000 (15:49 +0200)] 
mlmmj-send: do not test version number

3 years agomlmmj-unsub: remove the now unused -b option
Baptiste Daroussin [Fri, 28 Oct 2022 13:35:26 +0000 (15:35 +0200)] 
mlmmj-unsub: remove the now unused -b option

3 years agomlmmj-maintd: improve error handling of bouncers unsubscribtion
Baptiste Daroussin [Fri, 28 Oct 2022 13:29:43 +0000 (15:29 +0200)] 
mlmmj-maintd: improve error handling of bouncers unsubscribtion

Now report an error if something went wrong, and keep the bounce
file around to make sure that maintd get another chance and
unsubscribing bouncers. (In the hope that an administrator will see
the logs and fix what needs to be fixed)

3 years agoAdd function to unsubscribe people
Baptiste Daroussin [Fri, 28 Oct 2022 12:48:55 +0000 (14:48 +0200)] 
Add function to unsubscribe people

Add the testsuite that goes with it.

3 years agomlmmj-maintd: cover with test the code to unsubscribe bouncers
Baptiste Daroussin [Thu, 27 Oct 2022 14:49:37 +0000 (16:49 +0200)] 
mlmmj-maintd: cover with test the code to unsubscribe bouncers

3 years agomlmmj-maintd: use the generic bouncetime extracter
Baptiste Daroussin [Thu, 27 Oct 2022 14:27:02 +0000 (16:27 +0200)] 
mlmmj-maintd: use the generic bouncetime extracter

3 years agomlmmj: add a function to extract bouncetime from bounce file
Baptiste Daroussin [Thu, 27 Oct 2022 14:21:44 +0000 (16:21 +0200)] 
mlmmj: add a function to extract bouncetime from bounce file

Add a unit test to validate it

3 years agodeindent
Baptiste Daroussin [Thu, 27 Oct 2022 12:57:41 +0000 (14:57 +0200)] 
deindent

3 years agolastdigest: add a function to parse the line and its unit test
Baptiste Daroussin [Thu, 27 Oct 2022 12:50:40 +0000 (14:50 +0200)] 
lastdigest: add a function to parse the line and its unit test

3 years agomlmmj-maintd: replace a bunch of stat with access
Baptiste Daroussin [Thu, 27 Oct 2022 10:04:37 +0000 (12:04 +0200)] 
mlmmj-maintd: replace a bunch of stat with access

3 years agomlmmj-maintd: remove useless stat
Baptiste Daroussin [Thu, 27 Oct 2022 09:56:52 +0000 (11:56 +0200)] 
mlmmj-maintd: remove useless stat

the directory is anyway open just after and if failed the content is
ignored

3 years agomlmmj-maintd: replace stat with access to verify the existance of a file
Baptiste Daroussin [Thu, 27 Oct 2022 09:55:47 +0000 (11:55 +0200)] 
mlmmj-maintd: replace stat with access to verify the existance of a file

3 years agomlmmj-maintd: add a test in case the moderation directory is missing
Baptiste Daroussin [Thu, 27 Oct 2022 09:53:29 +0000 (11:53 +0200)] 
mlmmj-maintd: add a test in case the moderation directory is missing

3 years agomlmmj-maintd: reduce noise in logging if the log file cannot be created
Baptiste Daroussin [Thu, 27 Oct 2022 09:26:41 +0000 (11:26 +0200)] 
mlmmj-maintd: reduce noise in logging if the log file cannot be created

While here add a unit test

3 years agomlmmj-maintd: test when trying to open an inexisting directory
Baptiste Daroussin [Thu, 27 Oct 2022 09:05:51 +0000 (11:05 +0200)] 
mlmmj-maintd: test when trying to open an inexisting directory

3 years agolog_activate_stderr: reopen logs when changing the options
Baptiste Daroussin [Thu, 27 Oct 2022 09:01:28 +0000 (11:01 +0200)] 
log_activate_stderr: reopen logs when changing the options

3 years agomlmmj-maintd: rework the log mechanism
Baptiste Daroussin [Wed, 26 Oct 2022 14:13:46 +0000 (16:13 +0200)] 
mlmmj-maintd: rework the log mechanism

Do not log to syslog errors which may pollute it.
Now it logs locally information about what happen and only log to
syslog an error if something went wrong pointing at the per
mailing list log file

3 years agolog_error: add a less noisy syslog logging function
Baptiste Daroussin [Wed, 26 Oct 2022 14:51:39 +0000 (16:51 +0200)] 
log_error: add a less noisy syslog logging function

3 years agolog_error: rework syslog
Baptiste Daroussin [Wed, 26 Oct 2022 13:36:24 +0000 (15:36 +0200)] 
log_error: rework syslog

- always open/close syslog when the log_name is changed
- add a new function to allow writing the log to stderr if needed
- log_error does not have anymore any length limit anymore

3 years agomlmmj-maintd: convert daemonize into a boolean
Baptiste Daroussin [Wed, 26 Oct 2022 13:30:29 +0000 (15:30 +0200)] 
mlmmj-maintd: convert daemonize into a boolean

While here simplify the code a bit

3 years agomlmmj-maintd: include the mailing list path in the log name
Baptiste Daroussin [Wed, 26 Oct 2022 13:08:22 +0000 (15:08 +0200)] 
mlmmj-maintd: include the mailing list path in the log name

3 years agolog: add a function to build dynamically the log name
Baptiste Daroussin [Wed, 26 Oct 2022 13:07:53 +0000 (15:07 +0200)] 
log: add a function to build dynamically the log name

3 years agotests: add a small testsuite for mlmmj-maintd
Baptiste Daroussin [Wed, 26 Oct 2022 12:36:47 +0000 (14:36 +0200)] 
tests: add a small testsuite for mlmmj-maintd

3 years agoconfigure: add --enable-coverage
Baptiste Daroussin [Wed, 26 Oct 2022 12:31:43 +0000 (14:31 +0200)] 
configure: add --enable-coverage

This option adds CLFAGS and LDFLAGS which are necessary to extract
the code coverage informations