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 :slight_smile:

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:

(host mx2.hotmail.com[65.54.244.168] said: 550 DY-001 Mail rejected by Windows Live Hotmail for policy reasons…

and from another recipient:
Domain of sender address fuel-remap@domU-12-31-39-00-48-05.localdomain does not exist
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?<br><br>Post edited by: Donkzilla, at: 2009/01/29 23:42

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

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 nearly 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.

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:

Received: from ec2-75-101-163-73.compute-1.amazonaws.com (HELO domU-12-31-39-00-48-05.localdomain) (75.101.163.73)

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.

If you log in over SSH, and type "hostname", what do you see?

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

postconf | grep ‘myhostname =’

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

logged in over ssh and typing in “hostname” returns:

domU-12-31-39-00-48-05

typing in “postconf | grep ‘myhostname =’” returns:

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

Well, that kind of seems like the issue there :slight_smile:

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

thanks Eric. I’m getting there.

typing in “postconf | grep ‘myhostname =’” now returns:

myhostname = fuel-remap.co.uk

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:

Received: from ec2-75-101-163-73.compute-1.amazonaws.com (HELO fuel-remap.co.uk) (75.101.163.73)

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

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

this is the bounce message I get when trying to send direct to hotmail:

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 <postmaster>

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

               The mail system

<**********@hotmail.com>: 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)

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…

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.
I've done some googling. Seems this is a show stopper for Amazon's EC2 service:
http://solutions.amazonwebservices.com/connect/message.jspa?messageID=94414

Elastic IP Reverse DNS?

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

	Reply

no

There are ways around the problem: http://pauldowman.com/2008/02/17/smtp-mail-from-ec2-web-server-setup/ 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.

You don’t need reverse DNS to be anything special for email to work. That’s not the problem here. (You do 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 is 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.

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.
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

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

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!

:smiley:

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

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