Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with email virtual domains

Status
Not open for further replies.

Donboy

IS-IT--Management
Aug 20, 2002
73
US
I've got qmail setup along with courier-imap and everything works great. I can send and receive mail to the accounts I've created and it's no problem at all.

The only trouble I have is, when I try to setup virtual email domains so that a user can have unlimited email addresses for his account, it doesn't work. Here's what I've got...

The following filenames look like this...

/var/qmail/control/virtualdomains

websupport.cc:donboy
rpgdomains.com:donboy

/var/qmail/control/rcpthosts

localhost
websupport.cc
rpgdomains.com

When I finished making these changes to the files, I made a .qmail-default file under my directory so that qmail would know I want my mailbox to be the default for the domain.

When finished, I did a qmail restart and tried sending mail to "test@websupport.cc" and here's what the logs had to say...

> Aug 11 12:02:38 slaveone qmail: 1060621358.400348 info msg 1508345:
> bytes 1033 from <webmaster@roleplayinggames.net> qp 10861 uid 505
> Aug 11 12:02:38 slaveone qmail: 1060621358.497098 starting delivery 5:
> msg 1508345 to local test@websupport.cc
> Aug 11 12:02:38 slaveone qmail: 1060621358.497179 status: local 1/10
> remote 0/20
> Aug 11 12:02:38 slaveone qmail: 1060621358.502028 delivery 5: failure:
> Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/

What did I miss? If you need to see other files I have, please ask and I will post them.

Now with all of that said, here's something else that is weird.

When I change...

/var/qmail/controls/locals
and
/var/qmail/control/me

to say...

slaveone.websupport.cc

I get the following delivery error:

> starting delivery 1: msg 1508345 to local donboy_-test@websupport.cc

What the heck is that about!?!? How can you have an underscore and a hyphen at the same time?

I've been working with somebody else trying to solve this problem and we are both stumped.
 
A few things to consider.

1) localhost in the rcpthosts file doesn't make a great deal of sense to me, but that's certainly your decision.
2) adding a hostname to the locals list is wrong
3) adding the virtual domain websupport.cc to the locals list is not going to help
4) adding the hostname slaveone.websupport.cc to 'me' *IS* correct.

Try tidying these few things up and see if the issue corrects itself. It's hard to contribute more without new log output from tests under a corrected environment.

Hang in there.
 
Ok, so what you're saying is, locals should have NOTHING in it?? If I'm not adding a hostname, and not adding the virtual domain, what should be in there?

I will try what you suggested and report any new findings.

Thanks!
 
When I try to send mail to a dummy address (hoping they will all be directed to my local account) like sending mail to nobody@websupport.cc, I get the message returned to me saying &quot;Sorry. Although I'm listed as a best-preference MX or A for that host, it isn't in my control/locals file, so I don't treat it as local.&quot;

Here are my current files and their contents...

/var/qmail/control/locals
websupport.cc
rpgdomains.com

/var/qmail/control/me
slaveone.websupport.cc
slaveone.rpgdomains.com

/var/qmail/control/rcpthosts
websupport.cc
rpgdomains.com

/var/qmail/control/virtualdomains
websupport.cc:donboy
rpgdomains.com:donboy

Here's the error as it appears in my logs...

slaveone qmail: 1060812088.812025 info msg 1508793: bytes 1145 from <webmaster@roleplayinggames.net> qp 13446 uid 504
slaveone qmail: 1060812088.921976 starting delivery 2: msg 1508793 to remote donboy@slaveone.websupport.cc
slaveone qmail: 1060812088.922053 status: local 1/10 remote 1/20
slaveone qmail: 1060812088.922074 delivery 1: success: did_0+1+0/qp_13446/
slaveone qmail: 1060812088.922093 status: local 0/10 remote 1/20
slaveone qmail: 1060812088.922112 end msg 1508792
slaveone qmail: 1060812088.927159 delivery 2: failure: Sorry._Although_I'm_listed_as_a_best-preference_MX_or_A_for_that_host,/it_isn't_in_my_control/locals_file,_so_I_don't_treat_it_as_local._(#5.4.6)/


I also have a file under /var/qmail/alias called .qmail-webmaster and the contents are just &quot;donboy&quot; but when I try to send mail to webmaster@websupport.cc it returns to me with the same error message.

Don't know if these are seperate problems, but figured as much info as I could provide would help.
 
If websupport.cc is virtual, then remove it from locals.
Also, what domain is &quot;donboy&quot; the virtual recipient listed under? I don't see a domain for him in locals or virtuals.
 
Actually I guess rpgdomains.com and be the virtual domain, so I'll remove that.

Not sure what you mean by &quot;virtuals&quot;. I assume you mean /var/qmail/controls/virtualdomains. The contents of that file are shown above. Both domains point to the &quot;donboy&quot; mailbox.
 
Ok, I managed to figure out one of my problems. The reason I wasn't able to send mail to webmaster@websupport.cc (an alias) is because I had the file /var/qmail/control/me with slaveone.websupport.cc and it should have been simply websupport.cc. Changing that now enables me to send mail to any alias files I create under /var/qmail/alias. This struck me as odd, since your first post said that having slaveone.websupport.cc was correct to have in the &quot;me&quot; file.

Now the only problem that remains is sending to any other addresses that don't already exist, like nobody@websupport.cc. When I do that, it's returned to me saying No mailbox here by that name, and looking in the logs, it seems to be trying to send the mail to a local address.

Aug 21 23:24:33 slaveone qmail: 1061526273.445893 info msg 329107: bytes 1036 from <webmaster@roleplayinggames.net> qp 14225 uid 501
Aug 21 23:24:33 slaveone qmail: 1061526273.546657 starting delivery 3: msg 329107 to local nobody@websupport.cc
Aug 21 23:24:33 slaveone qmail: 1061526273.546736 status: local 1/10 remote 0/20
Aug 21 23:24:33 slaveone qmail: 1061526273.551713 delivery 3: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/

Again, here are the contents of all my critical files...

/var/qmail/control/rcpthosts
websupport.cc
rpgdomains.com

/var/qmail/control/me
websupport.cc
rpgdomains.com

/var/qmail/contorl/locals
websupport.cc
rpgdomains.com

/var/qmail/control/defaultdomain
[nothing - empty file]

/var/qmail/control/plusdomain
websupport.cc

/vsr/qmail/control/virtualdomains
websupport.cc:donboy
rpgdomains.com:donboy

I should also say that I've just spent the evening reading Life with Qmail completely and thoroughly, but there must be something I've overlooked.
 
Well everyone, my problems are over. Here's what I did. First, I joined the qmail mailing list. This was a great idea, but you really have to be careful in there. These guys are serious experts with qmail and they are pretty obnoxious if you start asking a bunch of noobie questions. You'll get flamed and cursed at with messages like RTFM and saying you should reply again with more information or you should go read an FAQ.

Luckily, I didn't get flamed too badly because I had done a lot of searching their archives before I posted to the list. You should go to the qmail homepage and on there you'll find instructions for joining the list and searching the list.

Now, on to the solutions:

First of all, I was using Samba to give me file access on my Linux box. In doing this, I was sometimes opening files directly from my Linux shares and editing them with a Windows text editor. What I didn't know is that when you edit using a Windows text editor, you have a CONTROL+M that appears at the end of each line where you hit the return key. If you use the vi editor with the -b switch, you'll see these funky things showing up at the end of each line. Luckily only my virtualhosts file was showing these wacky characters.

After I removed these little buggers, I then found that my .qmail-default file also had them. This file should be exactly ZERO bytes in size. If it's 1 byte or more, something is wrong. Delete it and recreate using the touch command.

Anyway, that's it! Everything works great now and I'm able to send and receive mail to any address I want and it all comes to my central mailbox.

Oh yeah... another thing I learned... you can go to /var/qmail/bin and run the file qmail-showctl and it will display all of the critical information about what qmail is using to handle locals, rcpthosts, virtualdomains (etc etc). The nice folks on the qmail mailing list prefer that you run this command and paste the unaltered output into your message to the list. That, along with copies of the relavent lines of your maillog will be good too.

Running the qmail-showctl program is how I was alerted to my problem. There were question marks at the end of each line in my virtualdomains file. When I asked the question about these, that's how the problem was identified.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top