Read and parse incoming entries then dispatch them into session threads

This commit is contained in:
Rodolphe Breard 2018-12-29 16:56:56 +01:00
parent 010951c884
commit f57a201431
7 changed files with 227 additions and 5 deletions

6
examples/dummy.rs Normal file
View file

@ -0,0 +1,6 @@
fn main() {
match opensmtpd::dispatch() {
Ok(_) => {}
Err(e) => eprintln!("Error: {}", e.as_str()),
}
}

View file

@ -0,0 +1,4 @@
report|1|1544130229|smtp-in|tx-mail|4b0148c60f798628|fc08ce7d|<owner-hackers+M85937=gilles=poolp.org@openbsd.org>|ok
report|1|1544130229|smtp-in|tx-mail|0f3004c08c82d33e|fc08ce7d|<owner-hackers+M85937=gilles=poolp.org@openbsd.org>|ok
report|1|1544130229|smtp-in|tx-rcpt|4b0148c60f798628|fc08ce7d|<gilles@poolp.org>|ok
report|1|1544130229|smtp-in|tx-rcpt|0f3004c08c82d33e|fc08ce7d|<gilles@poolp.org>|ok

View file

@ -0,0 +1,2 @@
report|1|1544130229|smtp-in|tx-mail|0f3004c08c82d33e|fc08ce7d|<owner-hackers+M85937=gilles=poolp.org@openbsd.org>|ok
report|1|1544130229|smtp-in|tx-rcpt|0f3004c08c82d33e|fc08ce7d|<gilles@poolp.org>|ok