Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 929d028a8f | |||
| e0bfa7c8e6 | |||
| 017813aef2 | |||
| 912fae0313 | |||
| a2c855986b | |||
| 448f7135fd | |||
| c761f3aeb9 | |||
| 9296bebcf8 | |||
| 0fcb335d2d | |||
| b59c2c3ea2 | |||
| 4d531c2af9 | |||
| 10459d7ae8 | |||
| 700629a8f9 | |||
| 06e0833b75 | |||
| a478e58aa9 | |||
| 552715382d | |||
| 2f61a64ef0 | |||
| 0e47e74ac5 | |||
| bb96283ad5 |
@@ -1,7 +1,10 @@
|
|||||||
when:
|
when:
|
||||||
branch: dev
|
branch: dev
|
||||||
|
event: [push, manual]
|
||||||
|
path:
|
||||||
|
include: [ '.woodpecker/build-dev.yaml', 'build/*', 'Dockerfile' ]
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build_and_publish:
|
build_and_publish:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
@@ -11,7 +14,3 @@ pipeline:
|
|||||||
context: ./build
|
context: ./build
|
||||||
repo: vistanarvas/${CI_REPO_NAME}
|
repo: vistanarvas/${CI_REPO_NAME}
|
||||||
tag: dev
|
tag: dev
|
||||||
when:
|
|
||||||
path:
|
|
||||||
include: [ '.woodpecker/build-dev.yaml', 'build/*', 'Dockerfile' ]
|
|
||||||
event: [push, manual]
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
|
path:
|
||||||
|
include: [ '.woodpecker/build.yml', 'build/*', 'Dockerfile' ]
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
check_base:
|
check_base:
|
||||||
image: vistanarvas/container-update-checker:latest
|
image: vistanarvas/container-update-checker:latest
|
||||||
secrets:
|
secrets:
|
||||||
@@ -14,7 +16,11 @@ pipeline:
|
|||||||
when:
|
when:
|
||||||
cron: nightly
|
cron: nightly
|
||||||
event: cron
|
event: cron
|
||||||
|
|
||||||
build_and_publish:
|
build_and_publish:
|
||||||
|
when:
|
||||||
|
event: [push, tag, deployment, manual, cron]
|
||||||
|
cron: nightly
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
username: vistanarvas
|
username: vistanarvas
|
||||||
@@ -23,8 +29,3 @@ pipeline:
|
|||||||
context: ./build
|
context: ./build
|
||||||
repo: vistanarvas/${CI_REPO_NAME}
|
repo: vistanarvas/${CI_REPO_NAME}
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
when:
|
|
||||||
path:
|
|
||||||
include: [ '.woodpecker/build.yml', 'build/*', 'Dockerfile' ]
|
|
||||||
cron: nightly
|
|
||||||
event: [push, tag, deployment, cron, manual]
|
|
||||||
|
|||||||
25
README.md
25
README.md
@@ -1,4 +1,5 @@
|
|||||||
# msmtp
|
# msmtp
|
||||||
|
[](https://woodpecker.narvas.tech/vista/msmtp)
|
||||||
|
|
||||||
send mail from your container
|
send mail from your container
|
||||||
this image is intended to be used in a CI piple
|
this image is intended to be used in a CI piple
|
||||||
@@ -28,7 +29,7 @@ using this way other proccesses could provide the email content
|
|||||||
all of these are optinal but when uses the overwrite the counterpart variable
|
all of these are optinal but when uses the overwrite the counterpart variable
|
||||||
| Variable Name | Description |
|
| Variable Name | Description |
|
||||||
|--------------------|-------------|
|
|--------------------|-------------|
|
||||||
|`MSMTP_CONFIG_FILE` | This is the config file msmtp uses<br>this replaces the need for most other Environment variables<br>When you use this only `EMAIL` or `TO_ADDRESSES`, `SUBJECT`, `MESSAGE` are requered<br>to see what the file sould contain have a look at the [Documentation](https://marlam.de/msmtp/msmtp.html#Configuration-files) or a [Example](https://marlam.de/msmtp/msmtprc.txt)
|
|`MSMTP_CONFIG_FILE` | This is the config file msmtp uses<br>this replaces the need for most other Environment variables<br>When you use this only `EMAIL` or `TO_ADDRESSES`, `SUBJECT`, `MESSAGE` are requered<br>to see what the file sould contain have a look at the [Documentation](https://marlam.de/msmtp/msmtp.html#Configuration-files) or a [Example](https://marlam.de/msmtp/msmtprc.txt)<br>the file **MUST** have [permissions](https://linuxcommand.org/lc3_lts0090.php) set to 600
|
||||||
|`SMTP_HOST_FILE` |
|
|`SMTP_HOST_FILE` |
|
||||||
|`SMTP_PORT_FILE` |
|
|`SMTP_PORT_FILE` |
|
||||||
|`SMTP_FROM_FILE` |
|
|`SMTP_FROM_FILE` |
|
||||||
@@ -38,7 +39,7 @@ all of these are optinal but when uses the overwrite the counterpart variable
|
|||||||
|
|
||||||
## Writing the email
|
## Writing the email
|
||||||
|
|
||||||
There a 2 ways to write the actual email
|
There are 2 ways to write the actual email
|
||||||
### the first way
|
### the first way
|
||||||
provide the `TO_ADDRESSES` and `SUBJECT` and `MESSAGE` environment variables
|
provide the `TO_ADDRESSES` and `SUBJECT` and `MESSAGE` environment variables
|
||||||
this is a very basic and simple way to write the email
|
this is a very basic and simple way to write the email
|
||||||
@@ -55,6 +56,26 @@ Subject: The subject (followd by a empty line)
|
|||||||
This is the first like of the body
|
This is the first like of the body
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## CI example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
pipeline:
|
||||||
|
send_mail:
|
||||||
|
image: vistanarvas/msmtp
|
||||||
|
secrets:
|
||||||
|
- source: email_password
|
||||||
|
target: SMTP_PASSWORD
|
||||||
|
- source: email_user
|
||||||
|
target: SMTP_USER
|
||||||
|
- source: email_user
|
||||||
|
target: SMTP_FROM
|
||||||
|
environment:
|
||||||
|
- SMTP_HOST=smtp.gamil.com
|
||||||
|
- TO_ADDRESSES=alice@gmail.com, bob@hotmail.com
|
||||||
|
- SUBJECT=title of the email
|
||||||
|
- MESSAGE=body of the email
|
||||||
|
```
|
||||||
|
|
||||||
## Defaults for popular mail servers
|
## Defaults for popular mail servers
|
||||||
if its not on the list figger it out yourself *and make a pull request*
|
if its not on the list figger it out yourself *and make a pull request*
|
||||||
tip: search for your servers imap clent settings usually it also lists smtp settings
|
tip: search for your servers imap clent settings usually it also lists smtp settings
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
|
|
||||||
if [ -n "${SMTP_HOST_FILE}" ]; then
|
if [ -n "${SMTP_HOST_FILE}" ]; then
|
||||||
SMTP_HOST=$cat ${SMTP_HOST_FILE});
|
SMTP_HOST=$(cat ${SMTP_HOST_FILE});
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${SMTP_PORT_FILE}" ]; then
|
if [ -n "${SMTP_PORT_FILE}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user