Compare commits
10 Commits
4aefd6059b
...
ccb9974ac7
Author | SHA1 | Date | |
---|---|---|---|
ccb9974ac7 | |||
eb9d2c0a20 | |||
ec6fa0f2c3 | |||
00aaca260e | |||
2458c52211 | |||
77dedb09ac | |||
40e330c899 | |||
db1487974b | |||
fba756d7ac | |||
17449cfdb4 |
12
.gitea/workflows/container.yaml
Normal file
12
.gitea/workflows/container.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: Build Multiarch Container Image
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
call-reusable-workflow:
|
||||||
|
uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main
|
||||||
|
with:
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
ref_name: ${{ gitea.ref_name }}
|
||||||
|
sha: ${{ gitea.sha }}
|
||||||
|
registry_url: ${{ secrets.REGISTRY_URL }}
|
||||||
|
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||||
|
registry_pw: ${{ secrets.REGISTRY_PW }}
|
@ -1,18 +0,0 @@
|
|||||||
variables:
|
|
||||||
CONTAINER_NAME: thallian/postfix
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
image:
|
|
||||||
name: gcr.io/kaniko-project/executor:debug
|
|
||||||
entrypoint: [""]
|
|
||||||
script:
|
|
||||||
- mkdir -p /kaniko/.docker
|
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
|
||||||
- >-
|
|
||||||
/kaniko/executor
|
|
||||||
--context "$CI_PROJECT_DIR"
|
|
||||||
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
|
|
||||||
--destination "$CONTAINER_NAME:$CI_COMMIT_SHA"
|
|
||||||
--destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME"
|
|
||||||
--destination "$CONTAINER_NAME:latest"
|
|
@ -1,11 +1,12 @@
|
|||||||
FROM docker.io/thallian/confd-env:3.16
|
FROM docker.io/thallian/confd-env:3.19-3.1.6.2
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pgsql \
|
postfix-pgsql \
|
||||||
openssl \
|
openssl \
|
||||||
libstdc++ \
|
libstdc++ \
|
||||||
libmilter
|
libmilter \
|
||||||
|
icu-data-full
|
||||||
|
|
||||||
RUN addgroup -g 2222 access
|
RUN addgroup -g 2222 access
|
||||||
RUN addgroup postfix access
|
RUN addgroup postfix access
|
@ -1,29 +1,28 @@
|
|||||||
compatibility_level = 2
|
compatibility_level = 3.7
|
||||||
|
|
||||||
|
inet_protocols = all
|
||||||
|
|
||||||
mail_owner = postfix
|
mail_owner = postfix
|
||||||
myhostname = {{getenv "MYHOSTNAME"}}
|
myhostname = {{getenv "MYHOSTNAME"}}
|
||||||
mydomain = {{getenv "MYDOMAIN"}}
|
mydomain = {{getenv "MYDOMAIN"}}
|
||||||
myorigin = $mydomain
|
myorigin = $mydomain
|
||||||
mydestination = $myhostname, localhost
|
|
||||||
|
|
||||||
proxy_interfaces = {{getenv "EXTERNAL_IP"}}
|
|
||||||
|
|
||||||
unknown_local_recipient_reject_code = 550
|
unknown_local_recipient_reject_code = 550
|
||||||
mynetworks_style = host
|
|
||||||
relay_domains = $mydestination
|
relay_domains = $mydestination
|
||||||
recipient_delimiter = +
|
recipient_delimiter = +
|
||||||
|
|
||||||
mailbox_transport = lmtp:{{getenv "LMTP_HOST"}}
|
mailbox_transport = lmtp:{{getenv "LMTP_HOST"}}
|
||||||
mailbox_size_limit = {{getenv "MAILBOX_SIZELIMIT" "0"}}
|
mailbox_size_limit = {{getenv "MAILBOX_SIZELIMIT" "0"}}
|
||||||
smtpd_banner = {{getenv "SMTP_BANNER"}} $myhostname ESMTP $mail_name
|
smtpd_banner = {{getenv "SMTP_BANNER"}} $myhostname ESMTP $mail_name
|
||||||
|
smtp_helo_name = $mydomain
|
||||||
|
|
||||||
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql-virtual-mailbox-maps.cf
|
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql-virtual-mailbox-maps.cf
|
||||||
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql-virtual-mailbox-domains.cf
|
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql-virtual-mailbox-domains.cf
|
||||||
virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual-alias-maps.cf
|
virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual-alias-maps.cf
|
||||||
virtual_transport = lmtp:inet:{{getenv "LMTP_HOST"}}:{{getenv "LMTP_PORT"}}
|
virtual_transport = lmtp:inet:{{getenv "LMTP_HOST"}}:{{getenv "LMTP_PORT"}}
|
||||||
|
|
||||||
smtpd_tls_key_file=/etc/ssl/mail/tls.key
|
smtpd_tls_key_file=/etc/ssl/mail/key.pem
|
||||||
smtpd_tls_cert_file=/etc/ssl/mail/tls.crt
|
smtpd_tls_cert_file=/etc/ssl/mail/cert.pem
|
||||||
|
|
||||||
smtp_tls_security_level = {{getenv "TLS_SECURITY_LEVEL" "may"}}
|
smtp_tls_security_level = {{getenv "TLS_SECURITY_LEVEL" "may"}}
|
||||||
smtp_tls_auth_only = yes
|
smtp_tls_auth_only = yes
|
||||||
@ -59,8 +58,11 @@ smtpd_sasl_auth_enable = yes
|
|||||||
smtpd_tls_auth_only = yes
|
smtpd_tls_auth_only = yes
|
||||||
smtpd_sasl_tls_security_options = noanonymous
|
smtpd_sasl_tls_security_options = noanonymous
|
||||||
|
|
||||||
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
|
smtpd_relay_restrictions =
|
||||||
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination, reject_unverified_recipient
|
permit_mynetworks
|
||||||
|
permit_sasl_authenticated
|
||||||
|
defer_unauth_destination
|
||||||
|
reject_sender_login_mismatch
|
||||||
|
|
||||||
smtpd_sender_restrictions = reject_sender_login_mismatch
|
smtpd_sender_restrictions = reject_sender_login_mismatch
|
||||||
smtpd_sender_login_maps = pgsql:/etc/postfix/pgsql-login-maps.cf
|
smtpd_sender_login_maps = pgsql:/etc/postfix/pgsql-login-maps.cf
|
||||||
|
@ -2,4 +2,4 @@ hosts = {{ getenv "DB_HOST" }}
|
|||||||
user = {{ getenv "DB_USER" "email" }}
|
user = {{ getenv "DB_USER" "email" }}
|
||||||
password = {{ getenv "DB_PASSWORD" }}
|
password = {{ getenv "DB_PASSWORD" }}
|
||||||
dbname = {{ getenv "DB_NAME" "email" }}
|
dbname = {{ getenv "DB_NAME" "email" }}
|
||||||
query = SELECT email FROM virtual_users WHERE email='%u' UNION SELECT destination FROM virtual_aliases WHERE source='%u'
|
query = SELECT email FROM virtual_users WHERE email='%u' UNION SELECT destination FROM virtual_aliases WHERE source='%u' UNION SELECT email FROM virtual_users WHERE wildcard_sender = true AND domain_name = '%d'
|
||||||
|
Loading…
Reference in New Issue
Block a user