Koozali.org: home of the SME Server

not in rcpt_hosts

rbowers

not in rcpt_hosts
« on: February 16, 2005, 04:30:16 AM »
I have 4 domains configured on my SME server.
When I moved from v5 to v6 (reinstall) I started getting emails bouncing with the error not in rcpt_hosts.

I've done some checking, and resolved the problem by changing the custom-templates file. To fix the problem, I had to add mail.mydomain.com to my rcpt_hosts file. I had to take a crash course in perl to do that  :pint:

- My server is called mydomain.com
- All my emals go to user@mail.mydomain.com

According to the "Manage domains" screen of the server-manager,

When you create a virtual domain, your server will be able to receive e-mail for that domain and will also be able to host a web site for that domain.

Does it make sense that I need to specifically add mail.mydomain.com in addition to mydomain.com?  Why?

Offline Brenno

  • *****
  • 208
  • +0/-0
not in rcpt_hosts
« Reply #1 on: February 22, 2005, 04:00:20 PM »
I don't think you have to specifically add mail.mydomain.com into your virtual domains list, as SME should create this subdomain automatically when you create it's parent domain. (It should also create others like ftp.mydomain.com and serverhostname.mydomain.com. See the "Hostnames and Addresses" link in server-manager.)

You might need to create a mail.mydomain.com, for instance, if you're hosting email for a site but not the site itself, or if you're hosting the site and not the email.  Having both domains on the server will allow you to direct traffic to an appropriate IP address using your DNS records.

Your rcpt_hosts error sounds like a security issue.  Are users trying to send email through your server from outside the local network?

rbowers

not in rcpt_hosts
« Reply #2 on: February 22, 2005, 06:14:22 PM »
I did check "Hostnames and addresses" and all the proper names are created -- [serverhostname ftp mail proxy wpad www].mydomain.com

I still had to modify rcpt_hosts.
The errors occur when outside users try to send me mail.  What happens is the mail gets sent to (e.g.) user@mydomain.com and gets forwarded to my SME server as user@mail.mydomain.com
Without changing my rcpt_hosts to include mail.mydomain.com, the emails get rejected as "not in rcpt_hosts"

I have things working okay, but I'm curious why this happens.  As you noted, [ftp mail www etc].mydomain.com get created, so I don't think I should have to force mail.mydomain.com into the rcpt_hosts file.

Offline Brenno

  • *****
  • 208
  • +0/-0
not in rcpt_hosts
« Reply #3 on: February 22, 2005, 07:36:00 PM »
Email will ultimately be delivered to mail.mydomain.com if mail is the hostname of your server.  In my setup, mail is ultimately delivered to mailsrvr.mydomain.com since mailsrvr is my server's hostname.

I don't think this should be causing complications, though, as this has always worked just fine for me.

Any time I've had a client get the "not in rcpt_hosts" error they've been using the secure mail contrib to access IMAP over SSL and had their security permissions wrong.  It's never happened for outside users sending mail to us.

What are your MX records set up as?

rbowers

not in rcpt_hosts
« Reply #4 on: February 22, 2005, 09:49:54 PM »
I get it.  My server is not named mail.  So I should forward my mail not to mail.mydomain.com but to servername.mydomain.com.

Where do I find the MX record setup?  Since SME was made "dummy-proof" and I don't know a lot about UNIX email, I'm not sure where the mail stuff is defined.  I'm learning as I go.

Offline Brenno

  • *****
  • 208
  • +0/-0
not in rcpt_hosts
« Reply #5 on: February 22, 2005, 10:19:22 PM »
You can check the records associated with your registered domain name at www.dnsstuff.com

Once there, enter your domain name in the Hostnames Test > DNS Lookup box at the top right of their page.  Enter you hostname as mydomain.com and select All(Any) from the drop down menu.  This will produce a list of all records associated with your domain name.

One of those records should have a type MX (Mail eXchange) and it should read a domain in the format "hostname.mydomain.com".  Farther down the list, you should see "hostname.mydomain.com" with an A record which has your server's external IP beside it (assuming your mail server is to receive the email directly.)

All of your mail can be addressed to user@mydomain.com, but you must first ensure that you have an MX record for mydomain.com and that the MX record is set to the external IP of your server.  This will tell the internet at large which IP to send email data to.

In my instance, my MX record points to mail.mydomain.com, and mail.mydomain.com points to 216.75.xxx.xxx.  I can send mail to user@mydomain.com and when the sending mail server routes, it looks for an MX record for mydomain.com, which will be mail.mydomain.com.  It then forwards the mail to the IP associated with mail.mydomain.com, regardless of the hostname of the server which is at that IP.  The hostname of the server isn't quite relevant as long as your MX records are set properly.

I'm hoping this is helpful without being overwhelming.  I know it was a lot for me to grasp when I started at this 2 years ago as I was very green coming into things - one of the reasons I like SME server so much.

If you want specific help with your domain, you can always private message me and we can work with actual values to see how things line up.

rbowers

not in rcpt_hosts
« Reply #6 on: February 23, 2005, 04:51:29 AM »
Quote from: "Brenno"
You can check the records associated with your registered domain name at www.dnsstuff.com

One of those records should have a type MX (Mail eXchange) and it should read a domain in the format "hostname.mydomain.com".  Farther down the list, you should see "hostname.mydomain.com" with an A record which has your server's external IP beside it (assuming your mail server is to receive the email directly.)

All of your mail can be addressed to user@mydomain.com, but you must first ensure that you have an MX record for mydomain.com and that the MX record is set to the external IP of your server.  This will tell the internet at large which IP to send email data to.

In my instance, my MX record points to mail.mydomain.com, and mail.mydomain.com points to 216.75.xxx.xxx.  I can send mail to user@mydomain.com and when the sending mail server routes, it looks for an MX record for mydomain.com, which will be mail.mydomain.com.  It then forwards the mail to the IP associated with mail.mydomain.com, regardless of the hostname of the server which is at that IP.  The hostname of the server isn't quite relevant as long as your MX records are set properly.


I went there.  My MX record shows mydomain.com (not hostname.mydomain.com). It correctly points to my IP address 24.218.xxx.yyy
I use www.zoneedit.com for my DNS services.  I forward my known user accounts from userN@mydomain.com -> userN@mail.mydomain.com and the rest to *@mydomain.com -> default@mail.mydomain.com

I do this so that, when I forward mail, I won't get recursion problems. Maybe I don't need to do this?

Quote from: "Brenno"

I'm hoping this is helpful without being overwhelming.  I know it was a lot for me to grasp when I started at this 2 years ago as I was very green coming into things - one of the reasons I like SME server so much.

If you want specific help with your domain, you can always private message me and we can work with actual values to see how things line up.


This has helped a lot and is not overwhelming.  I'm very technical, but haven't had much experience yet with email.

Thanks for the help,

~Rick

Offline Brenno

  • *****
  • 208
  • +0/-0
not in rcpt_hosts
« Reply #7 on: February 23, 2005, 03:14:39 PM »
Quote from: "rbowers"

My MX record shows mydomain.com (not hostname.mydomain.com). It correctly points to my IP address 24.218.xxx.yyy


Rick, do you have DNS records for mail.mydomain.com set up?  You should have these defined if you're trying to route traffic to that address.  For instance:

Entry:--Domain:------------------Type:---Value:
1--------mydomain.com---------MX------mail.mydomain.com
2--------mydomain.com----------A-------24.218.xxx.yyy
3--------mail.mydomain.com---A-------24.218.xxx.yyy

Entry 1 will define which domain name is going to be responsible for the mail.  Entry 2 will define the IP for mydomain.com.  Entry 3 will define the IP for mail.mydomain.com.  

Quote from: "rbowers"
I use www.zoneedit.com for my DNS services.  I forward my known user accounts from userN@mydomain.com -> userN@mail.mydomain.com and the rest to *@mydomain.com -> default@mail.mydomain.com

I do this so that, when I forward mail, I won't get recursion problems. Maybe I don't need to do this?


I'm not convinced you need to do this, though I admit I'm not 100% sure I understand your reasoning.  But in order for this to work right, you should have an A record for mail.mydomain.com to establish an IP for that domain (as in Entry 3 above.)

Quote from: "rbowers"
Thanks for the help, ~Rick


No problem, that's why we're all here!