smailr 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -0
- data/bin/smailr +38 -0
- data/lib/smailr.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 137f8c287a816f8de1cc332745f1b7a7e7c6248d
|
4
|
+
data.tar.gz: 20e72c156dc8fdc41c17778c0436eadbf8187d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce459c937af2283a0411329fc04f5369d2894557fb288b3a501d2c20d10ffebf9fbbd382a4d12fd06163f34e25daa395f5789c4b101a4c26b9dd1b8be84ae56e
|
7
|
+
data.tar.gz: 3166aba8a9629e697c316c64e72a938c3c784b150911b784fb2ec39ab28dbf6fcad23ac8979befddd2f48cf1022567d9bdc0b7b3ef71e10a0fcbffd89e495c81
|
data/README.md
CHANGED
@@ -33,6 +33,31 @@ To initialize the database run all migrations
|
|
33
33
|
You should now be ready to just manage your mailserver with the commands listed
|
34
34
|
below.
|
35
35
|
|
36
|
+
## Configuration
|
37
|
+
|
38
|
+
Smailr is configured in /etc/smailr.yml, thats where you can configure your
|
39
|
+
database backend. By default smailr will use the following sqlite datbase:
|
40
|
+
|
41
|
+
database:
|
42
|
+
adapter: sqlite
|
43
|
+
database: /etc/exim4/smailr.sqlite
|
44
|
+
|
45
|
+
The configuration files in the contrib directory are configured to work with
|
46
|
+
this database.
|
47
|
+
|
48
|
+
But you can configure any other database as well. Eg. for MySQL use:
|
49
|
+
|
50
|
+
database:
|
51
|
+
adapter: mysql2
|
52
|
+
host: localhost
|
53
|
+
username: smailr
|
54
|
+
database: smailr
|
55
|
+
password: S3cr3t
|
56
|
+
|
57
|
+
Just make sure the database driver is installed (for MySQL: aptitude install
|
58
|
+
ruby-mysql2). Smailr uses the Sequel ORM, check out the following page for
|
59
|
+
connection parameters: [sequel.jeremyevans.net/opening_databases_rdoc](http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html)
|
60
|
+
|
36
61
|
## Managing your mailserver
|
37
62
|
|
38
63
|
### Domains
|
@@ -129,6 +154,23 @@ automatically. Open mutt for the specified mailbox:
|
|
129
154
|
|
130
155
|
smailr mutt user@example.com
|
131
156
|
|
157
|
+
### Verify
|
158
|
+
|
159
|
+
Smailr generates a report via the Port25 SMTP Verifier. It generates a test,
|
160
|
+
sends it to check-auth-user=eaxmple.comt@verifier.port25.com, which will in
|
161
|
+
return generate a echo message with a report about a results from many SMTP
|
162
|
+
combonents: SPF, SenderID, DomainKeys, DKIM and Spamassassin.
|
163
|
+
|
164
|
+
To generate a message, sent from user@example.com and return the report to the
|
165
|
+
same address simply call the following command:
|
166
|
+
|
167
|
+
smailr verify user@example.com
|
168
|
+
|
169
|
+
In case you want to generate the report for user@example.com, but receive it at
|
170
|
+
a different location add the report-to option:
|
171
|
+
|
172
|
+
smailr verify user@example.com --report-to postmaster@ono.at
|
173
|
+
|
132
174
|
## Compatibility
|
133
175
|
|
134
176
|
Smailr was developed an tested on Debian/Squeeze and should be easily portable
|
data/bin/smailr
CHANGED
@@ -201,3 +201,41 @@ command :mutt do |c|
|
|
201
201
|
end
|
202
202
|
end
|
203
203
|
end
|
204
|
+
|
205
|
+
command :verify do |c|
|
206
|
+
c.syntax = "smailr verify address"
|
207
|
+
c.summary = "Send out a test message to verify a domains configuration via verifier.port25.com"
|
208
|
+
c.description = "A reply email will be sent back to you with an analysis of the message’s authentication" +
|
209
|
+
"status. The report will perform the following checks: SPF, SenderID, DomainKeys, DKIM " +
|
210
|
+
"and Spamassassin.\n\n"
|
211
|
+
c.example 'Verify test@example.com (report will be sent to test@example.com)', 'smailr verify test@example.com'
|
212
|
+
c.example 'Verify test@example.com, send report to root@example.com', 'smailr verify test@example.com --report-to root@example.com'
|
213
|
+
|
214
|
+
c.option '-r DESTINATION', '--report-to DESTINATION', String, 'Send the report to the specified address instead.'
|
215
|
+
|
216
|
+
c.action do |args,options|
|
217
|
+
from = args[0]
|
218
|
+
options.default :report_to => from
|
219
|
+
|
220
|
+
dstlocalpart, dstfqdn = options.report_to.split('@')
|
221
|
+
|
222
|
+
require 'socket'
|
223
|
+
require 'date'
|
224
|
+
require 'net/smtp'
|
225
|
+
Net::SMTP.start('localhost', 25) do |smtp|
|
226
|
+
to = "check-auth-#{dstlocalpart}=#{dstfqdn}@verifier.port25.com"
|
227
|
+
|
228
|
+
message = [
|
229
|
+
"From: #{from}",
|
230
|
+
"To: #{to}",
|
231
|
+
"Subject: Port25 Mail Verification Test",
|
232
|
+
"Date: #{DateTime.now.strftime("%a, %d %b %Y %H:%M:%S %z")}",
|
233
|
+
"",
|
234
|
+
"This is a test message for the port25 mail verification test, it was",
|
235
|
+
"sent from the following server: #{Socket.gethostname}."
|
236
|
+
].join("\r\n")
|
237
|
+
|
238
|
+
smtp.send_message(message, from, to)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
data/lib/smailr.rb
CHANGED