Update alot and a hook to report spam to posteo
This commit is contained in:
parent
db4d7de220
commit
e071340930
@ -3,7 +3,7 @@ initial_command = search tag:inbox
|
||||
periodic_hook_frequency = 60
|
||||
edit_headers_blacklist = Content-Type, MIME-Version
|
||||
attachment_prefix = /data/temporary
|
||||
prefer_plaintext = False
|
||||
prefer_plaintext = True
|
||||
|
||||
editor_cmd = st -e vis
|
||||
|
||||
@ -98,8 +98,7 @@ theme = "mutt"
|
||||
[[thread]]
|
||||
a = toggletags inbox ; fold
|
||||
A = toggletags inbox,muted ; fold
|
||||
n = nextpart
|
||||
p = prevpart
|
||||
n = togglemimepart
|
||||
r = reply --all
|
||||
u = pipeto --background selecturl
|
||||
1 = call hooks.delay(ui,1)
|
||||
|
@ -12,14 +12,25 @@ async def spam(ui):
|
||||
message = ui.current_buffer.get_selected_message()
|
||||
message.add_tags(['spam'])
|
||||
message.remove_tags(['unread'])
|
||||
envelope = Envelope(
|
||||
headers=dict(
|
||||
From=['Felix Van der Jeugt <felix.vanderjeugt@ugent.be>'],
|
||||
To=['spam@ugent.be'],
|
||||
Subject=['spam'],
|
||||
References=['<' + message.get_message_id() + '>']),
|
||||
bodytext='spam',
|
||||
tags=['spam'],
|
||||
account=settings.account_matching_address('felix.vanderjeugt@ugent.be'))
|
||||
if 'ugent' in message.get_tags():
|
||||
envelope = Envelope(
|
||||
headers=dict(
|
||||
From=['Felix Van der Jeugt <felix.vanderjeugt@ugent.be>'],
|
||||
To=['spam@ugent.be'],
|
||||
Subject=['spam'],
|
||||
References=['<' + message.get_message_id() + '>']),
|
||||
bodytext='spam',
|
||||
tags=['spam'],
|
||||
account=settings.account_matching_address('felix.vanderjeugt@ugent.be'))
|
||||
else:
|
||||
envelope = Envelope(
|
||||
headers=dict(
|
||||
From=['Felix Van der Jeugt <felix.vanderjeugt@posteo.net>'],
|
||||
To=['spamreport@posteo.de'],
|
||||
Subject=['spam'],
|
||||
References=['<' + message.get_message_id() + '>']),
|
||||
bodytext='',
|
||||
tags=['spam'],
|
||||
account=settings.account_matching_address('felix.vanderjeugt@posteo.net'))
|
||||
envelope.attach(message.get_filename())
|
||||
ui.buffer_open(EnvelopeBuffer(ui, envelope))
|
||||
|
Loading…
Reference in New Issue
Block a user