imapfilter: Switch to use pass command
The other office tools use the pass command so we switch this one to use it to unify invocation.
This commit is contained in:
parent
5d2542db51
commit
f2cb2f5be9
2 changed files with 7 additions and 7 deletions
|
@ -1,9 +1,9 @@
|
||||||
local accounts = {}
|
local accounts = {}
|
||||||
|
|
||||||
local status, gmailuser = pipe_from(
|
local _, gmailuser = pipe_from(
|
||||||
'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | grep username | cut -d: -f2')
|
'pass show misc/gmail-app-password | grep username | cut -d: -f2')
|
||||||
local status, gmailpass = pipe_from(
|
local _, gmailpass = pipe_from(
|
||||||
'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | head -n1')
|
'pass show misc/gmail-app-password | head -n1')
|
||||||
-- Setup an imap account called gmail
|
-- Setup an imap account called gmail
|
||||||
accounts.gmail = IMAP {
|
accounts.gmail = IMAP {
|
||||||
server = "imap.gmail.com",
|
server = "imap.gmail.com",
|
||||||
|
|
|
@ -30,11 +30,11 @@ function getSenderList(rollupfile)
|
||||||
for line in file:lines() do table.insert(rollupSenders, line) end
|
for line in file:lines() do table.insert(rollupSenders, line) end
|
||||||
else
|
else
|
||||||
print(
|
print(
|
||||||
"ERROR: rollup did not find rollup.txt file containing mail addresses at " ..
|
"rollup did not find rollup.txt file containing mail addresses at " ..
|
||||||
rollupfile or "")
|
rollupfile or ". Skipping.")
|
||||||
end
|
end
|
||||||
return rollupSenders
|
return rollupSenders
|
||||||
end
|
end
|
||||||
|
|
||||||
sendToFolder(accounts.gmail["Inbox"], accounts.gmail["Dump"],
|
sendToFolder(accounts.gmail["Inbox"], accounts.gmail["Dump"],
|
||||||
getSenderList(getRollupFile()))
|
getSenderList(getRollupFile()))
|
||||||
|
|
Loading…
Reference in a new issue