# Actionmailer issues...any experts?

**URL:** <https://www.ruby-forum.com/t/actionmailer-issues-any-experts/196922>\
**Category:** Rails\
**Created:** [March 20, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/actionmailer-issues-any-experts/196922 "2009-03-20T19:17:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 20, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/actionmailer-issues-any-experts/196922/1 "2009-03-20T19:17:30Z")

</div>

I have a rails app that can send emails to gmail, yahoo accounts. But  
when it comes to more obscure accounts like removed\_email\_address@domain.invalid or  
removed\_email\_address@domain.invalid, the mail never arrives even though the log shows  
that  
the email was sent. Any ideas why this may be happening?

I have sent an email directly through the same web server through the  
command line using

mail -s and that worked. Why doesn’t it work through my rails app?

here are my configuration settings (mostly default)

# Disable delivery errors, bad email addresses will be ignored

config.action\_mailer.delivery\_method = :smtp  
config.action\_mailer.raise\_delivery\_errors = true  
config.action\_mailer.perform\_deliveries = true  
config.action\_mailer.default\_charset = “utf-8”

config.action\_mailer.smtp\_settings = {  
:address =\> “localhost”,  
:port =\> 25,  
:domain =\> “[my-app.com](http://my-app.com)”  
}

help please!

thanks  
Tony

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 22, 2009, 7:55pm UTC](https://www.ruby-forum.com/t/actionmailer-issues-any-experts/196922/2 "2009-03-22T19:55:20Z")

</div>

What does SPF mean? No when I use mail -s, the email is sent from  
removed\_email\_address@domain.invalid

On Mar 20, 11:34 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 20, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/actionmailer-issues-any-experts/196922/3 "2009-03-20T19:35:41Z")

</div>

On 20 Mar 2009, at 18:16, tony wrote:

> I have a rails app that can send emails to gmail, yahoo accounts. But  
> when it comes to more obscure accounts like removed\_email\_address@domain.invalid or  
> removed\_email\_address@domain.invalid, the mail never arrives even though the log shows  
> that  
> the email was sent. Any ideas why this may be happening?

Different hosts might be more or less restrictive when it comes to  
spam (eg blacklists of ip ranges, whether they check SPF records etc…)

> I have sent an email directly through the same web server through the  
> command line using
> 
> mail -s and that worked. Why doesn’t it work through my rails app?

I know nothing about mail -s. Does it send email through the same smtp  
server as your rails app. Would it set the same return-path/from  
address (which is what matters for SPF) as your rails app ?

Fred

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 22, 2009, 8:42pm UTC](https://www.ruby-forum.com/t/actionmailer-issues-any-experts/196922/4 "2009-03-22T20:42:13Z")

</div>

On Mar 22, 6:54 pm, tony [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What does SPF mean? No when I use mail -s, the email is sent from  
> removed\_email\_address@domain.invalid

When you send an email from removed\_email\_address@domain.invalid the mail server on the other  
end can lookup the SPF record for the domain [bar.com](http://bar.com) (this info is  
part of the DNS records for [bar.com](http://bar.com)). In a nutshell the SPF records  
are used to determine whether the server sending mail from  
removed\_email\_address@domain.invalid is allowed to send mail on behalf of that domain.  
Different mail servers receiving mail may be more or less stringent:  
it could merely count towards a score that determines whether the  
message is classed as spam or might lead to it being rejected  
altogether.

Fred
