Commit Graph

49 Commits

Author SHA1 Message Date
Dirkjan Ochtman 1701b18ca1 Rebrand fork as instant-smtp 2022-11-22 19:28:26 +01:00
Dirkjan Ochtman 0729f03003 Change Response::Other to more closely match RFC grammar 2022-10-11 22:08:29 +02:00
Dirkjan Ochtman 9fa64dee7a Parse into ReplyCode 2022-10-11 22:08:29 +02:00
Dirkjan Ochtman a3f2cdc5c0 Use a ReplyCode enum for reply codes 2022-10-10 18:36:47 +02:00
Zeeshan Ali 78785279c6 Declare open-ended enum types as non-exhaustive
So that future variant additions don't require API break.
2022-10-07 18:21:10 +02:00
Zeeshan Ali 6c6fa0f2ff Add typed support for `SIZE` parameter (RFC 1870)
This also makes `Parameter` type an enum so future type support for
other parameters can be more easily added. Note that the enum is
non-exhaustive so that future variant addtions would not cause API
breaks.
2022-10-07 18:21:10 +02:00
Zeeshan Ali 1065b44eef Use a char instead of single-char string
Fixes a clippy warning:

```
warning: single-character string constant used as pattern
  --> src/utils.rs:11:46
   |
11 |         escaped = Cow::Owned(escaped.replace("\"", "\\\""));
   |                                              ^^^^ help: try using a `char` instead: `'\"'`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
```
2022-10-07 18:21:10 +02:00
Zeeshan Ali 7fa3ffdd1d Drop a redundant closure
Fixes a clippy warning:

```
warning: redundant closure
  --> src/parse/mod.rs:70:9
   |
70 |         |s| unescape_quoted(s),
   |         ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `unescape_quoted`
   |
   = note: `#[warn(clippy::redundant_closure)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
```
2022-10-07 18:21:10 +02:00
Zeeshan Ali 10a0d4fc6b Replace into_iter calls with iter
Ran `clippy --fix` to autofix another warning but it did this as well
and I thought why not.
2022-10-07 18:21:10 +02:00
Zeeshan Ali d2ff4a1cff Simplify a string parsing line
This fixes a clippy warning but does even better than suggested:

```
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
   --> src/parse/response.rs:119:13
    |
119 |         |s| u16::from_str_radix(s, 10),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.parse::<u16>()`
    |
    = note: `#[warn(clippy::from_str_radix_10)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
```
2022-10-07 18:21:10 +02:00
Damian Poddebniak 9b57268efe Add "Unicode-DFS-2016" to allowed licenses in `deny.toml`. 2022-10-07 17:46:06 +02:00
Damian Poddebniak 37bc87e4a9 Bump version to 0.2.0. 2022-06-12 09:25:11 +02:00
Damian Poddebniak 55e38f7b72 Update to nom 7 and abnf-core 0.5. 2022-06-12 09:24:28 +02:00
Damian Poddebniak ee7dc96d0f Update author email. 2022-06-12 09:22:02 +02:00
Damian Poddebniak 57cf07b000 Update SECURITY.md 2022-02-15 21:56:02 +01:00
Damian Poddebniak 3d547ed97a
Update README.md 2021-10-26 14:55:48 +02:00
Damian Poddebniak e72b8b4772 Run "scheduled.yml" only two times a week 2021-10-17 12:55:27 +02:00
Damian Poddebniak b66480090d
Merge pull request #2 from duesee/improve_ci
Improve CI
2021-07-21 13:53:09 +02:00
Damian Poddebniak ebb9ff4d74 Improve CI 2021-07-21 13:48:40 +02:00
Damian Poddebniak 1b4ff2b2d3
Merge pull request #1 from duesee/use_gh_actions
Use GitHub Actions
2021-07-20 21:53:57 +02:00
Damian Poddebniak c63bf04601 Reformat code 2021-07-20 21:51:44 +02:00
Damian Poddebniak b83c4fd065 Use GitHub Actions 2021-07-20 21:47:55 +02:00
Damian Poddebniak c056f622c7 Add traces from RFC 5321 (Appendix D. Scenarios) as tests. 2021-05-24 18:40:43 +02:00
Damian Poddebniak 2d4ea2f9c4 Fix serialization of address in `Command::{Ehlo, Helo}`. Thanks `cargo fuzz`! 2021-05-24 17:49:18 +02:00
Damian Poddebniak d13e9e0d07 Add `cargo fuzz` target for `command` parser (and serializer). 2021-05-24 17:27:35 +02:00
Damian Poddebniak fcd8ee93ff Try to create a useful `Response` struct. 2021-05-23 19:26:16 +02:00
Damian Poddebniak ad3a164d19 Merge `response` and `replies` modules. 2021-05-23 14:14:35 +02:00
Damian Poddebniak e9ddac2ec2 Change `Reply_code` to return u16. 2021-05-23 14:03:45 +02:00
Damian Poddebniak bffba030df Improve documentation. 2021-05-23 14:02:34 +02:00
Damian Poddebniak 21138c353b Introduce feature-gated `serde` dependency
* derive `serde::{Deserialize, Serialize}` for `Capability` and `AuthMechanism`.
2021-05-22 22:57:21 +02:00
Damian Poddebniak 7cac2a2903 Impl `EhloOkResp::{new, serialize}` 2021-05-22 22:56:45 +02:00
Damian Poddebniak 54a0311fc6 Implement `{Capability,AuthMechanism}::serialize`. 2021-05-22 22:31:49 +02:00
Damian Poddebniak ecbd3365d6 Add command parsing example. 2021-05-22 21:33:27 +02:00
Damian Poddebniak 10f614edb6 Too much, sorry. 2021-05-22 21:30:53 +02:00
Damian Poddebniak a327db7285 Add `number` parser. 2021-05-15 19:26:20 +02:00
Damian Poddebniak f6278a6da0
Update README.md 2021-02-22 18:53:25 +01:00
Damian Poddebniak 28167aa142
Create SECURITY.md 2021-02-22 18:44:04 +01:00
Damian Poddebniak 7d0be8df0e Add description to Cargo.toml 2021-02-22 17:46:49 +01:00
Damian Poddebniak 953c96d93b Update Cargo.toml 2021-02-22 17:45:28 +01:00
Damian Poddebniak f5f04ea5e3 Thanks Clippy! 2021-02-22 16:46:46 +01:00
Damian Poddebniak cc8551e357 Update to nom 6 2021-02-22 16:36:54 +01:00
Damian Poddebniak 75d09f91ec Implement Command::serialize 2020-12-04 15:04:06 +01:00
Damian Poddebniak facfa4d7ea Improve fields of Command enum. 2020-12-04 15:03:28 +01:00
Damian Poddebniak b8448a8889 renamed to smtp-codec 2020-09-10 17:41:06 +02:00
Damian Poddebniak 3007f1a3ff Greeting Parser and Type 2020-08-10 16:48:29 +02:00
Damian Poddebniak a0375f5657 Simplified ehlo-ok-rsp ABNF 2020-08-10 15:54:37 +02:00
Damian Poddebniak d41e8118f3 EhloOkResp Parser + Type
* ehlo_ok_resp returns `EhloOkResp` now
* Converted some &[u8] parser to &str
* Added unit test
* Changed ehlo_line to accept "AUTH=LOGIN PLAIN" (note the "=")
2020-08-10 15:05:30 +02:00
Damian Poddebniak f14357d5b9 License 2020-08-09 11:27:59 +02:00
Damian Poddebniak f3768f1321 "Initial" commit. 2020-08-06 16:25:02 +02:00