where do i put my production mail server settings?

30 views
Skip to first unread message

fugee ohu

unread,
Dec 29, 2019, 11:44:26 PM12/29/19
to Ruby on Rails: Talk
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?

Walter Lee Davis

unread,
Dec 30, 2019, 2:48:06 PM12/30/19
to rubyonra...@googlegroups.com


> On Dec 29, 2019, at 11:44 PM, fugee ohu <fuge...@gmail.com> 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

fugee ohu

unread,
Jan 4, 2020, 8:11:25 PM1/4/20
to Ruby on Rails: Talk
I'm running a mail server, (on another machine at another ip address) I'll configure my sites to use it

fugee ohu

unread,
Jan 16, 2020, 6:19:14 PM1/16/20
to Ruby on Rails: Talk


On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis wrote:
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?

Walter Lee Davis

unread,
Jan 16, 2020, 7:34:27 PM1/16/20
to rubyonra...@googlegroups.com
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

fugee ohu

unread,
Jan 17, 2020, 7:16:14 PM1/17/20
to Ruby on Rails: Talk
They keep adding things you have to do to not be rejected Now they want DKIM and DMARC setup 

fugee ohu

unread,
Jan 17, 2020, 7:18:57 PM1/17/20
to Ruby on Rails: Talk
DKIM prevents spoofed sending

Walter

Reply all
Reply to author
Forward
0 new messages