postfix_admin 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/README.md +18 -7
- data/docker-app/Dockerfile +2 -1
- data/lib/postfix_admin/models/admin.rb +3 -1
- data/lib/postfix_admin/version.rb +1 -1
- data/postfix_admin.gemspec +4 -3
- metadata +23 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18c555a04aae964ad497c66346873a931b426a2e477e8c312bb2a19e006d7385
|
|
4
|
+
data.tar.gz: 825fc06ba6263ac64f3b069b9567e758ec92fe602103be6816a176631a29442d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1a94e1ebb7266809c79c6a6260c0835ec42f024ab2f19cf6148f6de52b2aedb9fb9766c6c009015aaa0b390d97ff28a90673046b3e780785135f0aa4380ead0
|
|
7
|
+
data.tar.gz: aad7e69eca300445c535e4b6a41c1ec40a914c633de36da2e95265e29054cb45a2ae6ac346c04a5806d4baab39d8ffb10150f94c850fd1a823664cd4536779ac
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
strategy:
|
|
26
26
|
matrix:
|
|
27
|
-
ruby-version: ['2.
|
|
27
|
+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
|
|
28
28
|
|
|
29
29
|
steps:
|
|
30
30
|
- uses: actions/checkout@v4
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
- name: Copy my.cnf (for `rake setup_test_db`)
|
|
43
43
|
run: cp ./spec/misc/ci.my.cnf ~/.my.cnf
|
|
44
44
|
- name: docker-compose up
|
|
45
|
-
run: docker
|
|
45
|
+
run: docker compose up -d db
|
|
46
46
|
- name: Sleep (work around)
|
|
47
47
|
# wait-for-it.sh doesn't work with docker compose port mapping
|
|
48
48
|
run: sleep 10
|
data/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# postfix_admin
|
|
4
4
|
|
|
5
|
-
Command Line
|
|
5
|
+
Command Line Tool for PostfixAdmin
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
9
|
-
*
|
|
10
|
-
+ Web Site http://postfixadmin.sourceforge.net/
|
|
9
|
+
* PostfixAdmin (Official Web-based Application)
|
|
11
10
|
+ GitHub https://github.com/postfixadmin/postfixadmin
|
|
11
|
+
+ Note: This CLI tool is a third-party implementation
|
|
12
12
|
|
|
13
|
-
* Supports
|
|
13
|
+
* Supports PostfixAdmin 3.2
|
|
14
14
|
|
|
15
15
|
* Supports MySQL/MariaDB
|
|
16
16
|
|
|
@@ -18,10 +18,15 @@ Command Line Tools for Postfix Admin
|
|
|
18
18
|
|
|
19
19
|
## Requirements
|
|
20
20
|
|
|
21
|
-
* Ruby 2.
|
|
21
|
+
* Ruby 2.7 - 3.4
|
|
22
22
|
* MySQL/MariaDB
|
|
23
23
|
* Dovecot (required for setting passwords using the `doveadm pw` subcommand)
|
|
24
24
|
|
|
25
|
+
## Version Notes
|
|
26
|
+
|
|
27
|
+
* Version 0.4.x: Based on Active Record 7.0
|
|
28
|
+
* Version 0.3.3: Based on Active Record 6.1
|
|
29
|
+
|
|
25
30
|
## Installation
|
|
26
31
|
|
|
27
32
|
Install `postfix_admin` using:
|
|
@@ -63,27 +68,33 @@ List the `postfix_admin` subcommands with:
|
|
|
63
68
|
```
|
|
64
69
|
Commands:
|
|
65
70
|
postfix_admin account_passwd user@example.com new_password # Change the password of an account
|
|
71
|
+
postfix_admin accounts # List all accounts
|
|
66
72
|
postfix_admin add_account user@example.com password # Add a new account
|
|
67
73
|
postfix_admin add_admin admin@example.com password # Add a new admin user
|
|
68
74
|
postfix_admin add_admin_domain admin@example.com example.com # Grant an admin user access to a specific domain
|
|
69
75
|
postfix_admin add_alias alias@example.com goto@example.net # Add a new alias
|
|
70
76
|
postfix_admin add_domain example.com # Add a new domain
|
|
71
77
|
postfix_admin admin_passwd admin@example.com new_password # Change the password of an admin user
|
|
78
|
+
postfix_admin admins # List all admin users
|
|
79
|
+
postfix_admin aliases # List all aliases
|
|
72
80
|
postfix_admin delete_account user@example.com # Delete an account
|
|
73
81
|
postfix_admin delete_admin admin@example.com # Delete an admin user
|
|
74
82
|
postfix_admin delete_admin_domain admin@example.com example.com # Revoke an admin user's access to a specific domain
|
|
75
83
|
postfix_admin delete_alias alias@example.com # Delete an alias
|
|
76
84
|
postfix_admin delete_domain example.com # Delete a domain
|
|
85
|
+
postfix_admin domains # List all domains
|
|
77
86
|
postfix_admin dump # Dump all data
|
|
78
87
|
postfix_admin edit_account user@example.com # Edit an account
|
|
79
88
|
postfix_admin edit_admin admin@example.com # Edit an admin user
|
|
80
89
|
postfix_admin edit_alias alias@example.com # Edit an alias
|
|
81
90
|
postfix_admin edit_domain example.com # Edit a domain
|
|
91
|
+
postfix_admin forwards # List all forwards
|
|
82
92
|
postfix_admin help [COMMAND] # Describe available commands or one specific command
|
|
83
93
|
postfix_admin log # Display action logs
|
|
84
94
|
postfix_admin schemes # List all supported password schemes
|
|
85
|
-
postfix_admin setup example.com password # Set up a domain
|
|
95
|
+
postfix_admin setup example.com password # Set up a domain (add a domain and an admin user for it)
|
|
86
96
|
postfix_admin show [example.com | admin@example.com | user@example.com] # Display details about domains, admins, or accounts
|
|
87
97
|
postfix_admin summary [example.com] # Summarize the usage of PostfixAdmin
|
|
88
|
-
postfix_admin
|
|
98
|
+
postfix_admin teardown example.com # Tear down a domain (delete a domain and an admin user for it)
|
|
99
|
+
postfix_admin version # Display the version of postfix_admin
|
|
89
100
|
```
|
data/docker-app/Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM ruby:2.
|
|
1
|
+
FROM ruby:2.7
|
|
2
2
|
|
|
3
3
|
RUN apt-get update && \
|
|
4
4
|
apt-get install -y dovecot-core iproute2 mariadb-client && \
|
|
@@ -9,6 +9,7 @@ WORKDIR /app
|
|
|
9
9
|
COPY Gemfile postfix_admin.gemspec ./
|
|
10
10
|
COPY ./lib/postfix_admin/version.rb ./lib/postfix_admin/version.rb
|
|
11
11
|
|
|
12
|
+
# The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22.
|
|
12
13
|
RUN gem install bundler -v 2.4.22 && bundle install
|
|
13
14
|
|
|
14
15
|
COPY spec/postfix_admin.conf /root/.postfix_admin.conf
|
|
@@ -34,7 +34,9 @@ module PostfixAdmin
|
|
|
34
34
|
has_many :rel_domains, through: :domain_admins
|
|
35
35
|
|
|
36
36
|
attr_accessor :domain_ids
|
|
37
|
-
|
|
37
|
+
# TODO: Commented out due to ActiveRecord 7.0 compatibility
|
|
38
|
+
# ActiveRecord 7.0 requires DB connection when using attribute method at class loading time
|
|
39
|
+
# attribute :form_super_admin, :boolean, default: false
|
|
38
40
|
|
|
39
41
|
# just in case
|
|
40
42
|
validate on: :update do |admin|
|
data/postfix_admin.gemspec
CHANGED
|
@@ -7,13 +7,13 @@ Gem::Specification.new do |gem|
|
|
|
7
7
|
gem.email = ["hitoshi@nextseed.jp"]
|
|
8
8
|
|
|
9
9
|
gem.summary = gem.description
|
|
10
|
-
gem.description = %q{Command Line
|
|
10
|
+
gem.description = %q{Command Line Tool for PostfixAdmin}
|
|
11
11
|
gem.homepage = "https://github.com/krhitoshi/postfix_admin"
|
|
12
12
|
|
|
13
|
-
gem.required_ruby_version = ">= 2.
|
|
13
|
+
gem.required_ruby_version = ">= 2.7.0", "< 3.5"
|
|
14
14
|
|
|
15
15
|
gem.add_dependency "thor", "~> 1.3.1"
|
|
16
|
-
gem.add_dependency "activerecord", "~>
|
|
16
|
+
gem.add_dependency "activerecord", "~> 7.0.0"
|
|
17
17
|
gem.add_dependency "mysql2", "~> 0.5"
|
|
18
18
|
gem.add_dependency "terminal-table", "~> 3.0.2"
|
|
19
19
|
gem.add_development_dependency "pry"
|
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |gem|
|
|
|
21
21
|
gem.add_development_dependency "rake", "~> 13.2.1"
|
|
22
22
|
gem.add_development_dependency "rubocop"
|
|
23
23
|
gem.add_development_dependency "rspec", "~> 3.13.0"
|
|
24
|
+
gem.add_development_dependency "observer" # Required for Ruby 3.4+
|
|
24
25
|
|
|
25
26
|
# Specify which files should be added to the gem when it is released.
|
|
26
27
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postfix_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hitoshi Kurokawa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 7.0.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 7.0.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: mysql2
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -136,7 +136,21 @@ dependencies:
|
|
|
136
136
|
- - "~>"
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: 3.13.0
|
|
139
|
-
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: observer
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
153
|
+
description: Command Line Tool for PostfixAdmin
|
|
140
154
|
email:
|
|
141
155
|
- hitoshi@nextseed.jp
|
|
142
156
|
executables:
|
|
@@ -196,7 +210,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
196
210
|
requirements:
|
|
197
211
|
- - ">="
|
|
198
212
|
- !ruby/object:Gem::Version
|
|
199
|
-
version: 2.
|
|
213
|
+
version: 2.7.0
|
|
214
|
+
- - "<"
|
|
215
|
+
- !ruby/object:Gem::Version
|
|
216
|
+
version: '3.5'
|
|
200
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
218
|
requirements:
|
|
202
219
|
- - ">="
|