SMTP settings for action mailer

15 views
Skip to first unread message

tyliong

unread,
Jan 8, 2009, 3:15:27 AM1/8/09
to Ruby on Rails: Talk
with rails 2.2.2 action mailer requires a valid ssl certificate
i have a question about routing

my smtp settings for my postfix are now

ActionMailer::Base.smtp_settings = {
:address => "smtp.mydomain.com",
:port => 25,
:domain => "mydomain.com",
:authentication => :plain,
:user_name => "mydomai...@mydomain.com",
:password => "password"
}

both the email server and the rails app are on the same machine
if i don't have the address as 127.0.0.1
is it routing information through the internet instead of internally
in the machine?
if i use 127.0.0.1 i will get the ssl error because the host does not
match up.

NAYAK

unread,
Jan 8, 2009, 3:24:14 AM1/8/09
to rubyonra...@googlegroups.com
Hi,

In your server's host file map the address smtp.mydomain.com to IP 127.0.0.1 so that it is not routed externally.

-NAYAK

Tan YL

unread,
Jan 8, 2009, 4:27:57 AM1/8/09
to rubyonra...@googlegroups.com

I tried changing it to this :

127.0.0.1       localhost.localdomain   localhost smtp.mydomain.com smtp

::1 localhost6.localdomain6     localhost6

210.193.49.222 ns1.mydomain.com ns1 localhost smtp.mydomain.com smtp

 

But it didn’t work

Restarted postfix and mongrel gave ssl error again.

NAYAK

unread,
Jan 8, 2009, 4:33:37 AM1/8/09
to rubyonra...@googlegroups.com
Hi,

I am not sure of using multiple host/domain at a time there
Try just

127.0.0.1 smtp.mydomain.com

NAYAK

Tan YL

unread,
Jan 8, 2009, 4:55:54 AM1/8/09
to rubyonra...@googlegroups.com

I got it to work with the multiple domain names

 

ActionMailer::Base.smtp_settings = {
:address => "smtp.mydomain.com",
:port => 25,
:domain => "mydomain.com",
:authentication => :plain,
:user_name => "mydomai...@mydomain.com",
:password => "password"
}

 

I have the address as smtp.mydomain.com and it gives 127.0.0.1 in my mail error log.  Instead of ns1.mydomain.com .

 

Is it working internally now?

Reply all
Reply to author
Forward
0 new messages