History log of /openbsd-current/usr.sbin/smtpd/mail.maildir.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.17 15-May-2023 op

cast to '(long long)' instead of '(long long int)'

while here adjust the spacing in some of the touched lines.
requested by deraadt@, ok tb@


# 1.16 10-May-2023 op

add a few missing headers, reduces the diff with -portable

ok millert@


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.15 14-Jun-2021 eric

add required headers for smtpd.h and remove unnecessary ones in other files.

ok jung@


Revision tags: OPENBSD_6_9_BASE
# 1.14 23-Jan-2021 rob

Remove unused variables found by clang. Additional unused var spotted by eric@.

OK mvs@, eric@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-Sep-2019 martijn

Allow maildir and mbox MDAs to tempfail on situations that might be
resolved over time.

While here remove mkdirs component from utils.c, which isn't used anywhere.

OK gilles@, millert@


# 1.12 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.11 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_5_BASE
# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.15 14-Jun-2021 eric

add required headers for smtpd.h and remove unnecessary ones in other files.

ok jung@


Revision tags: OPENBSD_6_9_BASE
# 1.14 23-Jan-2021 rob

Remove unused variables found by clang. Additional unused var spotted by eric@.

OK mvs@, eric@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-Sep-2019 martijn

Allow maildir and mbox MDAs to tempfail on situations that might be
resolved over time.

While here remove mkdirs component from utils.c, which isn't used anywhere.

OK gilles@, millert@


# 1.12 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.11 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_5_BASE
# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.14 23-Jan-2021 rob

Remove unused variables found by clang. Additional unused var spotted by eric@.

OK mvs@, eric@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-Sep-2019 martijn

Allow maildir and mbox MDAs to tempfail on situations that might be
resolved over time.

While here remove mkdirs component from utils.c, which isn't used anywhere.

OK gilles@, millert@


# 1.12 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.11 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_5_BASE
# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.13 30-Sep-2019 martijn

Allow maildir and mbox MDAs to tempfail on situations that might be
resolved over time.

While here remove mkdirs component from utils.c, which isn't used anywhere.

OK gilles@, millert@


# 1.12 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.11 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_5_BASE
# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.12 03-Jul-2019 deraadt

snprintf/vsnprintf return < 0 on error, rather than -1.


# 1.11 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_5_BASE
# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.11 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_5_BASE
# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.10 20-Dec-2018 gilles

use HOST_NAME_MAX+1 instead of MAXHOSTNAMELEN, also avoids including the
sys/param.h header


# 1.9 20-Dec-2018 gilles

use the machine hostname, not localhost, in mail.maildir.c

spotted and ok tedu@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.8 25-Nov-2018 gilles

teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.7 24-Oct-2018 gilles

missing header


Revision tags: OPENBSD_6_4_BASE
# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.6 30-May-2018 gilles

when path is too long, display it in error message

suggested by millert@


# 1.5 30-May-2018 gilles

teach mail.maildir how to junk mails if -j option is set and X-Spam is
positive, this can be enabled with the 'junk' option in maildir action

ok eric@


# 1.4 29-May-2018 gilles

simplify mail.maildir as well as the parse.y glue

ok eric@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


# 1.3 28-Apr-2018 gilles

handle subaddresses

ok eric@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@


Revision tags: OPENBSD_6_2_BASE
# 1.2 09-Aug-2017 gilles

at the exception of mail.local, smtpd never executes an MDA as root.

the check is performed daemon-side before even forking the child process,
but let's also check euid in the mda we ship in case someone executes them
by hand and needs to see an explicit error message.


Revision tags: OPENBSD_6_1_BASE
# 1.1 14-Feb-2017 gilles

add standalone maildir MDA (work in progress) which will soon obsolete the
builtin delivery_maildir backend, + makefiles, not linked to build yet

ok eric@, sunil@