Browse files

add dkim support

  • Loading branch information...
1 parent 06556f7 commit a7b33c68183577687b65c18dc593a1b37f5506d5 @kevinwmerritt committed Feb 29, 2012
Showing with 20 additions and 9 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 Gemfile
  3. +2 −0 Gemfile.lock
  4. +1 −0 app/assets/stylesheets/application.css.scss
  5. +5 −9 app/views/main/splash.html.erb
  6. +10 −0 config/initializers/dkim.rb
View
1 .gitignore
@@ -19,6 +19,7 @@
**.war
*.rbc
*.sassc
+*.pem
.rspec
.redcar/
.sass-cache
View
1 Gemfile
@@ -21,6 +21,7 @@ gem 'simple_form', '~> 2.0.1'
# Messaging
gem 'aws-ses', '~> 0.4.3', :require => 'aws/ses'
+gem 'dkim'
# API
gem 'foursquare2', '~> 1.3.6'
View
2 Gemfile.lock
@@ -104,6 +104,7 @@ GEM
railties (~> 3.1)
warden (~> 1.1.1)
diff-lcs (1.1.3)
+ dkim (0.1.0)
erubis (2.7.0)
eventmachine (0.12.10)
excon (0.9.5)
@@ -291,6 +292,7 @@ DEPENDENCIES
cucumber-rails (>= 1.0.2)
database_cleaner (>= 0.6.7)
devise (~> 2.0.4)
+ dkim
factory_girl_rails (>= 1.1.rc1)
fog
foursquare2 (~> 1.3.6)
View
1 app/assets/stylesheets/application.css.scss
@@ -34,6 +34,7 @@ html, body {
font-family: Vollkorn, serif;
padding: 7px 20px 9px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ margin-left: 10px;
}
.brand img {
View
14 app/views/main/splash.html.erb
@@ -5,15 +5,11 @@
<div class="navbar-inner">
<div class="container">
<a class="brand" href="/"><%= image_tag "latte.png" %>roastly</a>
- <div class="nav-collapse">
- <ul class="nav">
- </ul>
- <ul class="nav pull-right">
- <li class="">
- <%= link_to "Sign in", new_user_session_path %>
- </li>
- </ul>
- </div>
+ <ul class="nav pull-right">
+ <li class="">
+ <%= link_to "Sign in", new_user_session_path %>
+ </li>
+ </ul>
</div>
</div>
</div>
View
10 config/initializers/dkim.rb
@@ -0,0 +1,10 @@
+# Configure dkim globally (see above)
+Dkim::domain = 'cafecreature.com'
+Dkim::selector = 'mail'
+Dkim::private_key = open('config/ses.pem').read
+
+# Required for SES
+Dkim::signable_headers = Dkim::DefaultHeaders - %w{Message-ID Resent-Message-ID Date Return-Path Bounces-To}
+
+# This will sign all ActionMailer deliveries
+ActionMailer::Base.register_interceptor('Dkim::Interceptor')

0 comments on commit a7b33c6

Please sign in to comment.