Virtualmin AMI forum subsection?

19 posts / 0 new
Last post
#1 Sun, 01/25/2009 - 01:06
Donkzilla

Virtualmin AMI forum subsection?

hi there, I think it would be handy to have a subsection where we can discuss issues relevant to GPL and Paid Virtualmin AMIs.

I have one or two probelms with a Virtualmin Pro AMI running on Amazon's EC2 service. Specifically I have setup a Virtualmin backup schedule to make backups to an Amazon S3 bucket, and the backup files are not getting dates/times appended to the filenames when the "Do strftime style time substitutions on file or directory name" checkbox is ticked.

I think this may be a problem unique to AMIs - if we had a forum section to discuss Virtualmin AMIs, that would be great :)

Thu, 01/29/2009 - 11:46
Donkzilla

fixing the backups problem is low priority for me at the moment, but I have another problem and this one I need to fix: I'm trying to send email from a php script and it's not getting delivered because recipients don't accept mail from dynamic IP addresses: <div class='quote'>(host mx2.hotmail.com[65.54.244.168] said: 550 DY-001 Mail rejected by Windows Live Hotmail for policy reasons...</div>
and from another recipient:
<div class='quote'>Domain of sender
address fuel-remap@domU-12-31-39-00-48-05.localdomain does not exist </div>
I've spent quite a few hours on this and I'm getting more confused as I read about BIND and DNS. I'm used to Plesk on a rackspace server so technically I'm not a newbie.... but I'm feeling very lost...

I'm using an elastic IP (75.101.163.73) which is actually static, not dynamic. Any ideas?&lt;br&gt;&lt;br&gt;Post edited by: Donkzilla, at: 2009/01/29 23:42

Thu, 01/29/2009 - 14:30 (Reply to #2)
andreychek

Well, indeed, the address listed above isn't a legitimate address.

I'd make sure that your system is setup with a FQDN, and that Postfix is using said name.

Also, be sure the from address you're using is correct.
-Eric

Thu, 01/29/2009 - 23:02 (Reply to #3)
Donkzilla

hi Eric

I've got several FQDNs on the system, but the one I'm trying to setup email with, is fuel-remap.co.uk. Postfix configuration is in the Webmin section of my console, and I can't find it in the Virtualmin section - I set fuel-remap.co.uk as the domain to use in outbound mail at the top of the general options, and this appears to have helped a bit - I'm not sure though, as no bounce messages have been received, but email is still not getting through to my hotmail account. That's if I'm sending directly to my hotmail account. But if I send to one of my email accounts on my rackspace server that redirects to hotmail, it arrives in my hotmail inbox. So I'm <i>nearly</i> there. Except how do I send email from my other FQDNs on the system - does email from those go through Postfix/fuel-remap.co.uk? Sorry if I'm missing something obvious but I've spent many hours on this now and it's like I can't see the wood for the trees.

Thu, 01/29/2009 - 23:45 (Reply to #4)
Donkzilla

I tried to edit the above post but can only seem to edit an earlier post above that - anyway, here is my attempt at an edit:
Edit: I just checked the full header of the email that did get through and it's still got the wrong hostname:
Extract:
<div class='quote'>Received: from ec2-75-101-163-73.compute-1.amazonaws.com (HELO domU-12-31-39-00-48-05.localdomain) (75.101.163.73)</div>

Fri, 01/30/2009 - 01:09 (Reply to #5)
Donkzilla

Update: I went into Webmin configuration/ports and addresses, and changed webserver hostname to fuel-remap.co.uk - no luck, I still have the same problem - still the same amazon hostname in email headers.

Sat, 01/31/2009 - 17:28 (Reply to #6)
andreychek

If you log in over SSH, and type &quot;hostname&quot;, what do you see?

Also, if you run this, what output do you get:

postconf | grep 'myhostname ='

Sun, 02/01/2009 - 03:19 (Reply to #7)
Donkzilla

hi Eric, you should take time off at the weekends!

logged in over ssh and typing in &quot;hostname&quot; returns: <div class='quote'>domU-12-31-39-00-48-05</div>

typing in &quot;postconf | grep 'myhostname ='&quot; returns:
<div class='quote'>postconf: warning: My hostname domU-12-31-39-00-48-05 is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
myhostname = domU-12-31-39-00-48-05</div>

Sun, 02/01/2009 - 06:46 (Reply to #8)
andreychek

Well, that kind of seems like the issue there :-)

First, whatever your fully qualified name is, that needs to be listed in /etc/postfix/main.cf, within the myhostname directive. Add that in there, and then restart Postfix (/etc/init.d/postfix restart).
-Eric

Sun, 02/01/2009 - 10:07 (Reply to #9)
Donkzilla

thanks Eric. I'm <i>getting</i> there.

typing in &quot;postconf | grep 'myhostname ='&quot; now returns:
<div class='quote'>myhostname = fuel-remap.co.uk</div>

but when I check the full header in email sent to my hotmail account via a redirected email account on my rackspace server, I'm still seeing stuff that is causing hotmail to reject email sent direct:
<div class='quote'>Received: from ec2-75-101-163-73.compute-1.amazonaws.com (HELO fuel-remap.co.uk) (75.101.163.73)</div>

There must be some way around this problem, or AMIs on Amazon's EC2 cloud will never be much use to the average webmaster.

*keeps fingers crossed*

Sun, 02/01/2009 - 10:14 (Reply to #10)
andreychek

It looks like you're halfway there.

I'm not too familiar with the Amazon EC2 stuff, but is there a way to set your reverse DNS address?

It looks like what you're missing at the moment is the reverse DNS. That's typically something that the provider/ISP handles -- Amazon in this case.
-Eric

Sun, 02/01/2009 - 10:45 (Reply to #11)
Donkzilla

this is the bounce message I get when trying to send direct to hotmail:
<div class='quote'>From MAILER-DAEMON@fuel-remap.co.uk (Mail Delivery System)
To fuel-remap@fuel-remap.co.uk
Date 01/02/2009 19:41
Subject Undelivered Mail Returned to Sender
Message contents

This is the mail system at host fuel-remap.co.uk.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to &lt;postmaster&gt;

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

&lt;**********@hotmail.com&gt;: host mx1.hotmail.com[65.55.37.104] said: 550
DY-001 Mail rejected by Windows Live Hotmail for policy reasons. We
generally do not accept email from dynamic IP's as they are not typically
used to deliver unauthenticated SMTP e-mail to an Internet mail server.
http://www.spamhaus.org maintains lists of dynamic and residential IP
addresses. If you are not an email/network admin please contact your
E-mail/Internet Service Provider for help. Email/network admins, please
visit http://postmaster.live.com for email delivery information and support
(in reply to MAIL FROM command)</div>

I've read quite a bit about DNS lately, but the more I read, the less I understand. Especially about reverse DNS. fuel-remap.co.uk is registered by 1and1.co.uk and in my 1and1 admin console I've set DNS to point to 75.101.163.73 and mail server to point to fuel-remap.co.uk. This is a bit different to how I change DNS settings for my 1and1 registered domains hosted on a rackspace server. For those domains I set DNS to point to ns1.rackspace.com and ns2.rackspace.com in my 1and1 console, and that is job done, as far as the 1and1 console is concerned. To get email working properly for those domains I then have to create MX records in my rackspace console (not my plesk console on my rackspace server).

If I drink plenty of coffee, and go very slowly, one step at a time, I might get this working. But I'm stuck getting my head round DNS...

Sun, 02/01/2009 - 16:22 (Reply to #12)
Donkzilla

<div class='quote'>It looks like what you're missing at the moment is the reverse DNS. That's typically something that the provider/ISP handles -- Amazon in this case.</div>
I've done some googling. Seems this is a show stopper for Amazon's EC2 service:

<div class='quote'><a href='http://solutions.amazonwebservices.com/connect/message.jspa?messageID=94... target='_blank'>http://solutions.amazonwebservices.com/connect/message.jspa?messageID=94...

<b>Elastic IP Reverse DNS?</b>

Is there a way for us to control the reverse DNS of an Elastic IP? Can we request such a delegation?

Reply

no </div>

There are ways around the problem: <a href='http://pauldowman.com/2008/02/17/smtp-mail-from-ec2-web-server-setup/' target='_blank'>http://pauldowman.com/2008/02/17/smtp-mail-from-ec2-web-server-setup/</a> but until Amazon properly solve the problem, there's no way I can consider migrating my rackspace server onto EC2. For now, EC2 works ok as a developers plaything. I'll just have to wait patiently until Amazon stretch elastic IPs to resolve to EC2 users own FQDNs.

Sun, 02/01/2009 - 21:07 (Reply to #13)
Joe
Joe's picture

You don't need reverse DNS to be anything special for email to work. That's not the problem here. (You <i>do</i> need for reverse lookups to resolve to something...but it doesn't have to be anything magical...and it doesn't have to match the hostname you use for forward lookups.)

That's what Eric was was saying in his last post...Amazon <i>is</i> providing reverse DNS. You don't need to control it. In fact, you probably don't want to. It's just more things to worry about getting right.

Your problem is still that your system does not have a sane fully qualified domain name that is resolvable. You fix that, and all will be well.

--

Check out the forum guidelines!

Mon, 02/02/2009 - 02:40 (Reply to #14)
Donkzilla

<div class='quote'>Your problem is still that your system does not have a sane fully qualified domain name that is resolvable. You fix that, and all will be well. </div> hi Joe. Is it fixable? And if so, please can you point me in the right direction. At the moment I have myhostname = fuel-remap.co.uk. This is all new stuff to me, so I'm completely lost without your help.

cheers
Rob

Mon, 02/02/2009 - 04:39 (Reply to #15)
andreychek

Hi Rob,

I've been running into more and more providers who require the sender's reverse DNS to match the forward DNS in order to accept email.

Now, is that the problem here? Seeing the bounce message you provided, probably not.

If when trying to send a message to Hotmail from Amazon, you receive an error about it being a dynamic IP, that's unfortunate, and we may need to try and figure something else out here.

Doing a little digging around, it appears that others are in your same predicament -- trying to figure out how to get emails out from EC2 -- and it does appear that EC2 is considered to be dynamic, a classification much like a typical home PC user.

At that point, the thing to do would be to see if there's an email relay you can use -- some place you can authenticate to and route email through them. Some people sign up for a Gmail account, and relay mail through it. That's free. But there's also plenty of services you can pay for to do that as well.
-Eric

Mon, 02/02/2009 - 08:41 (Reply to #16)
Donkzilla

hi Eric

yes, a lot of other people have run into problems trying to send email out of EC2. Mail relays seem to be the consensus solution. Mail relays sound a bit too technical for me - but I've come this far, I can go all the way - eventually I'll get back to my original intention: to go beyond 'hello world' html/css and php/mysql, and write a killer app for facebook!

:D

Mon, 02/02/2009 - 08:49 (Reply to #17)
andreychek

Well, you're pretty close.

To use a relay, there's 3 options:

1. Use an existing free solution; for example, some people sign up for a Gmail account and use that for relaying email

2. Pay a provider to act as an email relay.

3. Setup a relay of your own somewhere on the Internet -- you could buy a low-end VPS somewhere for ~ $20 a month to do that.

And then, just tell Postfix where the relay server is.
-Eric

Tue, 02/03/2009 - 23:07 (Reply to #18)
Donkzilla

thanks Eric, that's brilliant advice both for students on a low budget, and for business enterprises.

I'll start a new thread to revisit my problem with backups not getting the date appended to filenames... I'll do it at the weekend, when I'm less busy.

cheers, and thanks again,
Rob

Topic locked