Compare commits
No commits in common. "master" and "main" have entirely different histories.
|
@ -1 +0,0 @@
|
||||||
command.sh
|
|
31
Dockerfile
31
Dockerfile
|
@ -1,31 +0,0 @@
|
||||||
# Dockerfile References: https://docs.docker.com/engine/reference/builder/
|
|
||||||
|
|
||||||
# Start from python:3.9-alpine base image
|
|
||||||
FROM python:3.9-alpine
|
|
||||||
|
|
||||||
ENV PYTHONFAULTHANDLER=1 \
|
|
||||||
PYTHONUNBUFFERED=1 \
|
|
||||||
PYTHONHASHSEED=random \
|
|
||||||
PIP_NO_CACHE_DIR=off \
|
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
|
||||||
PIP_DEFAULT_TIMEOUT=100 \
|
|
||||||
POETRY_VERSION=1.1.13
|
|
||||||
|
|
||||||
RUN apk add --no-cache curl
|
|
||||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
|
||||||
|
|
||||||
ENV PATH="/root/.poetry/bin:${PATH}"
|
|
||||||
|
|
||||||
# Make dir app
|
|
||||||
WORKDIR /app
|
|
||||||
COPY poetry.lock pyproject.toml /app/
|
|
||||||
|
|
||||||
# Project initialization:
|
|
||||||
RUN poetry config virtualenvs.create false \
|
|
||||||
&& poetry install --no-dev --no-interaction --no-ansi
|
|
||||||
|
|
||||||
# Copy the source from the current directory to the Working Directory inside the container
|
|
||||||
COPY . /app
|
|
||||||
|
|
||||||
# Run the executable
|
|
||||||
CMD ["poetry", "run", "python", "mail-forwarder"]
|
|
|
@ -79,9 +79,9 @@ for num in msgs[0].split():
|
||||||
smtp.send_message(copied_msg, sender, recipient)
|
smtp.send_message(copied_msg, sender, recipient)
|
||||||
print("Message sent.")
|
print("Message sent.")
|
||||||
|
|
||||||
#print("Sending message to trash...")
|
print("Sending message to trash...")
|
||||||
#imap.store(num, '+FLAGS', '\\Deleted')
|
imap.store(num, '+FLAGS', '\\Deleted')
|
||||||
#print("Message marked for deletion...")
|
print("Message marked for deletion...")
|
||||||
|
|
||||||
imap.expunge()
|
imap.expunge()
|
||||||
imap.close()
|
imap.close()
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
package = []
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
lock-version = "1.1"
|
|
||||||
python-versions = "^3.9"
|
|
||||||
content-hash = "ce2aa767160f871dd3652615ba0a0dceb7733d62eb8cb4665b87f30a562e3adf"
|
|
||||||
|
|
||||||
[metadata.files]
|
|
|
@ -10,5 +10,5 @@ python = "^3.9"
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.1.13"]
|
requires = ["poetry-core>=1.0.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
Loading…
Reference in New Issue