Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Drupal VM on production does not set hostname #1067

Closed
oxyc opened this issue Dec 21, 2016 · 4 comments
Closed

Drupal VM on production does not set hostname #1067

oxyc opened this issue Dec 21, 2016 · 4 comments
Labels

Comments

@oxyc
Copy link
Collaborator

oxyc commented Dec 21, 2016

Issue Type

  • Feature request

Full console output

Dec 21 11:16:40 ubuntu postfix/smtp[31700]: 7610339C0F: to=public@oxy.fi, relay=mail.oxy.fi[80.83.6.133]:25, delay=0.71, delays=0/0/0.61/0.1, dsn=5.0.0, status=bounced (host mail.oxy.fi[80.83.6.133] said: 550-Verification failed for www-data@ubuntu.members.linode.com 550-The mail server could not deliver mail to www-data@ubuntu.members.linode.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))

Summary

If we want to improve on how well drupal vm works on production environments, this would be nice to provision out of the box. Otherwise maybe just some docs?

On Ubuntu 16.04

  • vagrant_hostname needs to be set to drupal_domain in the prod.config.yml example. This also fixes issues with mailhog/solr using the wrong hostname in the dashboard
  • Add 127.0.0.1 {{ vagrant_hostname }} to /etc/hosts
  • Change the contents of /etc/hostname to {{ vagrant_hostname }} (edit: just realized this is usually set to the hostname without the TLD. Why is that?)
  • Change the contents of /etc/mailname to {{ vagrant_hostname }}
  • Maybe call hostname {{ vagrant_hostname }} so it works without a reboot? service hostname restart did not work.

Sidenote: Amazing how well this worked otherwise! I got wildcard subdomains with https and proxy-only access to dev tools with just making changes in config.yml. Following the docs worked great for linode as well.

Edit: We also fix this on travis to be able to run the tests https://github.com/geerlingguy/drupal-vm/blob/master/.travis.yml#L66

@oxyc oxyc changed the title Following Drupal VM to a prod environment docs doesnt setup mail correctly Following Drupal VM on a prod environment docs doesnt setup mail correctly Dec 21, 2016
@geerlingguy
Copy link
Owner

The rabbit hole goes deeper of course, see How to get your server's emails through Gmail's spam filter with Exim and Configure sendmail on CentOS to allow sending of email from localhost, among other articles about SPF, reverse DNS, DKIM, etc.

But we should at least get the basics correct, so I'd be fine configuring the things you list above there.

@oxyc
Copy link
Collaborator Author

oxyc commented Dec 21, 2016

True... maybe I should rename the issue to Drupal VM on production does not set correct hostname and we just make sure /etc/mailname is updated as well :)

oxyc added a commit to oxyc/drupal-vm that referenced this issue Dec 21, 2016
oxyc added a commit to oxyc/drupal-vm that referenced this issue Dec 21, 2016
oxyc added a commit to oxyc/drupal-vm that referenced this issue Dec 21, 2016
@geerlingguy
Copy link
Owner

That sounds good to me.

@oxyc oxyc changed the title Following Drupal VM on a prod environment docs doesnt setup mail correctly Drupal VM on production does not set correct hostname Dec 21, 2016
@oxyc oxyc changed the title Drupal VM on production does not set correct hostname Drupal VM on production does not set hostname Dec 21, 2016
@geerlingguy
Copy link
Owner

Fixed via PR #1070

kekkis pushed a commit to kekkis/drupal-vm that referenced this issue Feb 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants