public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
* Re: NNCP proxy for Internet mail providers?
@ 2021-10-28  3:46 Koushik Roy
  2021-10-28  5:33 ` tidux
  0 siblings, 1 reply; 8+ messages in thread
From: Koushik Roy @ 2021-10-28  3:46 UTC (permalink / raw)
  To: tidux; +Cc: nncp-devel

On Wed, 27 Oct 2021 03:03:38 +0000, tidux@sdf•org wrote:
> I thought about that, but it's actually a lot harder than it appears at
> first glance.  You'd need something similar to isync/offlineimap to
> track the IMAP IDs of individual messages in the maildir on the client
> machine and then have a way of communicating, over NNCP, the changes
> that should cause server side mutations (message deleted, moved to new
> folder, etc.) back to the proxy host for translation into IMAP4 commands
> to relay to the Internet mail server.  Even then that behavior has to be
> a configuration toggle because sometimes you do just want the mailserver
> to archive everything forever even if your client mailbox gets hosed.

I'm curious, why not just cooperate with the local MDA? Is this
specifically to avoid having a local mail daemon altogether?

(Apologies if this mail gets mangled, I'm trying to switch away from
digest mode which is making it inconvenient to directly reply.)

- Koushik

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NNCP proxy for Internet mail providers?
  2021-10-28  3:46 NNCP proxy for Internet mail providers? Koushik Roy
@ 2021-10-28  5:33 ` tidux
  2021-10-28  7:47   ` Sergey Matveev
  0 siblings, 1 reply; 8+ messages in thread
From: tidux @ 2021-10-28  5:33 UTC (permalink / raw)
  To: nncp-devel

On Wed, Oct 27, 2021 at 08:46:29PM -0700, Koushik Roy wrote:
> I'm curious, why not just cooperate with the local MDA? Is this
> specifically to avoid having a local mail daemon altogether?
> 
> (Apologies if this mail gets mangled, I'm trying to switch away from
> digest mode which is making it inconvenient to directly reply.)
> 
> - Koushik
The use case is basically "IMAP server as remote backups" where even if
your laptop gets run over by a truck you can still re-download all your
mail from the server.  This is half the reason many people use webmail
and other public IMAP/SMTP providers, so it makes sense to allow it as a
workflow.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NNCP proxy for Internet mail providers?
  2021-10-28  5:33 ` tidux
@ 2021-10-28  7:47   ` Sergey Matveev
  0 siblings, 0 replies; 8+ messages in thread
From: Sergey Matveev @ 2021-10-28  7:47 UTC (permalink / raw)
  To: nncp-devel

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

*** tidux@sdf•org [2021-10-28 05:33]:
>The use case is basically "IMAP server as remote backups" where even if
>your laptop gets run over by a truck you can still re-download all your
>mail from the server.

Personally I use Postfix'es "always_bcc" feature to make a copy of all
passing through correspondence, copying/backuping it separately. This is
for the case when I accidentally loose my main server/laptop. I can Bcc
to another server, storing all correspondence in single mbox/maildir.
They can be easily rsync-ed. In my opinion IMAP is a huge over engineering
and lack of simplicity and flexibility, if all you need is just a
storage, mainly append-only as a backup. However I am possibly far from
most user's use-cases related to email, because I have never ever used
IMAP at all, except for POP3 to download and remove correspondence from
public mail servers.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NNCP proxy for Internet mail providers?
  2021-10-27  2:18 ` John Goerzen
  2021-10-27  2:39   ` John Goerzen
@ 2021-10-27  8:19   ` Sergey Matveev
  1 sibling, 0 replies; 8+ messages in thread
From: Sergey Matveev @ 2021-10-27  8:19 UTC (permalink / raw)
  To: nncp-devel

[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

*** John Goerzen [2021-10-26 21:18]:
>I suspect you could make this work pretty easily with fetchmail
>(particularly with the --bsmtp command, for instance).  My Exim example at
>http://www.nncpgo.org/Exim.html illustrates using bsmtp over NNCP.  It could
>use --mda instead also.

And also it can be done with Postfix (+fdm/fetchmail/whatever) easily too:
http://www.nncpgo.org/Postfix.html

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NNCP proxy for Internet mail providers?
  2021-10-27  2:39   ` John Goerzen
@ 2021-10-27  3:03     ` tidux
  0 siblings, 0 replies; 8+ messages in thread
From: tidux @ 2021-10-27  3:03 UTC (permalink / raw)
  To: nncp-devel

On Tue, Oct 26, 2021 at 09:39:39PM -0500, John Goerzen wrote:
> You know, as the guy that wrote OfflineIMAP....
> 
> What would be REALLY cool would be a way to do an OfflineIMAP-style
> synchronization over NNCP.  That is, notice that certain changes have
> occurred on the local end, transmit commands via NNCP to cause those changes
> to occur on the IMAP server, and vice-versa.  As far as I know, there is
> nothing out there that can do that right now.  The closest you might come
> would be to use OfflineIMAP on a system with Internet connectivity, and then
> something like Syncthing to share a Maildir tree in an async fashion.
> However, I'm not really sure how reliable that would be. It is entirely
> possible it would have significant drawbacks.
> 
> Syncthing and NNCP are interesting partners.  I wrote about a few of the
> possibilities at https://changelog.complete.org/archives/10219-a-simple-delay-tolerant-offline-capable-mesh-network-with-syncthing-optional-nncp
> 
> - John

I thought about that, but it's actually a lot harder than it appears at
first glance.  You'd need something similar to isync/offlineimap to
track the IMAP IDs of individual messages in the maildir on the client
machine and then have a way of communicating, over NNCP, the changes
that should cause server side mutations (message deleted, moved to new
folder, etc.) back to the proxy host for translation into IMAP4 commands
to relay to the Internet mail server.  Even then that behavior has to be
a configuration toggle because sometimes you do just want the mailserver
to archive everything forever even if your client mailbox gets hosed.

That might look like a daemon that uses inotify to watch a maildir on
the client machine and then calls "nncp-file" to drop a file with the
message IDs and actions to be taken on the proxy server, where another
inotify watching daemon looks at the filesystem and translates into
IMAP4 data.  Something like 

/var/lib/nncp2imap/imapfs/{IMAP folder name}/{IMAP message server ID}/{action}

so nncp-file sends a 0 byte file named DELETE to

/var/lib/nncp2imap/imapfs/+INBOX/12345ABCD/DELETE

on the server, and then the watcher daemon sends a message to the IMAP
proxy daemon instructing the IMAP server to delete message ID 12345ABCD
from the user's inbox folder.

The danger of course is that a root exploit on the proxy server or a
rogue peer in your NNCP network can do arbitrary damage to your email
account, but that's not much different than the risks of running your
own mail server.  Key-only SSH with fail2ban and no other public
services except NNCP ought to mitigate most of the attack vectors.

We could call the daemons nncp-maildir-watcher, nncp-imapfs-watcher, 
nncp-imap4-proxy, and nncp-smtpsubmission-proxy.

- Jonathan Lane

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NNCP proxy for Internet mail providers?
  2021-10-27  2:18 ` John Goerzen
@ 2021-10-27  2:39   ` John Goerzen
  2021-10-27  3:03     ` tidux
  2021-10-27  8:19   ` Sergey Matveev
  1 sibling, 1 reply; 8+ messages in thread
From: John Goerzen @ 2021-10-27  2:39 UTC (permalink / raw)
  To: tidux; +Cc: nncp-devel

On Tue, Oct 26 2021, John Goerzen wrote:

> On Tue, Oct 26 2021, tidux@sdf•org wrote:
>
>> Would anyone be interested in a daemon or set of daemons that 
>> sat
>> between a "normal" IMAP4+SMTP-submission remote access mail 
>> host and a
>> local sendmail/nncp/postfix setup?  I figure this use case is 
>> what's
>
> That's a nice idea!
>
> So the idea is you have some Internet host -- maybe a cheap VPS 
> or something --
> that can download mail from the real provider, then gate it to 
> NNCP?
>
> I suspect you could make this work pretty easily with fetchmail 
> (particularly
> with the --bsmtp command, for instance).  My Exim example at
> http://www.nncpgo.org/Exim.html illustrates using bsmtp over 
> NNCP.  It could use
> --mda instead also.

You know, as the guy that wrote OfflineIMAP....

What would be REALLY cool would be a way to do an 
OfflineIMAP-style synchronization over NNCP.  That is, notice that 
certain changes have occurred on the local end, transmit commands 
via NNCP to cause those changes to occur on the IMAP server, and 
vice-versa.  As far as I know, there is nothing out there that can 
do that right now.  The closest you might come would be to use 
OfflineIMAP on a system with Internet connectivity, and then 
something like Syncthing to share a Maildir tree in an async 
fashion.  However, I'm not really sure how reliable that would be. 
It is entirely possible it would have significant drawbacks.

Syncthing and NNCP are interesting partners.  I wrote about a few 
of the possibilities at 
https://changelog.complete.org/archives/10219-a-simple-delay-tolerant-offline-capable-mesh-network-with-syncthing-optional-nncp

- John

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NNCP proxy for Internet mail providers?
  2021-10-26 23:25 tidux
@ 2021-10-27  2:18 ` John Goerzen
  2021-10-27  2:39   ` John Goerzen
  2021-10-27  8:19   ` Sergey Matveev
  0 siblings, 2 replies; 8+ messages in thread
From: John Goerzen @ 2021-10-27  2:18 UTC (permalink / raw)
  To: tidux; +Cc: nncp-devel

On Tue, Oct 26 2021, tidux@sdf•org wrote:

> Would anyone be interested in a daemon or set of daemons that 
> sat
> between a "normal" IMAP4+SMTP-submission remote access mail host 
> and a
> local sendmail/nncp/postfix setup?  I figure this use case is 
> what's

That's a nice idea!

So the idea is you have some Internet host -- maybe a cheap VPS or 
something -- that can download mail from the real provider, then 
gate it to NNCP?

I suspect you could make this work pretty easily with fetchmail 
(particularly with the --bsmtp command, for instance).  My Exim 
example at http://www.nncpgo.org/Exim.html illustrates using bsmtp 
over NNCP.  It could use --mda instead also.

- John

^ permalink raw reply	[flat|nested] 8+ messages in thread

* NNCP proxy for Internet mail providers?
@ 2021-10-26 23:25 tidux
  2021-10-27  2:18 ` John Goerzen
  0 siblings, 1 reply; 8+ messages in thread
From: tidux @ 2021-10-26 23:25 UTC (permalink / raw)
  To: nncp-devel

Would anyone be interested in a daemon or set of daemons that sat
between a "normal" IMAP4+SMTP-submission remote access mail host and a
local sendmail/nncp/postfix setup?  I figure this use case is what's
missing for broad adoption of NNCP - self hosting Internet mail is
basically a non-starter for everyone in the US due to ISPs blackholing
port 25 and major webmail providers refusing to relay from residential
ISP ranges for spam reasons.  This also allows "chaining" of proxies for
providers that use non-standard protocols, like DavMail for Exchange, or
Hydroxide for ProtonMail.  For a single user the proxies should be
lightweight enough to run on a Raspberry Pi or cheap $5/mo VPS.

Yes, this is dumb and lame and suboptimal, but short of legal action
requiring that home user IPs be treated like full equal peers on the
Internet, it's the best way to use NNCP for mail without dealing with
the headaches of managing PKI, SPF/DKIM auth, spam filtering, etc. which
make managing public email servers a pain in the ass.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-28  7:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  3:46 NNCP proxy for Internet mail providers? Koushik Roy
2021-10-28  5:33 ` tidux
2021-10-28  7:47   ` Sergey Matveev
  -- strict thread matches above, loose matches on Subject: below --
2021-10-26 23:25 tidux
2021-10-27  2:18 ` John Goerzen
2021-10-27  2:39   ` John Goerzen
2021-10-27  3:03     ` tidux
2021-10-27  8:19   ` Sergey Matveev