This commit is contained in:
Sakooooo 2024-10-09 19:27:32 +04:00
parent 891e7ce623
commit 4aad8660f7
Signed by: sako
GPG key ID: FE52FD65B76E4751
2 changed files with 26 additions and 1 deletions

View file

@ -13,6 +13,12 @@ def get_user(account):
return re.search(rb"login: (.*)", usercmd, flags=0).group(1).decode("utf-8") return re.search(rb"login: (.*)", usercmd, flags=0).group(1).decode("utf-8")
def get_host(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"host: (.*)", usercmd, flags=0).group(1).decode("utf-8")
def hydroxide(path): def hydroxide(path):
file = open(path, "r") file = open(path, "r")

View file

@ -91,3 +91,22 @@ oauth2_client_secret_eval = get_client_secret("email/oauth/gmail")
oauth2_refresh_token_eval = get_client_refresh_token("accounts.google.com/two") oauth2_refresh_token_eval = get_client_refresh_token("accounts.google.com/two")
# Google IMAP weirdness # Google IMAP weirdness
nametrans = lambda f: f.replace('[Gmail]/', '') if f.startswith('[Gmail]/') else f nametrans = lambda f: f.replace('[Gmail]/', '') if f.startswith('[Gmail]/') else f
[Account li]
localrepository = li-local
remoterepository = li-remote
proxy = SOCKS5:localhost:9050
[Repository li-local]
type = Maildir
localfolders = ~/Mail/li
[Repository li-remote]
type = IMAP
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
remotehosteval = get_host("email/li")
remoteport = 993
remoteusereval = get_user("email/li")
remotepasseval = get_pass("email/li")