[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 866
  • Last Modified:

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,
Paul
0
escorrego
Asked:
escorrego
  • 6
  • 5
1 Solution
 
DonboyCommented:
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?
0
 
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.
0
 
DonboyCommented:
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
Trying 192.168.0.60...
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
data
354 go ahead
blahblahblah
.
250 ok 1101099333 qp 12449
quit
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).
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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
data
354 go ahead
Subject: testing
this is a test.
.
250 ok 1101194803 qp 30394
0
 
DonboyCommented:
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.
0
 
escorregoAuthor Commented:
Here is a telnet log.  I did receive this message.  I think I needed the ehlo first.

ehlo
250-myqmailserver.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
helo
250 myqmailserver.com
mail from: me@gmail.com
250 ok
rcpt to: me@qmaildomain.com
250 ok
data
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._(#
4.4.2)/
@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
on._(#4.4.1)/
@4000000041a3a4342877def4 status: local 0/10 remote 4/255
@4000000041a3a44a11c176ac delivery 654: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connecti
on._(#4.4.1)/
@4000000041a3a44a11c19204 status: local 0/10 remote 3/255
0
 
DonboyCommented:
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.
0
 
escorregoAuthor Commented:
mail.kellyroots.com
paul@kellyroots.com
0
 
DonboyCommented:
I noticed you do not have an MX record for your domain.

http://www.dnsstuff.com/tools/lookup.ch?name=mail.kellyroots.com&type=MX

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.
0
 
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.
0
 
DonboyCommented:
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!
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now