Emails processing system based on ethereum contracts

mathias1974mathias1974 Posts: 4Member
The system helps to organize priority delivery between mail servers and their users. E.g. mails can be marked as "priority" in inbox.
It can also work as a blocking filter from unwanted mailings.

github repository:
https://github.com/mathias1974/priority_delivery

How it works:

Host AA.com going to send an email to host BB.net

AA.com needs to make a deposit ETH/ETC to contract of host BB.net for open a "trusted channel". Each channel has a size = the number of allowed emails per hour, eg 100 emails/hr. Size depends from a deposit amount.

Host BB.net can lock this channel and it's deposit.

Trusted channel have infitity life cycle before it will be closed or locked. It means you can open channel for 200 emails/hr and send there within a years with such speed, but if you start to send not an "important" emails - deposit will be locked.

Admin of BB.net can unlock and return deposit to AA.com manually, in case if there was some mistake.
In other case deposit goes to cover transaction fees of "positive closed channels" or to the ethereum developers. In other words - locked deposit will be burnt or send as a donation to someone (who is not an interested party at all).

AA.com (sender) pays additional amount = transaction fee to close a channel. When the recipient (BB.net) blocks a channel and spends a fee for such transaction - the same reserved amount is returned to its public key at the same call. This makes the process of locking channel free for host BB.net

One host have one contract address for all incomming emails(hosts).

Have a look on to this contract - it is an ID created for only my smtp server:
https://etherscan.io/address/0x1e1b411b7c5fbc28e2ea3e3e84de3a9cc4ec8780

Here was opened two channels for 100 emails/hr:
https://etherscan.io/tx/0xa58b6985cd2cd8b12a2c0444b7bd8fcde35e1e20f49c41a39c708013ed199f50
https://etherscan.io/tx/0x581b936fc574ededba8cac31166db20fbd152a3bde93841b46932c332ba3e257

one for 300 emails/hr:
https://etherscan.io/tx/0x079736d6a4d4616b3defda6c6a76c2cf71e0fd7ef0d3dd2740618b273f87cf3f

one for 600 emails/hr:
https://etherscan.io/tx/0xcc1a6816aa5fe3d72e82132d5b79180b30b1ef9595d24bdb380951dabe10949e

then one for 800 emails/hr:
https://etherscan.io/tx/0x615d7d5f5464741f08ede13e6b0283906777c549e6c55fa3b0b8305c2d9a1af8

Then the second channel was locked:
https://etherscan.io/tx/0x0ba799924afaaf5f78866ebaf8ef2a87c3d1620f583d3eec2a511a2d5afae720

In the transaction above "TRANSFER 0.00023529 Ether to ... " equally "Actual Tx Cost/Fee: 0.00023529 Ether"

Transaction fee cost was returned to admin public key - for recipient admin this action was free:
https://etherscan.io/address/0x1e1b411b7c5fbc28e2ea3e3e84de3a9cc4ec8780#internaltx

.

It's a plugin for Haraka smtp server. Haraka works as a filtering MTA for other servers (Postfix etc) https://haraka.github.io/about.html
Sign In or Register to comment.