215 Commits

Author SHA1 Message Date
fa6b4637f8 add longest_user to struct.I2Host for (in later commit)
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:47:35 +00:00
c87825bde8 add BINDSTR macro to ease CHKSQL(bind_text(...)) sequences
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:45:58 +00:00
03af144f11 dealloc newly made message id + different mid format with brackets and stuff
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:45:07 +00:00
ea9f0f1c0b some includes
i'm trying to deflate 'git diff's lines

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:44:24 +00:00
2daa96a06b have mail_dests->(host, addr) cols to be primary key and update on conflict
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:43:56 +00:00
af4626e227 add from_resolved column to mail table
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:42:41 +00:00
2b712ac5f1 add a bunch of new sqlite statements
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:42:13 +00:00
5509e0addf add delete_outgoing_mails option
i did nothing bur code for the last 25 hours

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-17 10:39:51 +00:00
23fcda698d fix user rejection
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:21:08 +00:00
bdfe3b8f58 transform outgoing address hosts to b32 hosts
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:20:41 +00:00
1846c24521 "add" host2b32 sam func (is just is_host_known)
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:19:38 +00:00
86543d11f7 have lookup_hodt wsit for the ctlsock to be inited
thread unsafe; i know

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:18:45 +00:00
9118e545f3 add basic http for getting .well-known keys + commit server data
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:18:04 +00:00
d014fb4bb5 fix sam parsing
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:16:38 +00:00
ad572beb6a have commit_*_mail return SQ3_OK in line with commit_hostaddrs
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:16:23 +00:00
beb641fcd6 add commit_hostaddrs
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:15:05 +00:00
861bc42dc3 show errstr(ret) when sqlite doesn't give specific errmsg (prepare commands)
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:13:36 +00:00
0df9d97302 add two tables for storing mail servers per site and send failures
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-16 09:12:24 +00:00
155f95888a remove dead stuff and fix building
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 21:25:33 +00:00
6e65d2bf06 have smtp_line work with incoming mail too
host verification and user white/blacklisting

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 21:23:07 +00:00
ed2c64ed18 fix sam stream accepting
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 21:21:52 +00:00
f871f35395 add incoming mail support for commit_mail + beginnings for outgoing mail sending
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 21:21:32 +00:00
630fdd214f cache 2 mail queue picker SELECTs
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 21:20:09 +00:00
92e0ca5c98 implement linepoll-based stream accepter for incoming mail and #if-0 the old part
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 16:34:37 +00:00
75cabe50b3 save send_queue items to database for outgoing mails
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 16:32:13 +00:00
ef24b10959 add custom_accept function to linepoll struct (incoming sam)
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 16:31:10 +00:00
fea4d355a5 the program's structure allows for a flag to be set to exit; no more main sleeps
thank you for flying catcommit lines (consistency+no broken commits back)

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:42:50 +00:00
814cbf3caf initialize sam with keydat (no tunnels yet) and report being up
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:39:49 +00:00
2f0d81d2a7 error 2
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:38:51 +00:00
92d1fbe57b error 1
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:38:47 +00:00
e9b508374a add linepoll.c to config.mk
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:38:38 +00:00
c5f44d1f4b struct Mail is static in smtp_conn_state so don't try to free that
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:38:07 +00:00
5e97eccbe1 add function to commit outgoing mails
dear passengers please fasten your seatbelts we're nearing the ground

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:37:03 +00:00
93bc9265d3 backport that to the function about to be destroyed
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:35:11 +00:00
bbe1f5befb add func to save a header line to structMail
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:34:49 +00:00
8b887fa0a7 git splits this one hunk into 15 hunks
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:34:02 +00:00
11a88eb694 add mail acceptor thread
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:33:05 +00:00
bb6bebc7f9 add a func to get a sam connection
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:32:31 +00:00
15025ef932 only lock sam_mutex if it's ctlsock
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:31:21 +00:00
25dd8d7b91 terminate sam messages with crlf
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:30:48 +00:00
b3172e1440 fizes
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:30:35 +00:00
124634ca62 fix b64tob32 hostconv
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:29:56 +00:00
9e1343ecfa use it to fully transform outgoing smtp server to be multiconn capable
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:28:39 +00:00
4770adbeb2 introducing the savior of itoomail: "linepoll"
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:27:52 +00:00
9759a5e83f open a file before doing anything to get an fd asap in readfile() + NULterm'd
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:25:59 +00:00
6e8d0ecf4a have len for xfree->strdeepfry be manually set if wanted
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:24:36 +00:00
5e3b6e58b3 have pollconn be capable of using mutexes
expect no consistency *and* fully broken commits

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:23:48 +00:00
66fc19e7e1 add randstr util+pthread include
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:21:24 +00:00
1d6902804a here's what a potential incoming mail SMTP would've looked like (now #if-0'd)
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:19:51 +00:00
be55c03158 cache some insert statements for repeated use
past this point is a mixture of snippets after last Feb4 commit and what
i made in the last few days. expect no consistency.

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
2025-04-15 10:18:31 +00:00