Mail Server Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationMail Server Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 14th, 2004, 02:45 AM
kk41 kk41 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 6 kk41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Qmail problem. starttls says 502 unimplemented (#5.5.1) -what's wrong?

I'm new to qmail. I have followed to qmailrocks installation instructions and now I have some problems when I'm try to test server's TLS functionality .

#telnet localhost 25

ehlo localhost
250-localhost.localdomain Hello root at localhost [127.0.0.1]
250-SIZE 52428800
250-PIPELINING
250 HELP
starttls (this is where I try to start TLs)
503 STARTTLS command used when not advertised

After ehlo there should be "250-STARTTLS" -message. It's seems like I have screwed up my SMTP -settings. I quess that there are some simple solution for this! I tried to study the problem with google but I could'nt find anything useful (I'm newbie, maybe I don't understand the problem well enough).

Reply With Quote
  #2  
Old December 14th, 2004, 12:08 PM
dba_frog's Avatar
dba_frog dba_frog is offline
cave painting, the 1st Opn Src
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 404 dba_frog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 42 m 16 sec
Reputation Power: 6
Quote:
In the above SMTP session, I have higlighted the important aspects in DARK RED. After you give the server the initial "ehlo localhost" command, you should get a response back that lists "250-STARTTLS", signaling that the server is in fact equipped for TLS functionality. Then, after you issue the "starttls" command, you should get the :"220 ready for tls" response if the server is able to successfully start the TLS session.

If you happen to get an error that states "454 TLS not available: missing RSA private key (#4.3.0)" after you issue the "starttls" command, you will want to check 2 things:

1) Verify that the cert actually exists at /var/qmail/control/servercert.pem. If it's not there, go back to step 2 and repeat the cert creation step.

2) Verify that the cert is owned by vpopmail:vchkpw. If it's not, then make it so like this:

chown vpopmail:vchkpw /var/qmail/control/servercert.pem

Alright! If you have reached this point, then Qmail is now successfully up and running. Technically speaking, you could quit right here and have a functioning mail server. However, we still have a few options that we're going to plug into Qmail before we're done. In the next pages we will:


so I'd say that your problem
Quote:
503 STARTTLS
has to do with your RSA cert and or the perms on it.

hth...

p.s. from step 11, Fedora install
__________________
Curious by Nature,
Linux by Choice

Reply With Quote
  #3  
Old December 15th, 2004, 06:16 AM
kk41 kk41 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 6 kk41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by dba_frog
1) Verify that the cert actually exists at /var/qmail/control/servercert.pem. If it's not there, go back to step 2 and repeat the cert creation step.


That's Ok. There are /var/qmail/control/servercert.pem file in my Debian system.

Quote:
Originally Posted by dba_frog
2) Verify that the cert is owned by vpopmail:vchkpw.


#ls -lha servercert.pem
-rw-r----- 1 vpopmail vchkpw 2.1K 2004-12-09 17:27 servercert.pem

So that should be ok too.

Reply With Quote
  #4  
Old December 15th, 2004, 08:22 AM
dba_frog's Avatar
dba_frog dba_frog is offline
cave painting, the 1st Opn Src
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 404 dba_frog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 42 m 16 sec
Reputation Power: 6
mmm...

Quote:
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 somewhere.anywhere.com ESMTP
ehlo localhost
250-somewhere.anywhere.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
starttls
You don't have a AUTH LOGIN in the snippet you provided...
I was checking the Debian install at qmailrocks.org, did you have any problems creating your cert?

Is this the only portion of your install that isn't working? If so, we are getting closer ... Do the other Telnet sessions work? 143,106 from instructions.

Reply With Quote
  #5  
Old December 17th, 2004, 06:33 AM
kk41 kk41 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 6 kk41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by dba_frog
You don't have a AUTH LOGIN in the snippet you provided...
I was checking the Debian install at qmailrocks.org, did you have any problems creating your cert?


No. I didn't have any problems creating cert -at least I think so. I suppose that what you put in cert questions (you know, "what is your region", "what is your email" and so on...)doesn't really matter.

Quote:
Is this the only portion of your install that isn't working? If so, we are getting closer ... Do the other Telnet sessions work? 143,106 from instructions.


All other "vital" Qmail parts work. My Qmail status looks like this:

# qmailctl stat
/service/qmail-send: up (pid 25795) 85801 seconds
/service/qmail-send/log: up (pid 25800) 85801 seconds
/service/qmail-smtpd: up (pid 11768) 0 seconds
/service/qmail-smtpd/log: up (pid 25803) 85801 seconds
/service/qmail-pop3d: up (pid 25806) 85801 seconds
/service/qmail-pop3d/log: up (pid 25807) 85801 seconds

So there are some problems with smtpd -service.

There are also some problems with SpamAssassin and Clam Antivirus but thats other headache -nothing to do with smtpd problem I think. Telnet to port 143 work but port number 110 is closed.

Other ports which are listed in
http://www.qmailrocks.org/checklist.php
are open too.

The server is in network which is secured with our ISP's firewall. Firewall blocks almost all other ports than 80 & 22 to Internet and from Internet but that should not affect to our internal network traffic. (huh, my english is bad. Sorry about that...).

Reply With Quote
  #6  
Old December 17th, 2004, 07:41 AM
kk41 kk41 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 6 kk41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If I try to run qmail-smtpd directly (can I do this?) I get this:

/var/qmail/bin#./qmail-smtpd

diff: qmail-1.03-orig/Makefile: No such file or directory
diff: qmail-1.03/Makefile: No such file or directory
./qmail-smtpd: line 2: ---: command not found
./qmail-smtpd: line 3: +++: command not found
./qmail-smtpd: line 4: @@: command not found
./qmail-smtpd: line 5: trigger.o: command not found
./qmail-smtpd: line 9: +auto_split.o: command not found
./qmail-smtpd: line 10: ./load: No such file or directory
./qmail-smtpd: line 15: +: command not found
./qmail-smtpd: line 18: qmail-send.0:: command not found
diff: qmail-1.03-orig/qmail.c: No such file or directory
diff: qmail-1.03/qmail.c: No such file or directory
./qmail-smtpd: line 20: ---: command not found
./qmail-smtpd: line 21: +++: command not found
./qmail-smtpd: line 22: @@: command not found
./qmail-smtpd: line 26: +#include: command not found
./qmail-smtpd: line 28: -static: command not found
./qmail-smtpd: line 29: +static: command not found
./qmail-smtpd: line 30: +: command not found
./qmail-smtpd: line 31: syntax error near unexpected token `('
./qmail-smtpd: line 31: `+static void setup_qqargs()'

This isn't normal, is it?

Reply With Quote
  #7  
Old December 17th, 2004, 08:18 AM
dba_frog's Avatar
dba_frog dba_frog is offline
cave painting, the 1st Opn Src
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 404 dba_frog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 42 m 16 sec
Reputation Power: 6
Quote:
If I try to run qmail-smtpd directly (can I do this?) I get this:
/var/qmail/bin#./qmail-smtpd
you can't force smtpd-daemon the way to are trying.

BUT, I got to thinking about this
Quote:
-rw-r----- 1 vpopmail vchkpw 2.1K 2004-12-09 17:27 servercert.pem
You don't have the right perms on this. try chmod 644 servercert.pem and see if the cert will execute.

Last edited by dba_frog : December 17th, 2004 at 08:23 AM.

Reply With Quote
  #8  
Old December 21st, 2004, 05:54 AM
kk41 kk41 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 6 kk41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by dba_frog
BUT, I got to thinking about this You don't have the right perms on this. try chmod 644 servercert.pem and see if the cert will execute.


Ok, I used chmod and now privileges should be right. Same SMTPD problem still exists. I even try chmod 777 servercert.pem but it won't work either.

So let's assume that my certs are ok and problem is somewhere else. Do I need qmail-tls patch? I patched my Qmail with "qmail_big_patches.script" (according to qmailrocks installation guide) so I suppose that qmail-tls patch is in that "collection of patches". Or maybe there are some problems with my openssl -software?

Reply With Quote
  #9  
Old December 21st, 2004, 08:23 AM
dba_frog's Avatar
dba_frog dba_frog is offline
cave painting, the 1st Opn Src
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 404 dba_frog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 42 m 16 sec
Reputation Power: 6
Quote:
qmail-tls patch
, I don't know if it is in there.

I hate to suggest this, but I'm running low on ideas, Have you thought about a tear-down and complete re-install?
I wouldn't say that even THAT could cure the problem.

The only reason to suggest it would be if you didn't have any other choice to try and resolve the problem.

Reply With Quote
  #10  
Old December 22nd, 2004, 02:21 AM
kk41 kk41 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 6 kk41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by dba_frog
I hate to suggest this, but I'm running low on ideas, Have you thought about a tear-down and complete re-install?


Yes. I think that reinstall is the only solution now. It's not so big operation becouse this is just test server and I got some time to practice qmail installation and maintanance before the real email system should be installed. Ofcourse this time is always away from something else but I think that I cope with that...

...Intresting. Now I probably know what was the main problem. I made some bizarre mistake and combiled Qmail WITHOUT that qmailrocks all-in-once patch! Ouch. Now I remember that I had some problems with compiling the patched qmail. I try few things and blim! It compiled (it was the unpatched qmail which compiled, it seems like I had qmail sources in two different places on my filesystem). I feel such and IDIOT now. Well, I assume that when I solve the compilation problem and recompile that PATCHED qmail source the startttls will work normally. I apology that I take your time. Thanks for help!

By the way, the compilation probelm still exists.

# cd /usr/src/qmail/qmail-1.03
# make setup check
.
.
.
-lssl -lcrypto
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make: *** [qmail-remote] Error 1

On Stable debian version compilation succeed normally. The probelm exists on sarge -version. Something wrong with compiler, openssl etc?

Reply With Quote
  #11  
Old January 6th, 2005, 09:47 AM
pit pit is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 2 pit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by kk41
Yes. I think that reinstall is the only solution now. It's not so big operation becouse this is just test server and I got some time to practice qmail installation and maintanance before the real email system should be installed. Ofcourse this time is always away from something else but I think that I cope with that...

...Intresting. Now I probably know what was the main problem. I made some bizarre mistake and combiled Qmail WITHOUT that qmailrocks all-in-once patch! Ouch. Now I remember that I had some problems with compiling the patched qmail. I try few things and blim! It compiled (it was the unpatched qmail which compiled, it seems like I had qmail sources in two different places on my filesystem). I feel such and IDIOT now. Well, I assume that when I solve the compilation problem and recompile that PATCHED qmail source the startttls will work normally. I apology that I take your time. Thanks for help!

By the way, the compilation probelm still exists.

# cd /usr/src/qmail/qmail-1.03
# make setup check
.
.
.
-lssl -lcrypto
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make: *** [qmail-remote] Error 1

On Stable debian version compilation succeed normally. The probelm exists on sarge -version. Something wrong with compiler, openssl etc?


Dear cracks,

i am newbie and have the same problem on Debian stable woody distribution.
when we try to make qmail 5.4.7 (or any other ...)
we get the same error:

-lssl -lcrypto
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make: *** [qmail-remote] Error 1

Someone found a solution for it?

Need help soon!

Reply With Quote
  #12  
Old January 6th, 2005, 10:01 AM
dba_frog's Avatar
dba_frog dba_frog is offline
cave painting, the 1st Opn Src
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 404 dba_frog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 42 m 16 sec
Reputation Power: 6
qmailrocks.org has a DEBIAN forum. You may want to search\post there for an answer.
qmailrocks debian forum

your mileage may vary

Reply With Quote
  #13  
Old January 11th, 2005, 10:38 AM
pit pit is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 2 pit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thx for advice - i will try it

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationMail Server Help > Qmail problem. starttls says 502 unimplemented (#5.5.1) -what's wrong?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |