Re: [Rails] where do i put my production mail server settings?

2020-01-16 Thread Walter Lee Davis



> On Jan 16, 2020, at 6:19 PM, fugee ohu  wrote:
> 
> 
> 
> On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis wrote:
> 
> 
> > On Dec 29, 2019, at 11:44 PM, fugee ohu  wrote: 
> > 
> > I searched my entire tree starting at / for the name of my mail server but 
> > didn't find it Everything's working it sends mail in production just fine 
> > but I'm trying to figure out how, since it seems I never put the url of my 
> > mail server anywhere? 
> 
> Your production server may be set up with postfix or sendmail, and thus the 
> default (SMTP to localhost) will Just Work™. When your application sends 
> mail, it just sends a raw SMTP message to port 25 on the localhost, and the 
> mail server running there accepts it and forwards it. That's the default, 
> baked into Rails, in case you don't configure anything more specific. 
> 
> This is almost never what you actually want, because unless your production 
> Web server is also set up as an authoritative (DNS-verified) SMTP server, 
> your mail delivery will be spotty at best to large (think Gmail) recipients. 
> Those services take spam very seriously, and you have to climb over some tall 
> fences (configured in DNS, mainly, through TEXT and MX records) in order to 
> please them enough to accept your messages. 
> 
> This is doubly-true if your application is designed to send mail that is 
> "apparently-from" someone who is not at your server's domain. Services like 
> SendGrid exist to take this pain away from you, making sending transactional 
> e-mail as pain-free as possible, because they work to ensure that their 
> servers don't end up on banned lists, or get off them quickly. 
> 
> My recommendation if you want to send mail out to one user that appears to be 
> from another user, such that they can just hit "reply" in their mail 
> application and respond to it, send the message with the headers From: 
> a-real-...@your-server.com, and Reply-to: us...@example.com. That way the 
> message is deliverable (since it came from you, and you authenticate that in 
> your DNS settings), but the recipient can simply press Reply and not have to 
> manually correct the To: address in that message. 
> 
> Walter
> 
> I found google was rejecting mail from my server because I didn't DKIM and 
> DMARC signatures setup After adding the services how do I ask google to 
> re-review my mail server if I'm not using gsuite?
> 

I'm pretty sure it's done on a message-by-message basis. I doubt they maintain 
a ban-list that you're on, and have to remove you from. Each message 
purportedly "from" some other address is a new and special thing, since headers 
are so very easy to forge.

Walter

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9FB722B6-1423-494F-B0B9-409068C7D831%40wdstudio.com.


Re: [Rails] where do i put my production mail server settings?

2020-01-16 Thread fugee ohu


On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis wrote:
>
>
>
> > On Dec 29, 2019, at 11:44 PM, fugee ohu > 
> wrote: 
> > 
> > I searched my entire tree starting at / for the name of my mail server 
> but didn't find it Everything's working it sends mail in production just 
> fine but I'm trying to figure out how, since it seems I never put the url 
> of my mail server anywhere? 
>
> Your production server may be set up with postfix or sendmail, and thus 
> the default (SMTP to localhost) will Just Work™. When your application 
> sends mail, it just sends a raw SMTP message to port 25 on the localhost, 
> and the mail server running there accepts it and forwards it. That's the 
> default, baked into Rails, in case you don't configure anything more 
> specific. 
>
> This is almost never what you actually want, because unless your 
> production Web server is also set up as an authoritative (DNS-verified) 
> SMTP server, your mail delivery will be spotty at best to large (think 
> Gmail) recipients. Those services take spam very seriously, and you have to 
> climb over some tall fences (configured in DNS, mainly, through TEXT and MX 
> records) in order to please them enough to accept your messages. 
>
> This is doubly-true if your application is designed to send mail that is 
> "apparently-from" someone who is not at your server's domain. Services like 
> SendGrid exist to take this pain away from you, making sending 
> transactional e-mail as pain-free as possible, because they work to ensure 
> that their servers don't end up on banned lists, or get off them quickly. 
>
> My recommendation if you want to send mail out to one user that appears to 
> be from another user, such that they can just hit "reply" in their mail 
> application and respond to it, send the message with the headers From: 
> a-real-...@your-server.com , and Reply-to: us...@example.com 
> . That way the message is deliverable (since it came from 
> you, and you authenticate that in your DNS settings), but the recipient can 
> simply press Reply and not have to manually correct the To: address in that 
> message. 
>
> Walter


I found google was rejecting mail from my server because I didn't DKIM and 
DMARC signatures setup After adding the services how do I ask google to 
re-review my mail server if I'm not using gsuite?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/6df51ed6-1264-4b5a-997e-510605e633d5%40googlegroups.com.


Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-16 Thread Ariel Juodziukynas
I guess you are calling ensure_canonical_url before_action BEFORE
set_blog_post before_action, so it's not already set.

I guess you have something like:

before_action :ensure_canonical_url, only: :show
before_action :set_blog_post, only: :show

swap both lines if so.

El jue., 16 ene. 2020 a las 8:36, fugee ohu () escribió:

>
>
> On Wednesday, January 15, 2020 at 8:41:00 PM UTC-5, Ariel Juodziukynas
> wrote:
>>
>> I insist, show your code, show the complete error stacktrace, show the
>> log. I can imagine what you are trying to do and from the (little) code you
>> show it should work so something else is messing things up but you are
>> showing barely any relevant code.
>>
>> El mié., 15 ene. 2020 a las 22:37, fugee ohu ()
>> escribió:
>>
>>>
>>>
>>> On Wednesday, January 15, 2020 at 8:26:45 PM UTC-5, Ariel Juodziukynas
>>> wrote:

 find method doesn't care about the to_param method, it just takes the
 parameter you use, I guess it calls "to_i" and uses that integer to query
 the id column

 Why don't you show your code, the stacktrace, the logs or anything? I
 suggest you read something like stackoverflow's guidelines on how to ask,
 you posts are usually really hard to understand and a lot of information is
 missing

 El mié., 15 ene. 2020 a las 18:01, fugee ohu ()
 escribió:

>
>
> On Wednesday, January 15, 2020 at 3:07:00 PM UTC-5, Ariel Juodziukynas
> wrote:
>>
>> From the docs:
>> https://apidock.com/rails/v6.0.0/ActiveRecord/FinderMethods/find
>>
>> Person .find 
>> ("31-sarah") 
>> # returns the object for ID = 31
>>
>> In your case, if you are using find, it should search for record with
>> id = 18
>>
>> El mié., 15 ene. 2020 a las 16:18, fugee ohu ()
>> escribió:
>>
>>> Doesn't work for me in rails 6
>>>
>>>   Parameters: {"id"=>"18-test-title"}
>>>  ActionController::ActionControllerError (Cannot redirect to nil!):
>>>
>>> Ne
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ruby on Rails: Talk" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to rubyonra...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/rubyonrails-talk/64e66550-c393-43cd-8156-29c43139899a%40googlegroups.com
>>> 
>>> .
>>>
>>
> I've over-riding ActiveRecord to_param in my model
>
>   def to_param
>"#{id}-#{title.parameterize}"
>   end
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/1ba590e7-4c1c-4fcd-9ed8-0f2ed65b0350%40googlegroups.com
> 
> .
>

>>> I was trying to implement this guide:
>>>
>>> https://medium.com/badass-engineer/seo-friendly-urls-with-rails-49cfcd2fb190
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ruby on Rails: Talk" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to rubyonra...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/rubyonrails-talk/1aa0ed3a-a906-4965-8ff1-c8fde1e909da%40googlegroups.com
>>> 
>>> .
>>>
>>
> So  what do you think is wrong with ensure_canonical_url ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/3b7d9ae7-2326-4ee1-991f-6e791d3bb35b%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discus

Re: [Rails] Hiring for Top Companies in Bay Area

2020-01-16 Thread Karthikeyan A K
Hello, are you open for remote work, I am from Chennai, India.

On Thu, Jan 16, 2020 at 3:09 AM Aamil Saiyed 
wrote:

> Ruby on Rails Developers to Engineering Managers and Directors. Direct
> hire opportunities only. Location: San Francisco
> Compensation: Open to Market + Equity
> My all clients are backed by Heavy VC findings upto 8 million and they
> have a valuation of 1 Billion.
> Get your dog to office. Enjoy drinks and free food at work.
> Email me at aamil.sai...@collabera.com
> Or call me at +1-470-447-2384
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/8e63a56c-9962-4eca-a410-003d7a6c5fe5%40googlegroups.com
> .
>


-- 
Karthikeyan A K

Author of http://i-love-ruby.gitlab.io/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAJR%2B9kZMu%3DeFwzQpj-B%3Df5O13tPVT-i%3DST7VwL6vn2a89dZzQw%40mail.gmail.com.


Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-16 Thread fugee ohu


On Wednesday, January 15, 2020 at 8:41:00 PM UTC-5, Ariel Juodziukynas 
wrote:
>
> I insist, show your code, show the complete error stacktrace, show the 
> log. I can imagine what you are trying to do and from the (little) code you 
> show it should work so something else is messing things up but you are 
> showing barely any relevant code.
>
> El mié., 15 ene. 2020 a las 22:37, fugee ohu ( >) escribió:
>
>>
>>
>> On Wednesday, January 15, 2020 at 8:26:45 PM UTC-5, Ariel Juodziukynas 
>> wrote:
>>>
>>> find method doesn't care about the to_param method, it just takes the 
>>> parameter you use, I guess it calls "to_i" and uses that integer to query 
>>> the id column
>>>
>>> Why don't you show your code, the stacktrace, the logs or anything? I 
>>> suggest you read something like stackoverflow's guidelines on how to ask, 
>>> you posts are usually really hard to understand and a lot of information is 
>>> missing
>>>
>>> El mié., 15 ene. 2020 a las 18:01, fugee ohu () 
>>> escribió:
>>>


 On Wednesday, January 15, 2020 at 3:07:00 PM UTC-5, Ariel Juodziukynas 
 wrote:
>
> From the docs: 
> https://apidock.com/rails/v6.0.0/ActiveRecord/FinderMethods/find
>
> Person .find 
> ("31-sarah") # 
> returns the object for ID = 31
>
> In your case, if you are using find, it should search for record with 
> id = 18
>
> El mié., 15 ene. 2020 a las 16:18, fugee ohu () 
> escribió:
>
>> Doesn't work for me in rails 6
>>
>>   Parameters: {"id"=>"18-test-title"}
>>  ActionController::ActionControllerError (Cannot redirect to nil!):
>>
>> Ne
>>
>> -- 
>> You received this message because you are subscribed to the Google 
>> Groups "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to rubyonra...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/64e66550-c393-43cd-8156-29c43139899a%40googlegroups.com
>>  
>> 
>> .
>>
>
 I've over-riding ActiveRecord to_param in my model

   def to_param
"#{id}-#{title.parameterize}"
   end

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Ruby on Rails: Talk" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to rubyonra...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/rubyonrails-talk/1ba590e7-4c1c-4fcd-9ed8-0f2ed65b0350%40googlegroups.com
  
 
 .

>>>
>> I was trying to implement this guide:
>>
>> https://medium.com/badass-engineer/seo-friendly-urls-with-rails-49cfcd2fb190
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to rubyonra...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/1aa0ed3a-a906-4965-8ff1-c8fde1e909da%40googlegroups.com
>>  
>> 
>> .
>>
>
So  what do you think is wrong with ensure_canonical_url ?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/3b7d9ae7-2326-4ee1-991f-6e791d3bb35b%40googlegroups.com.