post_office 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 001b4221494a9b862799ff8504e1afef46aa13a7
4
- data.tar.gz: 1316fcae06e020835a7f80f27d3c5ecccdfcc09d
2
+ SHA256:
3
+ metadata.gz: ce85b02dd82bd4acd4fe34c5bf0c56f9b343ad7480a1c2e3ac429146e9b77e44
4
+ data.tar.gz: c032ebc0fedff67be24fb010b77f1f9d7144354329d333c707e2ad5a51b0bfd5
5
5
  SHA512:
6
- metadata.gz: 46f635e7b67e0914b8123a93ecc45b982ab60bbd806794f87d736559638597f394b7febe9c999db0b5aec6b40c2bdfd621348f138e868206fe1946efe0b760f7
7
- data.tar.gz: db714f92ba8a29083f349442824781ca75691441986dd280645dc10dc99ff1325bd64ab4f6a99660ef74a4e3240d9993ac07550d26927830821cfc1c86db8e66
6
+ metadata.gz: 0a870109cf0a649ab8c0a5f4713532b0060e97a4e9002c6a8a8cf30ebbf6be002cb59418f79a7ef4f5e0c823d5a1d8fe9fa7d7cf8b53476d036e86ffdafdbbdd
7
+ data.tar.gz: 7374e542844b2abfd968e12f9d339a4bc28138a8e4f82bd4407d22797d2f7cb6fc7bd7c11fe1e78c355e8672cb9c3a22f000ce9744b45a4fe260d7825b396461
data/README.md CHANGED
@@ -14,12 +14,12 @@ Usage
14
14
  -----
15
15
 
16
16
  sudo post_office [options]
17
-
17
+
18
18
  -v, --verbose Output more information
19
19
  -l, --logfile FILE Write log to FILE. Outputs to STDOUT (or /var/log/post_office.log when daemonized) by default.
20
20
  -s, --smtp PORT Specify SMTP port to use
21
21
  -p, --pop3 PORT Specify POP3 port to use
22
-
22
+
23
23
  -h, --help Display this screen
24
24
 
25
25
  This starts the service and listens on the specified ports (or 25 for SMTP and 110 for POP3 by default). Configure your POP3 client with any username and password.
@@ -29,7 +29,7 @@ Config
29
29
 
30
30
  Post Office will try to find a configuration file (post_office/config.json) in the user dir ($HOME), and then in /etc. It will load the first one it finds.
31
31
 
32
- The arguments passed on the command line will always override the ones specified in the config file.
32
+ The arguments passed on the command line will always override the ones specified in the config file.
33
33
 
34
34
  Daemon
35
35
  ------
@@ -78,6 +78,10 @@ Contributions are welcome! Feel free to fork and send a pull request through Git
78
78
 
79
79
  ## Changelog
80
80
 
81
+ ### 1.0.1 (Jan 17, 2022)
82
+
83
+ * [(snoutmate)](https://github.com/snoutmate) [Added SMTP AUTH support](https://github.com/bluerail/post_office/pull/7)
84
+
81
85
  ### 1.0.0 (Aug 11, 2016)
82
86
 
83
87
  * [(tijn)](https://github.com/tijn) [load a config file and move default options (to become more DRY)](https://github.com/bluerail/post_office/pull/5)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
data/lib/smtp_server.rb CHANGED
@@ -27,6 +27,7 @@ class SMTPServer < GenericServer
27
27
  when 'QUIT' then quit(client)
28
28
  when 'RCPT' then rcpt_to(client, full_data)
29
29
  when 'RSET' then rset(client)
30
+ when 'AUTH' then auth(client)
30
31
  else begin
31
32
  if get_client_data(client, :sending_data)
32
33
  append_data(client, full_data)
@@ -75,6 +76,11 @@ class SMTPServer < GenericServer
75
76
  self.client_data[client.object_id] = Hash.new
76
77
  end
77
78
 
79
+ # Authenticates client
80
+ def auth(client)
81
+ respond(client, 235)
82
+ end
83
+
78
84
  # Adds full_data to incoming mail message
79
85
  #
80
86
  # We'll store the mail when full_data == "."
@@ -121,6 +127,7 @@ class SMTPServer < GenericServer
121
127
  214 => "Help message",
122
128
  220 => "Bluerail Post Office Service ready",
123
129
  221 => "Bluerail Post Office Service closing transmission channel",
130
+ 235 => "Authentication successful",
124
131
  421 => "Bluerail Post Office Service not available,",
125
132
  250 => "Requested mail action okay, completed",
126
133
  251 => "User not local; will forward to <forward-path>",
data/post_office.gemspec CHANGED
@@ -2,17 +2,19 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: post_office 1.0.1 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "post_office"
8
- s.version = "1.0.0"
8
+ s.name = "post_office".freeze
9
+ s.version = "1.0.1"
9
10
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Rene van Lieshout"]
12
- s.date = "2016-08-11"
13
- s.description = "A mock SMTP/POP3 server to aid in the development of applications with mail functionality."
14
- s.email = "rene@bluerail.nl"
15
- s.executables = ["post_office", "post_officed"]
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Rene van Lieshout".freeze]
14
+ s.date = "2022-01-17"
15
+ s.description = "A mock SMTP/POP3 server to aid in the development of applications with mail functionality.".freeze
16
+ s.email = "rene@bluerail.nl".freeze
17
+ s.executables = ["post_office".freeze, "post_officed".freeze]
16
18
  s.extra_rdoc_files = [
17
19
  "LICENSE",
18
20
  "README.md"
@@ -34,9 +36,8 @@ Gem::Specification.new do |s|
34
36
  "startup_item/PostOffice/PostOffice",
35
37
  "startup_item/PostOffice/StartupParameters.plist"
36
38
  ]
37
- s.homepage = "http://github.com/bluerail/post_office"
38
- s.require_paths = ["lib"]
39
- s.rubygems_version = "2.0.14.1"
40
- s.summary = "PostOffice mock SMTP/POP3 server"
39
+ s.homepage = "http://github.com/bluerail/post_office".freeze
40
+ s.rubygems_version = "3.0.9".freeze
41
+ s.summary = "PostOffice mock SMTP/POP3 server".freeze
41
42
  end
42
43
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: post_office
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rene van Lieshout
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-11 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A mock SMTP/POP3 server to aid in the development of applications with
14
14
  mail functionality.
@@ -39,24 +39,23 @@ files:
39
39
  homepage: http://github.com/bluerail/post_office
40
40
  licenses: []
41
41
  metadata: {}
42
- post_install_message:
42
+ post_install_message:
43
43
  rdoc_options: []
44
44
  require_paths:
45
45
  - lib
46
46
  required_ruby_version: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - '>='
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubyforge_project:
58
- rubygems_version: 2.0.14.1
59
- signing_key:
57
+ rubygems_version: 3.0.3
58
+ signing_key:
60
59
  specification_version: 4
61
60
  summary: PostOffice mock SMTP/POP3 server
62
61
  test_files: []