qmail virtual domain cannot receive mail.

HELP!! :)

I setup with the instructions from qmailrocks.org.  Everything was working for months but I cannot receive email anymore on the virtual domains.  There were some changes made to sql that I'm guessing screwed things up.

Here's an example that'll probably better illustrate the problem.
qmail Server: dom.com
Virual Domain on qmail server: virdom.com
Other domain outside of network: other.com

user@virdom.com can send and receive mail to user@virdom.com.
user@virdom.com can send mail to user@other.com.
user@virdom.com can receive mail from postmaster@dom.com.
user@virdom.com cannot receive mail from user@other.com

postmaster@dom.com can receive mail from user@other.com.

qmail setup:
vqadmin 2.3.2
vpopmail 5.4.0
qmailadmin 1.2.0

Thanks in advance,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What changes were made to SQL?

When you say "cannot receive mail" what do you mean?  Your server will not accept mail for him?  Messages are not being delivered to his mailbox?
escorregoAuthor Commented:
A sql database got deleted and mysqld was stopped for a day.  mySQL is up and running again.  I'm not sure if it's a sql problem anymore.  I found it it's with a specific virtual domain.  Other virtual domain are working fine.  There are only several accounts in it so I deleted the accounts and virtual domain then recreated them and still have the same problem.

Message are not accepted by the server from other mail servers, I can send mail to myself but not from gmail (for example.)  I get a delay response.
How did you add and remove the virtual domain?  Did you use vqadmin?  if you did, I recommend doing it the "long hand" way and use the shell command line tools in this case.

Delete the domain...

/home/vpopmail/bin/vdeldomain virdom.com

And then recreate with...

/home/vpopmail/bin/vadddomain virdom.com adminpass

where "adminpass" is the postmaster's password you want to assign.

Hopefully this will repopulate your mysql dbase with the correct info.

I would also try opening a telnet session with your SMTP server and trying to send mail to that address and see what happens.  Here is a successful telnet session.  Just provide it with MAIL FROM and for RCPT TO and "data" commands like I did.

[root@slaveone root]# telnet falcon 25
Connected to falcon.
Escape character is '^]'.
220 falcon.mydomain.com ESMTP
MAIL FROM: me@hotmail.com
250 ok
RCPT TO:me@problemdomain.com
250 ok
354 go ahead
250 ok 1101099333 qp 12449
221 falcon.mydomain.com
Connection closed by foreign host.
[root@slaveone root]#

Hopefully this will show you what the error was.  Right now, these errors are probably deferrals that are being sent to the connecting MTA (your gmail account).
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

escorregoAuthor Commented:
connected and did the following.  It appeared to send fine but mail did not get delivered.  I'm running clamd and spamassassin.  I'm not sure how to check if they cought the message.

250 ok 1101194755 qp 30328
mail validemail@gmail.com
250 ok
rcpt validemail@mailserver
250 ok
354 go ahead
Subject: testing
this is a test.
250 ok 1101194803 qp 30394
Ok, that means your SMTP is accepting the messages just fine and they are probably sitting in your queue unable to be delivered to the user's mailbox

You can verify they are sitting in your queue by doing "qmailctl queue" which will list all the messages in your queue.  Or if you have installed qmHandle, you can run "qmHandle -l" (that's a lowercase L) which will do the same.  This will tell you if your messages are queued.  It seems pretty clear that they are, but it's good to verify.

You should also look in /var/log/qmail/qmail-send/current and see what the error messages are.  I'm not exactly sure how qmailrocks suggests setting up logging, so yours may be under /var/log/qmail/current instead.  You can grep this file to look for "deferral" since that's probaly what's happening.

you may also want to look under /home/vpopmail/domains/ and be sure all the directories and permissions are there for the domain we're having trouble with.  You can look under another domain and compare everything to be sure all the dir's and permissions are set properly.
escorregoAuthor Commented:
Here is a telnet log.  I did receive this message.  I think I needed the ehlo first.

250 myqmailserver.com
mail from: me@gmail.com
250 ok
rcpt to: me@qmaildomain.com
250 ok
354 go ahead
Subject: Testing
Got it!
250 ok 1101241017 qp 28284

Here's the response I get if I send from gmail:

Technical details of failure:
TEMP_FAILURE: Could not initiate SMTP conversation with any hosts: qmaildomain.com (1): Connection timed out]

I compared the domain permissions to others and they are the same.

I checked /var/log/qmail/qmail-send/current.  Here it part of it.

@4000000041a3a41f38071614 status: local 1/10 remote 2/255
@4000000041a3a41f38960bbc delivery 678: success: did_0+0+1/
@4000000041a3a41f3896232c status: local 0/10 remote 2/255
@4000000041a3a41f38962ee4 end msg 16454
@4000000041a3a42d387bb974 starting delivery 679: msg 16338 to remote PGVOECTYBVK@thaimail.com
@4000000041a3a42d387bd4cc status: local 0/10 remote 3/255
@4000000041a3a42f387a3aa4 starting delivery 680: msg 15234 to remote zmgflt@eszett.de
@4000000041a3a42f387a55fc status: local 0/10 remote 4/255
@4000000041a3a433387a36bc starting delivery 681: msg 5244 to remote Audra@mtgdata.com
@4000000041a3a433387a5214 status: local 0/10 remote 5/255
@4000000041a3a43409a2f8ec delivery 681: deferral: Connected_to_69.90.126.111_but_connection_died._(#
@4000000041a3a43409a31444 status: local 0/10 remote 4/255
@4000000041a3a43409a31ffc starting delivery 682: msg 7161 to remote EVXCYFBBRYJYT@8d8d.com
@4000000041a3a43409a32bb4 status: local 0/10 remote 5/255
@4000000041a3a4342877bfb4 delivery 682: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connecti
@4000000041a3a4342877def4 status: local 0/10 remote 4/255
@4000000041a3a44a11c176ac delivery 654: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connecti
@4000000041a3a44a11c19204 status: local 0/10 remote 3/255
Hmmm, well, I was under the impression this was a problem of trying to deliver from your machine to the local mailbox, but the gmail error you got indicates it's your SMTP server unable to accept messages for that domain.

Is it possible to give me the domain we're talking about so I can test it on my end?  Maybe I can see what error I'm getting.
escorregoAuthor Commented:
I noticed you do not have an MX record for your domain.


Is that intentional?  If it were me, I would assign MX for all my domains... not just A record.  but this may not matter.

I too was able to do a good telnet connection, but my MTA is reporting...

deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)

which indicates a network problem or your server is down, which clearly cant be true because I telnetted to it just fine.

You may want to try sending mail to some other domains from your gmail just to be sure they acually are working too.  I would expect this to fail for other domains that resolved to the same IP.  In other words... are you SURE it's only for just this domain?  Or for other domains too?

Are you running your server behind a router?  Or maybe you are using dynamic IP service like Zoneedit?  This could be causing you a problem.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
escorregoAuthor Commented:
Thanks, I setup the MX record in the name servers.  Once it propagates I'm sure it'll work.  Thanks for your help.

I kicking myself in the ass since that was the problem.  The DNS got messed up the same time the as the mySQL.  When I first tired I wasn't able to send to my domain using telnet because I didn't use "helo."  I through my hands up and figured it was something crazy in qmail.  Enough excuses, Thanks for your help.
It's the little things that usually get us.  Sometimes you just need a second set of eyes.

Glad it helped.  Thanks for the A!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.