imapfilter hinzugefügt
This commit is contained in:
18
imapfilter/Dockerfile
Normal file
18
imapfilter/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM alpine:edge
|
||||
ENV IMAPFILTER_HOME=/volume/configuration
|
||||
VOLUME ${IMAPFILTER_HOME}
|
||||
WORKDIR ${IMAPFILTER_HOME}
|
||||
RUN set -xe \
|
||||
&& addgroup --gid 2000 app \
|
||||
&& adduser --uid 2000 --disabled-password --no-create-home --ingroup app app
|
||||
RUN set -xe \
|
||||
&& apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache \
|
||||
libcrypto3 libssl3 \
|
||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
|
||||
imapfilter \
|
||||
&& apk del --progress --purge \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
USER app
|
||||
ENTRYPOINT ["imapfilter"]
|
||||
38
imapfilter/config.lua.sample
Normal file
38
imapfilter/config.lua.sample
Normal file
@@ -0,0 +1,38 @@
|
||||
---------------
|
||||
-- Options --
|
||||
---------------
|
||||
|
||||
options.timeout = 120
|
||||
options.subscribe = true
|
||||
options.limit = 50
|
||||
|
||||
----------------
|
||||
-- Accounts --
|
||||
----------------
|
||||
|
||||
account1 = IMAP {
|
||||
server = 'imap.server.de',
|
||||
username = 'ChangeMe',
|
||||
password = 'ChangeMe',
|
||||
ssl = 'ssl3',
|
||||
}
|
||||
|
||||
-----------------
|
||||
-- Mailboxes --
|
||||
-----------------
|
||||
|
||||
check = account1.INBOX:check_status()
|
||||
|
||||
-- SPAM --
|
||||
|
||||
while true do
|
||||
|
||||
account1.INBOX:enter_idle()
|
||||
results = account1.INBOX:contain_field('X-Spam-Status','Yes') +
|
||||
account1.INBOX:contain_subject('Betreff Inhalt 1') +
|
||||
account1.INBOX:contain_subject('Betreff Inhalt 2') +
|
||||
account1.INBOX:contain_message('Text Inhalt 1') +
|
||||
account1.INBOX:contain_message('Text Inhalt 2')
|
||||
results:move_messages(account1['Spam'],results)
|
||||
|
||||
end
|
||||
11
imapfilter/docker-compose.yml
Normal file
11
imapfilter/docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "2"
|
||||
services:
|
||||
imapfilter:
|
||||
build: .
|
||||
container_name: imapfilter
|
||||
volumes:
|
||||
- ./:/volume/configuration
|
||||
- ./config.lua:/volume/configuration/config.lua:ro
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: "false"
|
||||
restart: always
|
||||
Reference in New Issue
Block a user