-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to debian 12, allow dkim prefix being variable
- Loading branch information
Showing
8 changed files
with
203 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Create and publish a Docker image | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, '#skip-build') }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: docker.io | ||
username: ${{ secrets.DOCKER_REGISTRY_USER }} | ||
password: ${{ secrets.DOCKER_REGISTRY_PASS }} | ||
|
||
- name: Log in to NETivism Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: rg.netivism.com.tw | ||
username: ${{ secrets.NETIVISM_REGISTRY_USER }} | ||
password: ${{ secrets.NETIVISM_REGISTRY_PASS }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ github.repository }} | ||
ghcr.io/${{ github.repository }} | ||
rg.netivism.com.tw/${{ github.repository }} | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env perl | ||
|
||
# postfix queue/s size | ||
# author: | ||
# source: http://tech.groups.yahoo.com/group/postfix-users/message/255133 | ||
|
||
use strict; | ||
use warnings; | ||
use Symbol; | ||
sub count { | ||
my ($dir) = @_; | ||
my $dh = gensym(); | ||
my $c = 0; | ||
opendir($dh, $dir) or die "$0: opendir: $dir: $!\n"; | ||
while (my $f = readdir($dh)) { | ||
if ($f =~ m{^[A-F0-9]{5,}$}) { | ||
++$c; | ||
} elsif ($f =~ m{^[A-F0-9]$}) { | ||
$c += count("$dir/$f"); | ||
} | ||
} | ||
closedir($dh) or die "closedir: $dir: $!\n"; | ||
return $c; | ||
} | ||
my $qdir = `postconf -h queue_directory`; | ||
chomp($qdir); | ||
chdir($qdir) or die "$0: chdir: $qdir: $!\n"; | ||
printf "Incoming: %d\n", count("incoming"); | ||
printf "Active: %d\n", count("active"); | ||
printf "Deferred: %d\n", count("deferred"); | ||
printf "Bounced: %d\n", count("bounce"); | ||
printf "Hold: %d\n", count("hold"); | ||
printf "Corrupt: %d\n", count("corrupt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
#!/bin/sh | ||
docker pull jimyhuang/docker-postfix-dovecot | ||
#docker pull rg.netivism.com.tw/netivism/docker-postfix-dovecot:develop | ||
docker stop dovecot | ||
docker rm dovecot | ||
docker run \ | ||
-dit --name dovecot \ | ||
-p 993:993 \ | ||
-p 587:587 \ | ||
-p 25:25 \ | ||
-p 2525:2525 \ | ||
-p 465:465 \ | ||
-e MAILNAME="static.jimmyhub.net" \ | ||
-e MAILADDR="testa@static.jimmyhub.net;testb@static.jimmyhub.net" \ | ||
-v /etc/postfix \ | ||
-v /etc/ssl \ | ||
-v /var/vmail/opendkim:/etc/opendkim \ | ||
-v /etc/dovecot \ | ||
-d --name dovecot \ | ||
-p 30993:993 \ | ||
-p 30587:587 \ | ||
-p 30025:25 \ | ||
-p 32525:2525 \ | ||
-p 30465:465 \ | ||
-v /var/vmail:/home/vmail \ | ||
-v /var/vmail/log:/var/log \ | ||
jimyhuang/docker-postfix-dovecot \ | ||
/init.sh | ||
-v /var/vmail/opendkim:/etc/opendkim \ | ||
-v /var/vmail/opendkim.conf:/etc/opendkim.conf \ | ||
-e "MAILNAME=test.netivism.com.tw" \ | ||
-e "TZ=Asia/Taipei" \ | ||
-e "DKIM_PREFIX=netimx" \ | ||
rg.netivism.com.tw/netivism/docker-postfix-dovecot:develop | ||
docker logs -f dovecot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,7 @@ msn.com turtle: | |
passport.com turtle: | ||
passport.net turtle: | ||
|
||
# icloud.com | ||
icloud.com turtle: | ||
|
||
gmail.com fast: |