Page Title
Body h2. The Situation You send email from your application. You don't want to end up in someone's spam box. h2. The Fix This is not always an easy problem to solve. We'll start with the easiest step. h3. Sendmail On your server, edit /etc/hosts. The last line should have the public IP address of your server. Add the domain name that you send mail from in front of the railsmachina name, like this: <pre><your public ip> mail.yourdomain.com your_account.railsmachina.com</pre> Then restart sendmail: <pre>sudo /sbin/service sendmail restart</pre> h3. Postfix Edit the myhostname variable in /etc/postfix/main.cf: <pre><code>myhostname = mail.somedomain.com</code></pre> Then restart postfix: <pre>sudo /sbin/service postfix restart</pre> h2. Testing your setup From your server, you can test by running <pre>telnet localhost 25</pre> The mail server should identify itself as <code>mail.yourdomain.com</code>. If you still have problems with email being marked as spam, you can create SPF records in your DNS, or you can set up DKIM.
Make page private