tuktuk 0.6.3 → 0.6.4
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 +5 -5
- data/README.md +43 -0
- data/lib/tuktuk/tuktuk.rb +2 -2
- data/lib/tuktuk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 299486ad4c10490a6e03a48a1a340d362e45e7c3d1475948dce7d9a1cc4d70b8
|
4
|
+
data.tar.gz: 1f3bebc2cbf9e4ca5cf643a9db817a2198e5c57fde596267f3adf9275f8ad39f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b11e0699eee6765b72ed737422cf7e501b55ac4456504c9b7291d2d2c8b59092463a2e00f3cafbce7324af62aafa90a61ca736a6e278c74238412c350d51a1
|
7
|
+
data.tar.gz: 4e6cd4aa14dbd0b1de9da8b86db9ac40c6f22cd3ef91a1f3abc6c90a758df6743aca5a23169c4e4955be5ae0c837591548e049a03e94d5ceb41026d023a1dcf9
|
data/README.md
CHANGED
@@ -193,6 +193,49 @@ config.action_mailer.tuktuk_settings = {
|
|
193
193
|
}
|
194
194
|
```
|
195
195
|
|
196
|
+
# Example SPK/DKIM/DMARC settings
|
197
|
+
|
198
|
+
If you're sending email from yoursite.com, the SPF record should be set for the APEX/root host, and look like this:
|
199
|
+
|
200
|
+
v=spf1 ip4:[ipv4_address] ip6:[ipv6_address] mx a include:[other_host] ~all
|
201
|
+
|
202
|
+
For example:
|
203
|
+
|
204
|
+
v=spf1 ip4:12.34.56.78 ip6:2600:3c05::f07c:92ff:fe48:b2fd mx a include:mailgun.org ~all
|
205
|
+
|
206
|
+
This tells the receiving server to accept email sent from a) the addresses explicitly mentioned (`ip4` and `ip6`),
|
207
|
+
b) from the hosts mentioned in the `include` statements, as well as c) the hosts listed as `MX` and `A` records for that domain.
|
208
|
+
|
209
|
+
As for DKIM, you should add two TXT records. The first is a simple, short one that goes under the `_domainkey` host,
|
210
|
+
and should contain the following:
|
211
|
+
|
212
|
+
t=y;o=~;
|
213
|
+
|
214
|
+
Then, a second DKIM record should be placed under `[selector]._domainkey` (e.g. `mailer._domainkey`), and should look like this:
|
215
|
+
|
216
|
+
k=rsa; p=MIIBIBANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA[...]DAQAB (public key)
|
217
|
+
|
218
|
+
And finally, your DMARC record goes under the `_dmarc` host, and goes like this:
|
219
|
+
|
220
|
+
v=DMARC1; p=none; rua=mailto:postmaster@yoursite.com; ruf=mailto:postmaster@yoursite.com
|
221
|
+
|
222
|
+
So, in summary:
|
223
|
+
|
224
|
+
(SPF) @.yoursite.com --> v=spf1 ip4:[ipv4_address] ip6:[ipv6_address] mx a include:[other_host] ~all
|
225
|
+
(DKIM1) _domainkey.yoursite.com --> t=y;o=~;
|
226
|
+
(DKIM2) [selector]._domainkey.yoursite.com --> k=rsa; p=MIIBIBANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA[...]DAQAB
|
227
|
+
(DMARC) _dmarc.yoursite.com --> v=DMARC1; p=none; rua=mailto:postmaster@yoursite.com; ruf=mailto:postmaster@yoursite.com
|
228
|
+
|
229
|
+
Now, to check wether your records are OK, you can use the `dig` command like follows:
|
230
|
+
|
231
|
+
dig yoursite.com TXT +short # should output the SPF record, under the root domain
|
232
|
+
dig mailer._domainkey.yoursite.com TXT +short # should output the DKIM record containing the key
|
233
|
+
dig _domainkey.yoursite.com TXT +short # should output the other (short) DKIM
|
234
|
+
dig _dmarc.yoursite.com TXT +short # should output the DMARC record
|
235
|
+
|
236
|
+
Remember you can query your DNS server directly with the `dig` command by adding `@name.server.com`
|
237
|
+
after the `dig` command (e.g. `dig @ns1.linode.com yoursite.com TXT`).
|
238
|
+
|
196
239
|
# Contributions
|
197
240
|
|
198
241
|
You're more than welcome. Send a pull request, including tests, and make sure you don't break anything. That's it.
|
data/lib/tuktuk/tuktuk.rb
CHANGED
@@ -234,7 +234,7 @@ module Tuktuk
|
|
234
234
|
begin
|
235
235
|
resp = smtp.send_message(get_raw_mail(mail), get_from(mail), mail.to)
|
236
236
|
smtp.send(:getok, 'RSET') if server['hotmail'] # fix for '503 Sender already specified'
|
237
|
-
rescue Net::SMTPFatalError => e # error code 5xx, except for 500, like: 550 Mailbox not found
|
237
|
+
rescue Net::SMTPFatalError, Net::SMTPServerBusy => e # error code 5xx, except for 500, like: 550 Mailbox not found
|
238
238
|
resp = Bounce.type(e)
|
239
239
|
end
|
240
240
|
responses[mail] = resp
|
@@ -244,7 +244,7 @@ module Tuktuk
|
|
244
244
|
|
245
245
|
responses
|
246
246
|
rescue => e # SMTPServerBusy, SMTPSyntaxError, SMTPUnsupportedCommand, SMTPUnknownError (unexpected reply code)
|
247
|
-
logger.error "[SERVER ERROR: #{server}] #{e.message}"
|
247
|
+
logger.error "[SERVER ERROR: #{server}] #{e.class} -> #{e.message}"
|
248
248
|
@last_error = e
|
249
249
|
responses
|
250
250
|
end
|
data/lib/tuktuk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tuktuk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: 1.3.6
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project: tuktuk
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.7.3
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: SMTP client for Ruby with DKIM support.
|