OpenBSD CVS

CVS log for src/usr.sbin/smtpd/mail.lmtp.c


[BACK] Up to [local] / src / usr.sbin / smtpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 14 17:58:15 2021 UTC (2 years, 11 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, HEAD
Changes since 1.15: +0 -1 lines
Diff to previous 1.15 (colored)

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

ok jung@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jan 23 16:11:11 2021 UTC (3 years, 4 months ago) by rob
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored)

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

OK mvs@, eric@

Revision 1.14 / (download) - annotate - [select for diffs], Mon Mar 16 23:34:02 2020 UTC (4 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.13: +1 -0 lines
Diff to previous 1.13 (colored)

Initialize session.rcptto to NULL before parsing command line optinos.
Otherwise, if neither -r nor -u is specified, it will be used uninitialized.
Found by tobhe@; OK tobhe@ deraadt@

Revision 1.13 / (download) - annotate - [select for diffs], Sun Mar 15 16:34:57 2020 UTC (4 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Add missing casts to unsigned char when using ctype(3).
From Hiltjo Posthuma

Revision 1.12 / (download) - annotate - [select for diffs], Sun Feb 2 22:13:48 2020 UTC (4 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.11: +21 -5 lines
Diff to previous 1.11 (colored)

add SENDER to mda environment and teach lmtp to use that instead of command
line parameter. this allows simplifying lmtp command line and it would have
prevented the unpriv command exec for LMTP in recent advisory.

ok millert@ and jung@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 26 20:26:22 2019 UTC (4 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.10: +32 -19 lines
Diff to previous 1.10 (colored)

in mail.lmtp.c, split LMTP connection fd into two FILE * streams

diff from fgma on github

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 3 05:46:55 2019 UTC (4 years, 8 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.9: +1 -0 lines
Diff to previous 1.9 (colored)

free() destination server copy, not a real leak since the program is short
lived but still

Revision 1.9 / (download) - annotate - [select for diffs], Mon Aug 12 20:56:23 2019 UTC (4 years, 9 months ago) by tim
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

Prepend a dot to every line that starts with a dot -- not merely the
ones that consist of a single dot.

OK gilles@

Revision 1.8 / (download) - annotate - [select for diffs], Sun Aug 11 21:05:02 2019 UTC (4 years, 10 months ago) by tim
Branch: MAIN
Changes since 1.7: +19 -18 lines
Diff to previous 1.7 (colored)

Change all error exits to EX_TEMPFAIL so that mail rejected by the LMTP
server stays queued instead of being bounced.

Also improve getline(3) error handling and remove unreachable code.

OK sunil@ a while ago, "please get it in" gilles@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 30 05:49:47 2019 UTC (5 years, 4 months ago) by sunil
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

Check ferror(3) on the right stream.

Ok gilles@

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jan 29 15:40:45 2019 UTC (5 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.5: +1 -0 lines
Diff to previous 1.5 (colored)

strip \r from lmtp responses

ok sunil@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 21 11:27:29 2019 UTC (5 years, 4 months ago) by sunil
Branch: MAIN
Changes since 1.4: +1 -0 lines
Diff to previous 1.4 (colored)

While using buffered stdio over a socket, fflush(3) command before
reading the response.

Ok eric@ jung@

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Sun Nov 25 21:45:35 2018 UTC (5 years, 6 months ago) by gilles
Branch: OPENBSD_6_4
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

backport mail.lmtp and mail.mda fixes from -current

Revision 1.4 / (download) - annotate - [select for diffs], Sun Oct 21 18:22:50 2018 UTC (5 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

do not consider connect() errors as permfail in the lmtp mda

issue spotted and fix tested by Atanas Vladimirov <vlado@bsdbg.net>

Revision 1.3 / (download) - annotate - [select for diffs], Tue May 29 22:16:15 2018 UTC (6 years ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE
Branch point for: OPENBSD_6_4
Changes since 1.2: +4 -6 lines
Diff to previous 1.2 (colored)

it turns out we can provide syntaxic sugar for an LMTP action in smtpd.conf
which should please our users ;-)

while at it get rid of unix:/inet: prefixes in LMTP destinations, we either
use an absolute path for a UNIX socket or it's necessarily a network socket
so '/' as the first char of the destination makes the prefixes irrelevant.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 9 07:17:47 2017 UTC (6 years, 10 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.1: +3 -0 lines
Diff to previous 1.1 (colored)

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 1.1 / (download) - annotate - [select for diffs], Tue Feb 14 15:16:34 2017 UTC (7 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1

add new implementation of a standalone LMTP client which will deprecate the
builtin delivery_lmtp.c

ok sunil@, jung@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.