-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Agris Ameriks
authored and
Agris Ameriks
committed
Feb 15, 2009
1 parent
82477f2
commit 1254312
Showing
47 changed files
with
46,786 additions
and
0 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,4 @@ | ||
== 0.0.1 2009-02-15 | ||
|
||
* 1 major enhancement: | ||
* Initial release |
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,11 @@ | ||
History.txt | ||
Manifest.txt | ||
PostInstall.txt | ||
README.rdoc | ||
Rakefile | ||
lib/bounce-email.rb | ||
script/console | ||
script/destroy | ||
script/generate | ||
test/test_bounce-email.rb | ||
test/test_helper.rb |
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,35 @@ | ||
|
||
For more information on bounce-email, see http://bounce-email.rubyforge.org | ||
|
||
You can easily use this plugin with e.g. Rails application. | ||
Configure rails, so it send email using postfix and it adds VERP. | ||
#- in environment.rb file add lines -# | ||
config.action_mailer.delivery_method = :sendmail | ||
config.action_mailer.sendmail_settings = { | ||
:location => '/usr/sbin/sendmail', | ||
:arguments => '-XV -f [email protected] -i -t' | ||
} | ||
#- end -# | ||
Change amerimail.lv to email server that will handle bounce emails. | ||
|
||
Follow this tutorial to handle bounce-emails: http://keakaj.com/wisdom/2007/08/08/verp-on-rails/ | ||
|
||
You can make Ruby file like this: | ||
require "rubygems" | ||
require "tmail" | ||
require "bounce-email" | ||
|
||
mail = TMail::Mail.parse(STDIN.read) | ||
bounce = BounceEmail::Mail.new(mail) | ||
|
||
# Do something with bounce info | ||
# bounce.isbounce -> true/false | ||
# bounce.code -> e.g. "5.1.1" | ||
# bounce.reason -> e.g. "Something about the address specified in the message caused this DSN." | ||
# bounce.type -> e.g. "Permanent Failure" | ||
|
||
# Permanent Failure means that it is hard bounce | ||
# Persistent Transient Failure means that it is soft bounce | ||
|
||
# If reason is "Vacation auto-reply" then email could be vacation email (but it is rearly cought). | ||
|
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,62 @@ | ||
= bounce-email | ||
|
||
http://bounce-email.rubyforge.org/ | ||
|
||
== DESCRIPTION: | ||
|
||
This Ruby library is for determining the bounce type of an email message. It finds out if bounce is hard or soft or it is out of office mail. | ||
|
||
== FEATURES/PROBLEMS: | ||
|
||
* Can't determine email address that bounced. | ||
|
||
== SYNOPSIS: | ||
|
||
Follow this tutorial to handle bounce-emails: http://keakaj.com/wisdom/2007/08/08/verp-on-rails/ | ||
|
||
You can make Ruby file like this: | ||
require "rubygems" | ||
require "tmail" | ||
require "bounce-email" | ||
|
||
mail = TMail::Mail.parse(STDIN.read) | ||
bounce = BounceEmail::Mail.new(mail) | ||
|
||
# Do something with bounce info | ||
# bounce.isbounce -> true/false | ||
# bounce.code -> e.g. "5.1.1" | ||
# bounce.reason -> e.g. "Something about the address specified in the message caused this DSN." | ||
# bounce.type -> e.g. "Permanent Failure" | ||
|
||
== REQUIREMENTS: | ||
|
||
Ruby Gem TMail is required | ||
|
||
== INSTALL: | ||
|
||
Nothing to install. | ||
|
||
== LICENSE: | ||
|
||
(The MIT License) | ||
|
||
Copyright (c) 2009 Agris Ameriks | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,28 @@ | ||
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f } | ||
require File.dirname(__FILE__) + '/lib/bounce-email' | ||
|
||
# Generate all the Rake tasks | ||
# Run 'rake -T' to see list of generated tasks (from gem root directory) | ||
$hoe = Hoe.new('bounce-email', BounceEmail::VERSION) do |p| | ||
p.developer('Agris Ameriks', '[email protected]') | ||
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n") | ||
p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required | ||
p.rubyforge_name = p.name # TODO this is default value | ||
p.extra_deps = [ | ||
['tmail','>= 1.2.3'] | ||
] | ||
p.extra_dev_deps = [ | ||
['newgem', ">= #{::Newgem::VERSION}"] | ||
] | ||
|
||
p.clean_globs |= %w[**/.DS_Store tmp *.log] | ||
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}" | ||
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc') | ||
p.rsync_args = '-av --delete --ignore-errors' | ||
end | ||
|
||
require 'newgem/tasks' # load /tasks/*.rake | ||
Dir['tasks/**/*.rake'].each { |t| load t } | ||
|
||
# TODO - want other tests/tasks run by default? Add them to the list | ||
# task :default => [:spec, :features] |
Oops, something went wrong.