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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot connect to qmail mail server after 'successful' install

Status
Not open for further replies.

wildnight

Programmer
Jul 10, 2005
19
US
Hi,

I've followed the qmailrocks guide on my Fedora3 server, and was able to complete the entire thing (caveat: didn't install Squirrelmail). All tests from the guide ran ok. Both web admin interfaces work (QmailAdmin and VqAdmin). The automatic qmail nightly status reports are showing up as email in my user email folder (home/vpopmail...).

*However*, I cannot login to the mail server using any mail client, even on the box itself. So then I found instructions for trying to log onto IMAP on port 143 using telnet. Even in this way, IMAP reports login failed.

In /var/log/maillog, I see stuff like this:

Code:
vhkpw-pop3: vpopmail user not found jchilders@:192.168.1.200
localhost imapd: LOGIN FAILED, user=jchilders, ip=[::ffff:192.168.1.218]
localhost sendmail[4369]: j6882B01004369: to=username@recipientdomain.com, ctladdr=apache from=root, mailer=relay, stat=Deferred: Connection refused by [127.0.0.1]

Other info:
* This new mail server is setup internally on 192.168.1.200. This is the IP I'm entering in network mail clients as the servername while testing, and is not working. All attempts to connect from mail clients say "connection refused" or a variation thereof.

* I downloaded and installed a "inst_check" script from lifewithqmail.org. Once I modified a couple directory names in the script, it runs fine and reports "Congratulations, your LWQ installation looks good."

Can anyone point me toward a solution? I've googled till I was blue in the face to no avail...

THANKS.

Jeff
 
Progress...

I was using the Linux username (jchilders) instead of the fully qualified qmail username (jchilders@mydomain.com).

I can now see the IMAP mailbox. Two problems remain:

1) My mail client cannot create folders in the IMAP mailbox. Why not? No error message is reported when trying to create a folder.

2)SMTP mail is being received by qmail (at least, it appears in the maillog) but it not being delivered to the user mailbox. Why not?

Note- I followed the qmailrocks guide, and have clamav and spamassassin installed.

The maillog entries look like:

Code:
Jul 10 12:43:34 mail qmail-scanner[4872]: Clear:RC.... jchilders_98@webmail.com jchilders@mydomain.com Test_from_yahoo <20050710.....qmail.web30711.mail.mud.yahoo.com> orig0data112191....-0data:10

I edited out the long strings of numerics above (replaced with .....).

Any help appreciated.

JC
 
So you tried, while on the local machine, to telnet to port 143 and you received a connection refused? if that is the case, then it sounds as if port 143 is not open, meaning IMAP is not running.

Double check the service, verify it is running. I'm blocking right now, but run netstat -ln (I think) to make sure port 143 is open.



 
I can now telnet into port 143, and login, as follows:

telnet 192.168.1.200 143
(TELNET HEADER STUFF)
ab login jchilders@mydomain.com mypassword
LOGIN OK

Using my mail client, I can see two messages that are in the inbox (from the qmail automatic nightly status thing). However, when I set my router to direct port 25 to my server (192.168.1.200), and send email from an external source (yahoo, gmail), it appears in the log (as above) but not in the user inbox....

Somehow the message is getting lost at/after the qmail-scanner stage, and no error message is being reported.

JC
 
Can you do this:

Tail your maillog on the mailserver.
Then, compose a email from your outside source. AFter that, can you copy and paste the contents of the maillog, so we can see the process? That should give us a good idea of what is happening.

 
Thanks. Here's the log, and it appears a new error is there (after server reboot?).

Code:
Jul 10 15:35:50 mail spamd[2327]: server successfully spawned child process, pid 2352
Jul 10 15:36:02 mail authdaemond: modules="authvchkpw", daemons=5
Jul 10 15:36:02 mail authdaemond: Installing libauthvchkpw
Jul 10 15:36:02 mail authdaemond: Installation complete: authvchkpw
Jul 10 15:49:21 mail X-Antivirus-MYDOMAIN-1.25-st-qms: [data11210249617753450] clamdscan: corrupt or unknown clamd scanner error or memory/resource/perms problem - exit status 512/2

Oh, I'm on Fedora 3 if that makes a difference.

Thanks very much for your help.
 
Never mind about clamav - it hadn't started and reported a permissions error with its log file. I fixed that, ran the tail on my maillog and sent a message. This is what I get (which looks like what I've been seeing right along):

Code:
Jul 10 16:17:12 mail spamd[2348]: connection from mail.smartbusinessware.com [127.0.0.1] at port 32812
Jul 10 16:17:12 mail spamd[2348]: checking message <4b9991840507101317207eb8fe@mail.gmail.com> for qscand:503.
Jul 10 16:17:14 mail spamd[2348]: clean message (1.5/5.0) for qscand:503 in 2.5 seconds, 1549 bytes.
Jul 10 16:17:14 mail spamd[2348]: result: .  1 - FROM_ENDS_IN_NUMS,HTML_10_20,HTML_MESSAGE,HTML_SHORT_LENGTH,RCVD_BY_IP scantime=2.5,size=1549,mid=<4b9991840507101317207eb8fe@mail.gmail.com>,autolearn=no
Jul 10 16:17:15 mail qmail-scanner[3636]: Clear:RC:0(64.233.162.194):SA:0(1.5/5.0): 2.699461 1549 jchilders98@gmail.com jchilders@smartbusinessware.com Test_4:17pm <4b9991840507101317207eb8fe@mail.gmail.com> orig-data11210266327753636:1549 1121026632.3638-1.data:20 1121026632.3638-0.data:16

Hope this helps... I'm really scratching my head over this one... I have this terrible feeling it's something really stupid and obvious...
 
Anything in the que? Seems like it should be delivered. Hmm. That is odd.

Let me do some research, see what I can come up with.
 
Thanks for your help. Here's the output of my qmailctl stat:

Code:
[root@data log]# qmailctl stat
/service/qmail-send: up (pid 3618) 13545 seconds
/service/qmail-send/log: up (pid 3623) 13545 seconds
/service/qmail-smtpd: up (pid 3625) 13545 seconds
/service/qmail-smtpd/log: up (pid 3626) 13545 seconds
/service/qmail-pop3d: up (pid 3620) 13545 seconds
/service/qmail-pop3d/log: up (pid 3622) 13545 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
 
Do I have this right, your sending test messages, and they just disappear?
qmail-scanner is the last entry in the log, if messages are just dropping off, qmail-scanner might be misconfigured. qmail-scanner has its own log directory, can you tail that and post it here?
 
Slylos:

Yes, that's right, I'm sending test messages and they disappear. Here's the tail of my qms-events.log:

Code:
1121087757:29856:------ START MSG 2005-07-11 09:15:57 ------
1121087757:29856:CONNECT-SMTP:192.168.1.218
1121087766:29856:ENV-HEADER:'yourdomain.com','smartbusinessware.com','childershome.com':jchilders98@gmail.com:jchilders@smartbusinessware.com
1121087766:29856:HEADER:::
1121087766:29856:TYPE:PLAIN
1121087767:29856:-    -    -:SCORE:REQ:QRTN:DEL:REJ
1121087767:29856:SPAM-RESULT:-1.2:5.0:0:0:0
1121087767:29856:SCANTIME:10.32843
1121087767:29856:------ STOP MSG ---------------------------

Looks to me like it's getting through qms-scanner properly? Where does it go next?

Thanks,

Jeff
 
Is there a corresponding log entry in syslog for qmail? There should be a corresponding "new msg" and "end msg" entry in your qmail logs that relate to this message, most likely with the same Message ID. Can you find those?
 
Ok, more info. I found the mail messages. They're being saved to:
/home/jchilders/Maildir (all one giant file)

instead of:
/home/vpopmail/domains/smartbusinessware.com/jchilders/Maildir

So it appears the mail IS being delivered but just not to the right place...? Do you have any idea which config controls the target mail folder?
 
You need to check the /var/qmail/control/defauldelivery file... it should contain "./Maildir/"
Right now you're stuck in qmail's default mode of "mbox" storage...

You will not be able to read your test email when you do this.

D.E.R. Management - IT Project Management Consulting
 
Ok, I checked /var/qmail/control/defauldelivery, and it has:

./Maildir

Should I add the trailing slash?

Thanks,

Jeff
 
Ok. I added the slash, then restarted qmail with:

qmailctl restart

Then I repeated the telnet to port 25 test (as above) twice. The only difference is, now the mail doesn't show up in the /home/jchilders/Maildir file or in the /home/vpopmail/domains/mydomain/jchilders/Maildir/new folder either. I guess it's now going somewhere else? But I'm not sure where to look for it.

Sorry :(

JC
 
As each user, if you are doing local delivery, you need to create the Maildir hierarchy in your home folder.

Maildir is NOT a file, it is a folder hierarchy.

see "maildirmake"

D.E.R. Management - IT Project Management Consulting
 
Are you saying I should go into /home/jchilders and :

maildirmake -f Inbox mail/Maildir

and then try again?
 
you shouldn't have to use maildirmake with vpopmail(I didn't). you might need to check your vpopmail config - how do you add users? commandline (i.e. ./vadduser) or are you using vqadmin?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top