CVS: cvs.openbsd.org: src

2022-02-12 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2022/02/12 11:22:04

Modified files:
usr.sbin/smtpd : ca.c dispatcher.c mta.c smtp.c smtpd.c smtpd.h 
 ssl.c ssl.h 

Log message:
use new libtls signer api

ok tb@



CVS: cvs.openbsd.org: src

2022-01-25 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2022/01/25 14:53:45

Modified files:
lib/libtls : shlib_version 

Log message:
minor bump after api additiom



CVS: cvs.openbsd.org: src

2022-01-25 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2022/01/25 14:51:24

Modified files:
lib/libtls : Makefile Symbols.list tls.c tls.h tls_config.c 
 tls_internal.h 
Added files:
lib/libtls : tls_signer.c 

Log message:
Introduce a signer interface intented to make TLS privsep simpler
to implement.

Add a tls_config_set_sign_cb() function that allows to register
a callback for the signing operation on a tls_config. When used,
the context installs fake pivate keys internally, and the callback
receives the hash of the public key.

Add a tls_signer_*() set of functions to manage tls_signer objects.
A tls_signer is an opaque structure on which keys are added.
It is used to compute signatures with private keys identified by
their associated public key hash.

Discussed with and ok jsing@ tb@



CVS: cvs.openbsd.org: src

2021-09-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/09/22 11:19:58

Modified files:
usr.sbin/smtpd : lka_session.c 

Log message:
remove test traces committed by mistake



CVS: cvs.openbsd.org: src

2021-09-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/09/22 11:12:34

Modified files:
usr.sbin/smtpd : smtpd.h 

Log message:
bump version to 7.0.0



CVS: cvs.openbsd.org: src

2021-09-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/09/22 11:11:35

Modified files:
usr.sbin/smtpd : lka_session.c 

Log message:
decode srs-encoded address in the right place.
fixes a bug where ruleset was not evaluated with the expanded address.

reported by Stefan Haller

ok millert@



CVS: cvs.openbsd.org: src

2021-09-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/09/22 11:09:07

Modified files:
usr.sbin/smtpd : table_db.c 

Log message:
sync table_db capabilities with table_static

ok millert@



CVS: cvs.openbsd.org: src

2021-08-02 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/08/02 06:33:34

Modified files:
usr.sbin/smtpd : queue.c 

Log message:
Fix incorrect status code for expired mails resulting in a misleading
bounce report.

>From Erik Brens



CVS: cvs.openbsd.org: src

2021-07-01 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/07/01 01:42:16

Modified files:
usr.sbin/smtpd : smtp_session.c 

Log message:
remove useless and confusing log message when client has no certificate

ok millert@



CVS: cvs.openbsd.org: src

2021-06-14 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/06/14 11:58:16

Modified files:
usr.sbin/smtpd : aliases.c bounce.c ca.c compress_backend.c 
 compress_gzip.c config.c control.c crypto.c 
 dict.c dispatcher.c dns.c enqueue.c envelope.c 
 esc.c expand.c forward.c iobuf.c ioev.c limit.c 
 lka.c lka_filter.c lka_session.c mail.lmtp.c 
 mail.maildir.c mail.mboxfile.c mail.mda.c 
 mailaddr.c makemap.c mda.c mda_mbox.c 
 mda_unpriv.c mda_variables.c mproc.c mta.c 
 mta_session.c parse.y parser.c proxy.c queue.c 
 queue_backend.c queue_fs.c queue_null.c 
 queue_proc.c queue_ram.c report_smtp.c 
 resolver.c rfc5322.c ruleset.c runq.c 
 scheduler.c scheduler_backend.c 
 scheduler_null.c scheduler_proc.c 
 scheduler_ramqueue.c smtp.c smtp_client.c 
 smtp_session.c smtpc.c smtpctl.c smtpd.c 
 smtpd.h spfwalk.c srs.c ssl.c stat_backend.c 
 stat_ramstat.c table.c table_db.c 
 table_getpwnam.c table_proc.c table_static.c 
 to.c tree.c unpack_dns.c unpack_dns.h util.c 
 waitq.c 

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

ok jung@



CVS: cvs.openbsd.org: src

2021-05-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/26 12:08:55

Modified files:
usr.sbin/smtpd : bounce.c ca.c compress_gzip.c control.c dict.c 
 dispatcher.c envelope.c ioev.c limit.c lka.c 
 mda.c mproc.c mta.c mta_session.c parse.y 
 proxy.c queue.c queue_backend.c queue_fs.c 
 queue_null.c queue_ram.c scheduler.c 
 scheduler_backend.c scheduler_null.c 
 scheduler_ramqueue.c smtp.c smtpctl.c smtpd.c 
 srs.c table_db.c table_getpwnam.c to.c tree.c 

Log message:
replaces calls to err(3)/errx(3) with fatal()/fatalx() from log.c
for code that runs in the daemon.

ok florian@ millert@



CVS: cvs.openbsd.org: src

2021-05-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/26 01:05:50

Modified files:
usr.sbin/smtpd : config.c ssl.c ssl.h 

Log message:
remove unused code

ok millert@



CVS: cvs.openbsd.org: src

2021-05-25 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/25 13:39:22

Removed files:
usr.sbin/smtpd : cert.c ssl_smtpd.c ssl_verify.c 

Log message:
remove obsolete files



CVS: cvs.openbsd.org: src

2021-05-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/23 10:12:56

Modified files:
usr.sbin/smtpd : smtp.1 

Log message:
add missing entry for cafile



CVS: cvs.openbsd.org: src

2021-05-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/23 09:57:32

Modified files:
usr.sbin/smtpd : smtp.1 smtpc.c 

Log message:
add more TLS options to smtp(1):

- cafile=:  override the default root certificates
- nosni:  disable SNI completely
- noverify:  do not verify sevrer certificate (replaces -C)
- servername=:  set server name for SNI

ok tb@



CVS: cvs.openbsd.org: src

2021-05-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/22 16:30:57

Modified files:
usr.sbin/smtpd : smtp.1 

Log message:
add semantic markup as suggested by schwarze@ and jmc@



CVS: cvs.openbsd.org: src

2021-05-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/22 06:16:06

Modified files:
usr.sbin/smtpd : smtp.1 

Log message:
reorder entries



CVS: cvs.openbsd.org: src

2021-05-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/22 03:09:07

Modified files:
usr.sbin/smtpd : smtp.1 smtpc.c 

Log message:
allow to specify TLS ciphers and protocols in smtp(1)

improvements from jmc@ schwarze@ tb@

ok tb@



CVS: cvs.openbsd.org: src

2021-05-20 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/05/20 01:33:32

Modified files:
usr.sbin/smtpd : ioev.c smtp_session.c mta_session.c 

Log message:
Call tls_accept_socket() and tls_connect_socket() immediatly instead of
going through a deferred event. It makes the code simplier and eliminates
the need to keep the listener tls context in the io structure.

ok tb@



CVS: cvs.openbsd.org: www

2021-04-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:www
Changes by: e...@cvs.openbsd.org2021/04/27 07:22:58

Modified files:
faq: upgrade69.html 

Log message:
describe smtpd.conf(5) sni changes

comments and ok kmos@



CVS: cvs.openbsd.org: src

2021-04-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/21 01:54:10

Modified files:
usr.sbin/smtpd : dispatcher.c lka.c smtpd.c smtpd.h 
usr.sbin/smtpd/smtpd: Makefile 

Log message:
unplug unused certificate verification code, now that this is done by libtls.

ok tb@ millert@



CVS: cvs.openbsd.org: src

2021-04-11 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/11 01:18:08

Modified files:
usr.sbin/smtpd : smtpd.h ssl.h 
usr.sbin/smtpd/smtpd: Makefile 

Log message:
do not build unused code and remove uneeded dependency on libm.

ok tb@



CVS: cvs.openbsd.org: src

2021-04-10 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/10 04:19:19

Modified files:
usr.sbin/smtpd : smtpc.c 
usr.sbin/smtpd/smtp: Makefile 

Log message:
remove dead code and unused dependencies

ok tb@



CVS: cvs.openbsd.org: www

2021-04-10 Thread Eric Faurot
CVSROOT:/cvs
Module name:www
Changes by: e...@cvs.openbsd.org2021/04/10 01:16:23

Modified files:
.  : 69.html 

Log message:
more smtpd changes



CVS: cvs.openbsd.org: src

2021-04-10 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/10 00:44:19

Modified files:
usr.sbin/smtpd : smtpd.h 

Log message:
bump smtpd version



CVS: cvs.openbsd.org: src

2021-04-09 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/09 10:43:43

Modified files:
usr.sbin/smtpd : config.c mta.c parse.y smtp.c smtpd.conf.5 
 smtpd.h 

Log message:
allow to specify tls ciphers and protocols on listeners

ok tb@



CVS: cvs.openbsd.org: src

2021-04-05 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/05 09:50:11

Modified files:
usr.sbin/smtpd : ioev.c 

Log message:
Until tls_accept_socket() succeeds, the tls context bound to a session
belongs to the listener, and should not be freed with that session if
an error occurs before.  Unlink it from the session early in the accept
callback to avoid this.

tweaks and ok millert@



CVS: cvs.openbsd.org: src

2021-04-02 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/02 01:00:30

Modified files:
lib/libc/asr   : asr_debug.c 

Log message:
swap rname and mname in debug output, and handle the USE_CD flag

from Boudewijn Dijkstra



CVS: cvs.openbsd.org: src

2021-04-02 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/04/02 00:30:55

Modified files:
usr.sbin/smtpd : mta.c 

Log message:
if cipher list is not specified for a relay action, use the global
cipher list if defined. otherwise fallback to libtls default.

ok millert@



CVS: cvs.openbsd.org: src

2021-03-31 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/03/31 13:09:19

Modified files:
usr.sbin/smtpd : smtpd.h util.c 

Log message:
turn log_trace() into a macro to prevent evaluating the format string
parameters when tracing is not enabled.

ok millert@



CVS: cvs.openbsd.org: src

2021-03-31 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/03/31 11:47:16

Modified files:
usr.sbin/smtpd : mta.c parse.y smtpd.conf.5 smtpd.h 

Log message:
allow to specify tls protocols and ciphers on relay actions

ok espie@ sthen@ tb@



CVS: cvs.openbsd.org: src

2021-03-31 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/03/31 11:42:24

Modified files:
lib/libutil: imsg-buffer.c 

Log message:
change the barrier so that fd's are always passed and received with
the first byte of the imsg they belong to.

idea, tweaks and ok claudio@



CVS: cvs.openbsd.org: src

2021-03-10 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/03/10 10:25:59

Modified files:
usr.sbin/smtpd : smtp.c 

Log message:
do not request client certificate unless required

issue hit by florian@
diff by jsing@

ok tb@



Re: CVS: cvs.openbsd.org: src

2021-03-07 Thread Eric Faurot
On Sun, Mar 07, 2021 at 01:56:42PM -0700, Eric Faurot wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   e...@cvs.openbsd.org2021/03/07 13:56:42
> 
> Modified files:
>   usr.sbin/smtpd : mta_session.c 
> 
> Log message:
> use the mx hostname for sni on outgoing connection, not the reverse
> dns for the peer address.
> 
> spotted by krw@
> ok krw@ tb@

that was also ok florian@ millert@



CVS: cvs.openbsd.org: src

2021-03-07 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/03/07 13:56:42

Modified files:
usr.sbin/smtpd : mta_session.c 

Log message:
use the mx hostname for sni on outgoing connection, not the reverse
dns for the peer address.

spotted by krw@
ok krw@ tb@



CVS: cvs.openbsd.org: src

2021-03-05 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/03/05 05:37:32

Modified files:
usr.sbin/smtpd : ca.c config.c dispatcher.c iobuf.c iobuf.h 
 ioev.c ioev.h mta.c mta_session.c parse.y 
 smtp.c smtp.h smtp_client.c smtp_session.c 
 smtpc.c smtpd.c smtpd.conf.5 smtpd.h ssl.c 
 ssl.h to.c 
usr.sbin/smtpd/smtp: Makefile 
usr.sbin/smtpd/smtpd: Makefile 

Log message:
Start porting smtpd to libtls.

Note that it changes the way SNI works: The certificate to use is now
selected by looking at the names found in the certificates themselves,
rather than the names of the pki entries in the configuration file.
The set of certificates for a tls listener must be defined explicitly by
using the pki listener option multiple times.

ok tb@



CVS: cvs.openbsd.org: src

2021-01-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/27 13:33:05

Modified files:
usr.sbin/relayd: relay.c relayd.h ssl.c 
Removed files:
usr.sbin/relayd: boguskeys.h 

Log message:
remove bogus key hack now that it's handled by libtls

no objection claudio@
ok tb@ jsing@



CVS: cvs.openbsd.org: src

2021-01-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/26 05:51:22

Modified files:
lib/libtls : tls.c 

Log message:
Move private key setup to a helper function with proper error
checking.  Only install the hash on the key if fake key is used,
and do it for EC keys too.

ok tb@ jsing@



CVS: cvs.openbsd.org: src

2021-01-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/21 15:03:25

Modified files:
lib/libtls : tls_config.c 

Log message:
when using fake keys, skip the private key check

ok tb@



CVS: cvs.openbsd.org: src

2021-01-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/21 15:02:17

Modified files:
lib/libtls : tls.c 

Log message:
return -1 on error for consistency

ok tb@



CVS: cvs.openbsd.org: src

2021-01-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/21 12:11:39

Modified files:
distrib/sets/lists/base: mi 

Log message:
sync for libtls bump



CVS: cvs.openbsd.org: src

2021-01-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/21 12:09:43

Modified files:
lib/libtls : shlib_version 

Log message:
minor bump after symbol addition



CVS: cvs.openbsd.org: src

2021-01-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2021/01/21 12:09:10

Modified files:
lib/libtls : Symbols.list tls.c tls_config.c tls_internal.h 

Log message:
Allow setting a keypair on a tls context without specifying the private
key, and fake it internally with the certificate public key instead.
It makes it easier for privsep engines like relayd that don't have to
use bogus keys anymore.

ok beck@ tb@ jsing@



CVS: cvs.openbsd.org: src

2020-12-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/12/23 08:42:03

Modified files:
usr.sbin/smtpd : resolver.c 

Log message:
Fix a memory leak: use a single memory allocation for struct addrinfo and
the sockaddr it contains, as expected by freeaddrinfo().
Move the allocation to a helper function for clarity.

comments from martijn@ millert@

ok millert@



CVS: cvs.openbsd.org: src

2020-12-21 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/12/21 02:40:35

Modified files:
lib/libc/asr   : getnameinfo.c getnameinfo_async.c 

Log message:
Always call endservent_r() after getservbyport_r().
Fix a memory leak when no entry is matched.

ok florian



CVS: cvs.openbsd.org: www

2020-05-19 Thread Eric Faurot
CVSROOT:/cvs
Module name:www
Changes by: e...@cvs.openbsd.org2020/05/19 09:37:41

Modified files:
opensmtpd  : index.html 
Added files:
opensmtpd/announces: release-6.7.0p1.txt 

Log message:
release OpenSMTPd 6.7.0p1



CVS: cvs.openbsd.org: www

2020-05-12 Thread Eric Faurot
CVSROOT:/cvs
Module name:www
Changes by: e...@cvs.openbsd.org2020/05/12 01:55:47

Modified files:
.  : 67.html 

Log message:
tweak OpenSMTPD entries



CVS: cvs.openbsd.org: src

2020-04-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/28 15:46:43

Modified files:
usr.sbin/smtpd : aliases.c 

Log message:
In virtual alias context, do not try to match catchall entries for
usernames, but only for email addresses.  fixes an issue where
usernames always expand to the @ wildcard if defined in the virtual
alias file.

discussed with Gilles Chehade

ok millert@



CVS: cvs.openbsd.org: src

2020-04-25 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/25 03:44:02

Modified files:
usr.sbin/smtpd : smtpd-filters.7 

Log message:
update filter documentation after protocol change

from Gilles Chehade



CVS: cvs.openbsd.org: src

2020-04-25 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/25 03:20:38

Modified files:
usr.sbin/smtpd : smtpd.conf.5 

Log message:
point out that the "junk" filter decision adds the X-Spam header

from Ryan Kavanagh



CVS: cvs.openbsd.org: src

2020-04-24 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/24 05:34:07

Modified files:
usr.sbin/smtpd : bounce.c iobuf.c lka_filter.c mta_session.c 
 smtp_client.c smtp_session.c 

Log message:
strip trailing CRs at smtp level rather than io level

ok millert@



CVS: cvs.openbsd.org: src

2020-04-22 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/22 05:35:34

Modified files:
usr.sbin/smtpd : queue.c queue_backend.c 

Log message:
Check for the dispatcher name in the envelope validation function.
Fixes a possible crash and caching issue when manually moving an
envelope to the queue with smtpctl discover.

ok millert@



Re: CVS: cvs.openbsd.org: src

2020-04-17 Thread Eric Faurot
On Fri, Apr 17, 2020 at 08:20:13AM -0600, Eric Faurot wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   e...@cvs.openbsd.org2020/04/17 08:20:13
> 
> Modified files:
>   usr.sbin/smtpd : lka_filter.c 
> 
> Log message:
> switch email and result fields in mail-from/rcpt-to event reports
> and bump protocol version.
> 
> discussed with jung@, martijn@ and Gilles.
> 
> ok jung@

Note that if you run external filters, they must be upgraded too.

Eric.



CVS: cvs.openbsd.org: src

2020-04-17 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/17 08:20:13

Modified files:
usr.sbin/smtpd : lka_filter.c 

Log message:
switch email and result fields in mail-from/rcpt-to event reports
and bump protocol version.

discussed with jung@, martijn@ and Gilles.

ok jung@



CVS: cvs.openbsd.org: src

2020-04-08 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/04/08 01:30:44

Modified files:
usr.sbin/smtpd : smtpd.h 

Log message:
bump smtpd version



CVS: cvs.openbsd.org: src

2020-03-18 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2020/03/18 14:17:14

Modified files:
usr.sbin/smtpd : enqueue.c 

Log message:
use CRLF line-ending during the SMTP dialog in the local enqueuer

ok millert@



CVS: cvs.openbsd.org: src

2019-11-25 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/11/25 05:11:26

Modified files:
usr.sbin/smtpd : bounce.c 

Log message:
use crlf line-ending during the internal smtp session

ok gilles@ martijn@



CVS: cvs.openbsd.org: src

2019-09-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/09/28 05:21:07

Modified files:
lib/libc/asr   : res_send_async.c 

Log message:
correctly handle read(2) return value.

fix issue reported by Mikolaj Kucharski.

ok martijn@ deraadt@



CVS: cvs.openbsd.org: src

2019-09-18 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/09/18 05:26:30

Modified files:
usr.sbin/smtpd : dns.c mta.c mta_session.c smtpc.c smtpd.h ssl.h 
usr.sbin/smtpd/smtp: Makefile 
usr.sbin/smtpd/smtpd: Makefile 
Added files:
usr.sbin/smtpd : ssl_verify.c 

Log message:
Implement server certificate validation in smtp(1).
Check certificate against MX name in smtpd(8) mta.

ok gilles@



CVS: cvs.openbsd.org: src

2019-09-10 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/09/10 06:08:26

Modified files:
usr.sbin/smtpd : smtp_client.c 

Log message:
immediatly close the connection if the cert is not valid, rather than
ending the smtp session.

ok gilles@



CVS: cvs.openbsd.org: src

2019-09-02 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/09/02 14:05:21

Modified files:
usr.sbin/smtpd : smtp.h smtp_client.c smtpc.c 

Log message:
Request a new SSL structure for each TLS session.
Fix a crash reported by Ross L Richardson.

ok gilles@



CVS: cvs.openbsd.org: src

2019-08-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/08/28 13:46:20

Modified files:
usr.sbin/smtpd : util.c 

Log message:
change valid_domainname() to accept a trailing dot.

ok millert@



CVS: cvs.openbsd.org: src

2019-08-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/08/23 09:39:12

Modified files:
usr.sbin/smtpd : spfwalk.c 

Log message:
only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@



CVS: cvs.openbsd.org: src

2019-08-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/08/23 06:09:41

Modified files:
usr.sbin/smtpd : util.c 

Log message:
martijn@ found a regression so revert to the old behavior for now



CVS: cvs.openbsd.org: src

2019-08-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/08/23 01:09:52

Modified files:
usr.sbin/smtpd : smtpd.h util.c 

Log message:
res_hnok() is too lenient wrt to acceptable domain name in mail addresses.
replace it with a valid_domainname() check that implements something closer
to RFC 5321, but still usable in real-life.

ok gilles@ millert@



CVS: cvs.openbsd.org: src

2019-08-19 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/08/19 09:42:24

Modified files:
usr.sbin/smtpd : mta.c 

Log message:
use a specific and more relevant status message for failed smarthost
resolution.

ok gilles@



CVS: cvs.openbsd.org: src

2019-06-14 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/06/14 13:55:25

Modified files:
usr.sbin/smtpd : mta.c mta_session.c runq.c smtpd.h 

Log message:
simplify the runq interface:

- remove (unused) per-job callback
- rename runq_schedule() to runq_schedule_at() and runq_delay()
to runq_schedule()
- remove unused runq_next()

ok sunil@ gilles@



CVS: cvs.openbsd.org: src

2019-06-13 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/06/13 05:45:35

Modified files:
usr.sbin/smtpd : lka.c pony.c resolver.c smtpd.c smtpd.h 

Log message:
extend the resolver interface to delegate res_query() calls to the lka.

ok gilles@ sunil@



CVS: cvs.openbsd.org: src

2019-06-12 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/06/12 11:42:53

Modified files:
usr.sbin/smtpd : iobuf.c iobuf.h ioev.c ioev.h mta_session.c 
 smtp_client.c smtp_session.c 
usr.sbin/smtpd/smtp: Makefile 
usr.sbin/smtpd/smtpd: Makefile 

Log message:
change "ssl" to "tls" in various identifiers.
no functional change.

ok gilles@



CVS: cvs.openbsd.org: src

2019-05-15 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/05/15 05:56:19

Modified files:
usr.sbin/smtpd : smtp_session.c 

Log message:
do not use CRLF when passing data lines to filters.

ok gilles@



CVS: cvs.openbsd.org: src

2019-05-14 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/05/14 23:02:43

Modified files:
usr.sbin/smtpd : smtpc.c 

Log message:
normalize newlines when reading the message

spotted by martijn@

ok martijn@ gilles@



CVS: cvs.openbsd.org: src

2019-05-14 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/05/14 06:08:54

Modified files:
usr.sbin/smtpd : smtp_client.c 

Log message:
fix typos in log messages



CVS: cvs.openbsd.org: src

2019-04-08 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/04/08 02:22:32

Modified files:
usr.sbin/smtpd : smtpd.h 

Log message:
remove unused declarations

ok gilles@



CVS: cvs.openbsd.org: src

2019-04-06 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/04/06 04:35:48

Modified files:
usr.sbin/lpd   : resolver.c 

Log message:
do not call freeaddrinfo() on a NULL pointer.



CVS: cvs.openbsd.org: src

2019-04-04 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/04/04 13:25:46

Modified files:
usr.sbin/lpd   : engine_lpr.c frontend_lpr.c proc.c resolver.c 

Log message:
accept the NULL string in the proc message formatting api and simplify
code accordingly.



CVS: cvs.openbsd.org: src

2019-02-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/02/28 06:23:33

Modified files:
usr.sbin/smtpd : smtpd.h 

Log message:
bump smtpd version

on behalf of gilles@



CVS: cvs.openbsd.org: src

2019-01-14 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/01/14 02:37:40

Modified files:
usr.sbin/smtpd : smtpctl.c 

Log message:
correctly retrieve envelope strings. fixes mailq output.

ok gilles@



CVS: cvs.openbsd.org: src

2019-01-09 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2019/01/10 00:40:52

Modified files:
usr.sbin/smtpd : table.c 

Log message:
report errno in debug logs and other minor cleanups.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 08:09:28

Modified files:
usr.sbin/smtpd : smtpd.h table.c 

Log message:
introduce table_dump() and tweak format

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 07:21:02

Modified files:
usr.sbin/smtpd : config.c parse.y table_static.c 

Log message:
type static tables on the fly when the first element is added

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 06:47:54

Modified files:
usr.sbin/smtpd : table.c 

Log message:
simplify code

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 05:47:28

Modified files:
usr.sbin/smtpd : aliases.c 

Log message:
zap unused code



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 04:40:29

Modified files:
usr.sbin/smtpd : aliases.c config.c lka.c lka_session.c 
 makemap.c parse.y ruleset.c smtpd.h table.c 

Log message:
remove the tag workaround for table_create() and table_find(),
now that static tables handle their updates internally.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 04:13:58

Modified files:
usr.sbin/smtpd : smtpd.h table.c 

Log message:
remove unused members in struct table



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 04:11:36

Modified files:
usr.sbin/smtpd : table_static.c 

Log message:
fix logging of list entries



CVS: cvs.openbsd.org: src

2018-12-28 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/28 03:42:18

Modified files:
usr.sbin/smtpd : table_static.c 

Log message:
use private data structure for managing static table content

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 12:13:18

Removed files:
usr.sbin/smtpd : table_api.c 

Log message:
remove unused file



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 08:04:59

Modified files:
usr.sbin/smtpd : table.c table_db.c table_static.c 

Log message:
table_fetch() always expect a valid dst pointer.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 07:41:46

Modified files:
usr.sbin/smtpd : table_db.c 

Log message:
move the iterator variable in the private handle.
it is now correctly reset between updates.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 07:23:41

Modified files:
usr.sbin/smtpd : smtpd.h table.c table_db.c table_getpwnam.c 
 table_proc.c table_static.c 

Log message:
introduce dump() and add() table methods, only implemented for static tables.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 02:30:29

Modified files:
usr.sbin/smtpd : smtpd.h table.c table_db.c table_getpwnam.c 
 table_proc.c table_static.c 

Log message:
pass the table pointer to the lookup()/fecth() methods

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 01:57:03

Modified files:
usr.sbin/smtpd : smtpd.h table.c table_db.c table_getpwnam.c 
 table_proc.c table_static.c 

Log message:
change the close() method to take the table pointer

ok gilles



CVS: cvs.openbsd.org: src

2018-12-27 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/27 01:08:06

Modified files:
usr.sbin/smtpd : smtpd.h table.c table_db.c table_getpwnam.c 
 table_proc.c table_static.c 

Log message:
Make the backend open method return an int to report success.
The implementation is responsible for setting the handle pointer
as needed.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/26 13:13:43

Modified files:
usr.sbin/smtpd : aliases.c lka.c lka_session.c smtpd.h table.c 
 table_db.c table_getpwnam.c table_proc.c 
 table_static.c 

Log message:
reorder parameters for consistency



CVS: cvs.openbsd.org: src

2018-12-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/26 10:37:15

Modified files:
usr.sbin/smtpd : ruleset.c 

Log message:
simplify code

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/26 08:55:09

Modified files:
usr.sbin/smtpd : lka_filter.c ruleset.c smtpd.h table.c 

Log message:
introduce a table_match() function to check for a key in a table

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/26 07:15:13

Modified files:
usr.sbin/smtpd : aliases.c lka.c lka_filter.c lka_session.c 
 ruleset.c smtpd.h table.c table_db.c 
 table_getpwnam.c table_proc.c table_static.c 

Log message:
get rid of the unused dict argument in table lookup and fetch api.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-26 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/26 04:53:02

Modified files:
usr.sbin/smtpd : smtpd.h table.c table_db.c table_getpwnam.c 
 table_proc.c table_static.c 

Log message:
move the table backend name in the backend struct.
remove unused function.

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/23 09:37:53

Modified files:
usr.sbin/smtpd : lka.c mta.c mta_session.c pony.c smtp.c 
 smtp_session.c smtpd.c smtpd.h 

Log message:
remove dead code

ok gilles@



CVS: cvs.openbsd.org: src

2018-12-23 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/12/23 08:53:24

Modified files:
usr.sbin/smtpd : smtpd.h table.c table_db.c table_getpwnam.c 
 table_proc.c table_static.c 

Log message:
Simplify the table backend interface: lookup results are returned
as strings, and parsing is handled by the upper layer.

ok gilles@



  1   2   3   4   5   6   7   8   9   >