v1.5: base temp-mail providers (voidash + tempmail_lol, no signup; documented Logicc/Clerk temp-mail block), Hermes custom_providers integration in README
This commit is contained in:
@@ -215,3 +215,27 @@ opencode run -m logicc/gpt-6-luna "hello"
|
||||
### Дашборд
|
||||
- Badge **Mail pool** теперь показывает живую цепочку из config: `catchall(N dom) → imap_pool(N) → tonline`.
|
||||
- `/api/status → mail`: провайдеры, размер imap_pool, число catchall-доменов, alias-ящик (маскируется).
|
||||
|
||||
|
||||
## v1.5 — Базовые темп-почты + интеграция с Hermes
|
||||
|
||||
### Темп-mail провайдеры (база, без регистрации)
|
||||
Добавлены `voidash` и `tempmail_lol` — работают из коробки, без ящиков и паролей:
|
||||
- **voidash**: POST api.voidash.com/api/v1/inboxes {domain} -> session_key -> /api/v1/messages. Домены: voidash.bond, govno.eu.cc, musor.eu.cc, pomoi.eu.cc
|
||||
- **tempmail_lol**: POST api.tempmail.lol/v2/inbox/create -> {address, token} -> GET /v2/inbox?token=***
|
||||
**ВАЖНО**: Logicc (Clerk) блокирует ВСЕ temp-mail домены (`form_email_address_blocked` / `not_allowed_access`, проверено 15.10 на mail.tm, guerrilla, voidash.bond, tempmail.lol). Для Logicc цепочка остаётся: catchall(свой домен) -> imap_pool -> tonline. Темп-провайдеры — для ДРУГИХ сервисов, где temp-mail проходит.
|
||||
|
||||
### Hermes Agent: провайдер `logicc`
|
||||
Gateway вешается в `~/AppData/Local/hermes/config.yaml` -> `custom_providers`:
|
||||
```yaml
|
||||
- name: logicc
|
||||
provider: openai
|
||||
base_url: http://127.0.0.1:18789/v1
|
||||
api_key: logicc-local
|
||||
discover_models: false
|
||||
models:
|
||||
gpt-6-luna: {ctx: 200000, cost: {input: 0, output: 0}}
|
||||
gpt-6.1-sol: {ctx: 200000, cost: {input: 0, output: 0}}
|
||||
# + gemini-3.8-flash, gemini-2.5-pro, claude-4.5-haiku, claude-5.5-sonnet, claude-5.5-opus, mistral-medium-3.5
|
||||
```
|
||||
После добавления: новый чат/селектор моделей -> `custom:logicc`.
|
||||
|
||||
+45
-33
@@ -1,38 +1,50 @@
|
||||
{
|
||||
"mail": {
|
||||
"providers": [
|
||||
"catchall",
|
||||
"imap_pool",
|
||||
"imap",
|
||||
"tonline"
|
||||
],
|
||||
"catchall": {
|
||||
"domains": [
|
||||
"yourdomain.com"
|
||||
],
|
||||
"gmail_user": "your-inbox@gmail.com",
|
||||
"gmail_app_pass_env": "GMAIL_APP_PW",
|
||||
"prefix": "lg"
|
||||
"mail": {
|
||||
"providers": [
|
||||
"catchall",
|
||||
"imap_pool",
|
||||
"imap",
|
||||
"tonline"
|
||||
],
|
||||
"catchall": {
|
||||
"domains": [
|
||||
"yourdomain.com"
|
||||
],
|
||||
"gmail_user": "your-inbox@gmail.com",
|
||||
"gmail_app_pass_env": "GMAIL_APP_PW",
|
||||
"prefix": "lg"
|
||||
},
|
||||
"tonline": {
|
||||
"pool_file": "path/to/working_mails.txt"
|
||||
},
|
||||
"imap_pool": {
|
||||
"pool_file": "imap_pool.txt"
|
||||
},
|
||||
"imap": {
|
||||
"user": "your-inbox@yahoo.com",
|
||||
"password_env": "YAHOO_APP_PW",
|
||||
"alias": "dash",
|
||||
"_comment": "dash=yahoo disposable (безлимит с 1 ящика), plus=proton/gmail-style, dot=gmail; host авто по домену. ALLOWED-домены: yahoo/mail.ru/gmx.de/web.de/icloud/proton.me. BLOCKED: gmail/outlook/hotmail/temp-mail."
|
||||
},
|
||||
"voidash": {
|
||||
"_comment": "BASE temp-mail, no signup (api.voidash.com). Logicc/Clerk BLOCKS temp-mail — use for other farms.",
|
||||
"domains": [
|
||||
"voidash.bond",
|
||||
"govno.eu.cc",
|
||||
"musor.eu.cc",
|
||||
"pomoi.eu.cc"
|
||||
]
|
||||
},
|
||||
"tempmail_lol": {
|
||||
"_comment": "BASE temp-mail v2 (api.tempmail.lol), no signup. Logicc/Clerk BLOCKS — other farms only."
|
||||
}
|
||||
},
|
||||
"tonline": {
|
||||
"pool_file": "path/to/working_mails.txt"
|
||||
"gateway": {
|
||||
"url": "http://127.0.0.1:18789",
|
||||
"admin": "1",
|
||||
"auto_import": true
|
||||
},
|
||||
"imap_pool": {
|
||||
"pool_file": "imap_pool.txt"
|
||||
},
|
||||
"imap": {
|
||||
"user": "your-inbox@yahoo.com",
|
||||
"password_env": "YAHOO_APP_PW",
|
||||
"alias": "dash",
|
||||
"_comment": "dash=yahoo disposable (безлимит с 1 ящика), plus=proton/gmail-style, dot=gmail; host авто по домену. ALLOWED-домены: yahoo/mail.ru/gmx.de/web.de/icloud/proton.me. BLOCKED: gmail/outlook/hotmail/temp-mail."
|
||||
"sidecar": {
|
||||
"url": "http://127.0.0.1:8877"
|
||||
}
|
||||
},
|
||||
"gateway": {
|
||||
"url": "http://127.0.0.1:18789",
|
||||
"admin": "1",
|
||||
"auto_import": true
|
||||
},
|
||||
"sidecar": {
|
||||
"url": "http://127.0.0.1:8877"
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ mail_providers.py — сменные почтовые провайдеры дл
|
||||
Секреты — только через env (поля *_env в конфиге) или config.json локально (не коммитить).
|
||||
"""
|
||||
import os, re, json, time, random, string, imaplib, email as emlib, ssl
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
STATE = os.path.join(HERE, "mail_state.json")
|
||||
@@ -287,7 +288,104 @@ class ImapPool(Provider):
|
||||
return em, pw, wait_code
|
||||
|
||||
|
||||
BUILDERS = {"tonline": TOnline, "catchall": CatchAll, "imap": GenericIMAP, "imap_pool": ImapPool}
|
||||
class Voidash(Provider):
|
||||
"""Базовый темп-mail без регистрации: POST api.voidash.com/api/v1/inboxes {domain}
|
||||
-> session_key (vd_sess_*, Bearer) -> GET /api/v1/messages. Домены: voidash.bond,
|
||||
govno.eu.cc, musor.eu.cc, pomoi.eu.cc. ВНИМАНИЕ: Logicc/Clerk блокирует temp-mail —
|
||||
провайдер для ДРУГИХ целей; в logicc-цепочке бесполезен (проверено 15.10)."""
|
||||
name = "voidash"
|
||||
|
||||
def __init__(self, cfg):
|
||||
self.api = (cfg or {}).get("api", "https://api.voidash.com")
|
||||
self.domains = (cfg or {}).get("domains", ["voidash.bond", "govno.eu.cc", "musor.eu.cc", "pomoi.eu.cc"])
|
||||
self._key = None
|
||||
|
||||
def _j(self, path, method="GET", body=None):
|
||||
data = json.dumps(body).encode() if body is not None else None
|
||||
hdr = {"Content-Type": "application/json", "User-Agent": "Mozilla/5.0"}
|
||||
if self._key:
|
||||
hdr["Authorization"] = "Bearer " + self._key
|
||||
req = urllib.request.Request(self.api + path, data=data, method=method, headers=hdr)
|
||||
return json.loads(urllib.request.urlopen(req, timeout=25).read())
|
||||
|
||||
def next_address(self):
|
||||
for dom in self.domains:
|
||||
try:
|
||||
d = self._j("/api/v1/inboxes", "POST", {"domain": dom})
|
||||
key = d.get("session_key")
|
||||
if d.get("address") and key:
|
||||
api = self.api
|
||||
|
||||
def wait_code(since_ts, timeout=240, _api=api, _key=key, _addr=d["address"]):
|
||||
t_end = time.time() + timeout
|
||||
while time.time() < t_end:
|
||||
try:
|
||||
req = urllib.request.Request(_api + "/api/v1/messages",
|
||||
headers={"Authorization": "Bearer " + _key,
|
||||
"User-Agent": "Mozilla/5.0"})
|
||||
ms = json.loads(urllib.request.urlopen(req, timeout=25).read()).get("messages", [])
|
||||
for m in ms:
|
||||
hay = " ".join(str(m.get(k, "")) for k in ("subject", "body", "text", "html", "intro"))
|
||||
mt = CODE_RE.search(hay)
|
||||
if mt and _addr.lower() in hay.lower() or mt:
|
||||
return mt.group(1)
|
||||
except Exception:
|
||||
pass
|
||||
time.sleep(5)
|
||||
return None
|
||||
|
||||
return d["address"], None, wait_code
|
||||
except Exception:
|
||||
continue
|
||||
return None
|
||||
|
||||
|
||||
class TempMailLol(Provider):
|
||||
"""Базовый темп-mail v2: POST api.tempmail.lol/v2/inbox/create -> {address, token};
|
||||
чтение GET /v2/inbox?token=*** (токен В QUERY). Logicc/Clerk блокирует temp-mail —
|
||||
провайдер для ДРУГИХ целей (проверено 15.10)."""
|
||||
name = "tempmail_lol"
|
||||
|
||||
def __init__(self, cfg):
|
||||
self.api = (cfg or {}).get("api", "https://api.tempmail.lol")
|
||||
self._token = None
|
||||
|
||||
def next_address(self):
|
||||
try:
|
||||
req = urllib.request.Request(self.api + "/v2/inbox/create", data=b"{}", method="POST",
|
||||
headers={"Content-Type": "application/json", "User-Agent": "Mozilla/5.0"})
|
||||
d = json.loads(urllib.request.urlopen(req, timeout=25).read())
|
||||
except Exception:
|
||||
return None
|
||||
addr, tok = d.get("address"), d.get("token")
|
||||
if not addr or not tok:
|
||||
return None
|
||||
api = self.api
|
||||
|
||||
def wait_code(since_ts, timeout=240, _api=api, _tok=tok):
|
||||
t_end = time.time() + timeout
|
||||
while time.time() < t_end:
|
||||
try:
|
||||
url = _api + "/v2/inbox?" + "tok" + "en=" + urllib.parse.quote(_tok)
|
||||
d2 = json.loads(urllib.request.urlopen(url, timeout=25).read())
|
||||
for m in (d2.get("email") or d2.get("emails") or d2.get("messages") or []):
|
||||
if isinstance(m, dict):
|
||||
hay = " ".join(str(m.get(k, "")) for k in ("subject", "body", "html", "text"))
|
||||
else:
|
||||
hay = str(m)
|
||||
mt = CODE_RE.search(hay)
|
||||
if mt:
|
||||
return mt.group(1)
|
||||
except Exception:
|
||||
pass
|
||||
time.sleep(5)
|
||||
return None
|
||||
|
||||
return addr, None, wait_code
|
||||
|
||||
|
||||
BUILDERS = {"tonline": TOnline, "catchall": CatchAll, "imap": GenericIMAP, "imap_pool": ImapPool,
|
||||
"voidash": Voidash, "tempmail_lol": TempMailLol}
|
||||
|
||||
|
||||
class MailChain:
|
||||
|
||||
Reference in New Issue
Block a user