I'm hoping there are some really simple questions to these answers, but I'm wondering how to setup hostname and mail server domain name settings.
I'm using the Pantheon Mercury AMIs to create instances. The server is up and running fine.
When a new user registers, the mail is sent from ec2-79-125-64-6.eu-west-1.compute.amazonaws.com instead of dev.mysite.com. All the links in the email point to the long AWS name instead of the short real name.
A) Do I need to specify a hostname somewhere in the ubuntu server configuration.
B) Also, I would like to setup a mail domain such as dev.mysite.com. I know that I need to create an MX record for dev.mysite.com and point it to the ec2-79-125-64-6.eu-west-1.compute.amazonaws.com or elastic IP address if I attach an elastic IP address of the server, but how do I configure the server to receive mail at dev.mysite.com?
I'm not asking this in the Pantheon group, because I'm not sure it really has anything to do with the Pantheon/Mercury images specifically, and probably more of an Ubuntu setup question with possible specific configuration criteria for AWS hosting.
C) Is there still problems with routing mail from servers at AWS. I hear that there were several problems with all the RBL's (spamhaus, spamcop, message labs, etc.) blocking the entire IP segment that Amazon owns for AWS, but I'm also hearing that this is now, not too much of a problem and the issues has somewhat been eased.
Any feedback on how others are configuring the mail routing would be fantastic.
I'm moving several sites from a traditional cPanel/WHM manager - dedicated server setup which all have separate accounts, separate drupal installations, and separate mail domains configured on the same server to an AWS instance with Project Mercury in a shared Drupal install setup. I'm wondering whether I should also configure mail accounts for these sites or host the mail offsite.
Is anyone else doing something similar? If so, how do you configure the mail, and allow access for customers to SFTP their files to their specific /var/www directory (or are you allowing that).
Any feedback, no matter how small will be gladly appreciated.
Kind Regards.
Comments
re: define hostname and mail server settings
A) I would update the following 2 files:
/etc/hostname
/etc/mailname
and update postfix with the following commands:
/usr/sbin/postconf -e "myhostname = dev.mysite.com"
/usr/sbin/postconf -e "mydomain = dev.mysite.com"
/usr/sbin/postconf -e "mydestination = dev.mysite.com, localhost"
/etc/init.d/postfix restart
B) Sorry, I don't know the answer to this.
C) Amazon has made some attempts to fix this issue. They now provide a link where you can request they make sure your ip is off the SPAM lists (as well as remove the cap on SMTP requests: https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2...
Hope this helps,
Greg
--
Greg Coit
Systems Administrator
http://www.chapterthree.com
Thanks for the help Greg. I
Thanks for the help Greg.
I performed these functions to get my server hostname working properly in admin/settings/site-information
> sudo vi /etc/hostname (update hostname to desired name)
> sudo hostname -b -F /etc/hostname
> hostname (to verify the change took place)
> sudo vi /etc/mailname (update /etc/mailname to reflect desired name)
> /usr/sbin/postconf -e "myhostname = dev.myactualdomain.com"
> /usr/sbin/postconf -e "mydomain = dev.myactualdomain.com"
> /usr/sbin/postconf -e "mydestination = dev.myactualdomain.com, localhost"
> /etc/init.d/postfix restart
However, when Drupal sends mail from the system (when a new user registers, resets password, etc.)
the mail from address is www-data@dev.myactualdomain.com instead of drupalsitename@dev.myactualdomain.com
I've looked through quite a bit of Ubuntu and Postfix documentation as well as Drupal.org, but haven't found anything that shows my configuration is incorrect or a way to fix the issue.
I did see the http://drupal.org/project/returnpath module which fixes the issue, but I also received many PHP errors from the module.
Is this a common issue with Pantheon and/or Ubuntu and Drupal?
Symetrik Design
Drupal Consulting
http://www.symetrkdesign.com
re: Thanks for the help Greg. I
This is an issue (I believe) with Drupal. Postfix is looking at the user that is running Drupal (Pressflow) which is the apache user which is www-data on Ubuntu. I'm afraid I don't know how to fix this one - maybe someone else will chime in here.
Greg
--
Greg Coit
Systems Administrator
http://www.chapterthree.com
returnpath
I successfully use http://drupal.org/project/returnpath in order to fix that email issue. What type of PHP errors did you get? Do you have devel module enabled?
I'm seeing: Notice: Undefined
I'm seeing:
Notice: Undefined variable: messages in drupal_mail_wrapper() (line 28 of /vol/var/www/sites/all/modules/returnpath/returnpath.module).Symetrik Design
Drupal Consulting
http://www.symetrkdesign.com
Follow up issue
http://drupal.org/node/892424
mail from fix
the mail from address can be fixed in php.ini:
sendmail_path = "/usr/sbin/sendmail -t -i -f drupalsitename@dev.myactualdomain.com"
...& thnx for postfix fixes :-)