Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Pop3 it's a high level programme who stays on the smtp SMTP MTA (message transfer agents_) and use them.... Well i am trying to make qmail (mail server for linux)... work... When i am going to compile password authentication programme who needs to work together pop3 and smtp... it gives me this errors :
&& echo -lcrypt || exit 0 ) > crypt.lib
rm -f trycrypt.o trycrypt
./load checkpassword prot.o unix.a byte.a `cat \
shadow.lib` `cat crypt.lib` `cat s.lib`
checkpassword.o(.text+0x102): In function `main':
: undefined reference to `errno'
checkpassword.o(.text+0x267): In function `main':
: undefined reference to `errno'
checkpassword.o(.text+0x291): In function `main':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0xf9): In function `pathexec_run':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0x13d): In function `pathexec_run':
: undefined reference to `errno'
unix.a(alloc.o)(.text+0x4c): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [checkpassword] Error 1
can anyone help what happen ? sorry for my poor english... This is what i can't understand if it's wrong i am waiting yours opionions..... thanks korbin
Originally posted by Donboy Ah! The old errno problem. You must be running Redhat/Fedora.
Here's what you do...
Open the file under checkpassword-0.90 (source directory) called error.h. In there, look for the line extern int errno; and change it to say #include <errno.h>.
Now compile it again.
Actually, I found a checkpassword patch somewhere that is supposed to fix it after compile. I ran that, and then I could perform the checkpassword test, and it did come back with the valid user's home directory. However, trying to connect to POP3 from another computer using Outlook, results in that same valid user's username and password still not accepted. When I cancel out of the dialogue, the error indicates that it could not find the home directory for that valid user. I'll check on what you posted.
On a broader Qmail subject, I'm new to Linux, and just installed Suse Linux 9.1 a few weeks ago. When I started installing Qmail, there seemed to be no compiler. So I went into YAST and installed C and C++, and then came back to the Qmail instructions (on lifewithqmail). I did not notice any problem until I got all the way down to the checkpassword compile. I could have missed something though.
My question is this - I did NOT install the 'netqmail' version (link on the lifewithqmail site). Isn't that supposed to have the fixes for some of these problems? If I started all over again, but installed the netqmail version this time, would I be better off? Can I do a complete Qmail re-install at all? What would I need to do prior to the re-install?
One last thing. Do you kow why all the mail in Qmail seems to be in the mail queue, and is never moved to the actual user mailboxes??
Yeah, the patch you described simply does what I said. So using the patch in this case doesn't do anything fancy... it's just a way to ensure that the changes you need to make don't require you to know anything about the code.
You can go here and read about the changes made in Netqmail. http://www.qmail.org/netqmail/ To me, this is the logical next progression to the qmail package. Netqmail has a bunch of patches alraedy applied and will take care of common problems. The only reason Dave and the guys came up with Netqmail is because DJB isn't doing anymore development on qmail and Dave Sill and his crew on the mailing list believe that coming up with Netqmail will take care of a bunch of common problems they see a lot of on the mailing list.
I don't see any harm in using Netqmail. It's good. Dave has written LifeWithQmail and he authored The Qmail Handbook, so he definitely knows what he's doing.
You said that it couldn't find the user's home directory. That is probably talking about their Maildir/new Maildir/cur or Maildir/tmp. There is a program called maildirmake that you can use for creating maildir's for your users.
If mail isn't being moved from the queue to a local maildir, then it means your qmail is broken because of the reason you already mentioned.
If you do a reinstall, there is nothing special you need to do. Just delete the /var/qmail directory and start over. Of course the queue will be wiped out, so any messages that were delivered to your queue will be lost... hopefully that's not a problem.
I recommend using the howto in my signature. There are a lot more steps involved, but I personally find it better than anything else I've seen. If you do, you will not have all of these issues that are troubling you.
Yeah, I think you'll be pretty happy with the howto. I've used this a few times on a few different boxes and it's wonderful. Also be sure to scroll down to the very bottom and read the user comments. There may be some stuff in there that is important to whatever Linux distrib you're running. Like if you're running Redhat/Fedora, you need to pay careful attention to that stuff down there because I posted some feedback down there myself that explained the problems I had locating the correct libraries on RH, whcih are installed in non-standard places.
I been working on re-installing Qmail, using the "howto" link in your signature, for a few days now. I've had fewer problems then before, but there were a few "wget" commands that were "forbidden." I had to search for and download the files manually.
But what has got me stopped now is the Qmail-Scanner part of the installation. The instructions simple say that I have to install Perl-SUID first, but does not say how! I just spent 7 hours trying to find, download, and install Perl-SUID!! I keep ending up with a '.deb' file, which i can extract, but nothing after that works!
Yeah, I know its rather difficult. It was easy for me, because there are RPMs readily available for RH/Fedora for suidperl. If your machine can handle RPMs, you can probably try to search for an RPM of it that's compiled especially for your distro. I think you said earlier you're running Suse? Maybe there is a RPM you can install for suidperl that is for Suse.
Check out #4 which gives you some options for how to cope with the lack of suidperl. I strongly recommend reading this entire document. I found it to be very helpful and enlightening about how qmail-scanner works. However, I also found some of this to be written in very dense language and seemingly sketchy details about how to deploy some of these options. You may want to search the qmail-scanner mailing list archives and see if other people have had this problem before and how they solved it...
Well, currently I'm real depressed about all this. I just spent MANY hours in the last few days following all the instructions on the "howto" page, but I finally gave up. I made it down through section 9 (clamav). Section 10 is Qmail-Scanner, and the Perl-suid problem stopped me there.
I finished the scripts & directories section (11), including SMTP, OK (I think), and I think the QmailAdmin (12) install went ok as well. Section 13, the VQAdmin section went OK for a while, but I did not complete the Apache part very well, because it did not tell us how.
The Courier installation (section 14) didn't work at all, buy it still may have been installed from a previous Qmail installation I did. The IMAP Proxy (15) did not install correctly, and the Squirrelmail download step never completed. That was when I gave up - too tired to go on.
The depressing part is that I set Qmail to start at boot (I'm using WebMin), and then rebooted, but nothing has changed. The incoming mail to valid mailboxes are still not being moved to the user mailboxes, but kept in the general mail queue. Trying to connect from another PC on my home network (using Outlook) still does the same rhing for POP# incoming mail - it keeps asking me for username and password, and does not accept the valid users.
On a general Linux basis - what happens after I install something? Nothing new is added to the KDE Menu, and no new icons appear on the desktop. I know this is Windows talk, but how do you access the programs that you install? If I hadn't downloaded WebMin, Iwould not have been able to see anything about the configuration of products, but WebMin only has so many modules.
>> Section 13, the VQAdmin section went OK for a while, but I did not complete the Apache part very well, because it did not tell us how
Don't worry about this. It's not required to get the whole thing running. This is just an add-on package that will help you later once everything is running good. Like I said... it's not required and you can get by without it for now, but remember to come back later and finish it off once everything else is working.
>> The Courier installation (section 14) didn't work at all, buy it still may have been installed from a previous Qmail installation I did
This is another one you can probably do without for the time being. If you plan to use IMAP to connect with your server, then you'll need to get this worked out before your testing, but if you expect your users will just be doing business with POP3/SMTP for the time being, then you can deal with this one later too.
I also had problems with imap proxy and I still haven't got this one working myself. At some point I'll fiddle with it and try to give you any updates if I figure out what to do.
I'm not using Squirrelmail... I actually decided to use something called uebimiau which you can get at uebimiau.org. This is a slightly outdated package, and I plan to replace it later with another webmail client. But again... this is one of those optional packages. You can probaly live without webmail if you just want to get this finished. It really depends on whether you want webmail available to your users right away or if you can put it off for a later time.
>> I'm using WebMin
Ueeeeew! I'll pretend I didn't hear that. LOL! Seriously... I don't believe Webmin to be that cool. Yes, it has some niceties, but I think you'll find (eventually) that it's a bit clunky on some things and it sometimes kept me up late at night because of the security implications. Just be sure you don't expose Webmin to the outside world.
>> The incoming mail to valid mailboxes are still not being moved to the user mailboxes, but kept in the general mail queue.
Well, realize that under the new installation you're doing, vpopmail will handle all the domains. So the install you're doing will eventually have email coming into the queue and then being moved to one of the vpopmail domains found under /home/vpopmail/domains. So with this in mind, you may want to reserve judgment until you see that actually working.
I'm also a little concerned... it sounds like you still have some "artifacts" left over from your previous install. I'm worried that these things may be causing you some grief. You may want to consider wiping out everything you can of the old installation and installing everything completely from scratch using this howto. I realize this may be cause for some depression because it sounds like you've been working really hard on this and I'm sure the idea of wiping the slate clean again isn't very appealing. My only concern is that maybe you have some stuff left over from the previous qmail install that may be wrong.
If you just skimmed over the qmail section (knowing that you had qmail already installed) you may have overlooked something about the users and groups section. The users and groups it uses are used again later in subsequent steps, so you must be sure those are correct... either that, or wipe everything out and start again doing everything exactly as the howto states so that you don't miss any critical steps.
>> how do you access the programs that you install
Well, the beauty is... you don't need to. I must admit that I'm not a GUI man, myself. I do everything on the command line. I don't even use the graphical part and in fact, I removed the whole GUI interface, as it was just making my full system backups take longer because I was backing up GUI files that I wasn't using anyhow.
I don't know how Suse works (I think you said that's what you're using) but check and see if you have the chkconfig command. Just type that in at the prompt and see if you have it. If you do, it's easy to see what you've got running. Just do chkconfig --list | grep on and you'll see everything that is starting up when you boot the machine. Let me know if you see this command and I'll be glad to elaborate on its use.
Another way to see what the system runs when it boots up is to look under /etc/rc.d/init.d or maybe just search for the init.d folder on your machine. This folder contains a bunch of scripts and these indicate what programs are available on your system. You must have the qmailctl script located (or symlinked) here.
Another way is to type in "ntsysv" at the prompt and it should also show what programs are available and will have checkboxes next to each one. checking the box will cause the program to be started up when the system boots.
The chkconfig --list | grep on command does work for me, but I'm not sure what it is showing me. When I go into WebMin and look at running processes, it still shows some pop3d stuff - which should have been gone.
Ok, we need to kill qmail completely, I think. Try running...
svc -d /service/qmail-*
Now go to /etc/inittab and scroll down to the very bottom. Comment out the line that says SV:123456:respawn:/command/svscanboot (or similar) by putting a # at the front of the line. Now at the prompt, do...
Or if that doesn't work...
kill -HUP 1
This should have qmail completely stopped. Check and see if it's running using ps -ef and also running qmailctl stat, or /etc/init.d/qmail stat
As far as chkconfig, here's how that works. When you run the command I mentioned, there are several columns. The first column should be the name of the program. The rest of the columns you'll notice all start with the same number, like 0, 1, 2, 3, all the way up to 6.
The numbers represent what runlevel you're using. Basically if you just focus on 2, 3, 4, and 5, that should be enough. The others (0, 1, and 6) are for "reboot" and "shutdown" (and I can't remember the last one) so they should always be set for "off".
Obviously If the item is "on" it means the program will be started on bootup. If it's "off" it won't be started at bootup.
Now, let's change one of them. I've got "clamd" that I want to be sure is starting at bootup. To do that, just type...
chkconfig --level 2345 clamd on
which sets clamd to start when the machine boots at runlevels 2345. Instead of "on" you can use "off" instead and this turns the service off. You'll be fine to just make all of your stuff run at levels 2345.
Now you probalby need to get your qmail script in there. If you completed through step #12 then you probably already have this script where it belongs. If you had trouble, finding the right place for it, just do a "locate init.d" at the prompt and you'll probably be able to figure out where it goes.
Try running this at the prompt...
chkconfig --level 2345 qmail on
or if that fails try...
chkconfig --add qmail
If neither of those worked, you'll need to edit your startup file just a little.
Edit /etc/init.d/qmail and change the top lines of your file to look like this...
# chkconfig: 2345 80 30 # description: the qmail MTA
Notice I added those 2 commented lines in bold. The thing is, sometimes chkconfig is a little picky and it wants to have the runlevel stuff in comments at the top of the script. Notice it looks similar to the chkconfig commands I used earlier. The 80 and 30 means that qmail will be the 80th program to startup and the 30th program to shutdown. You can use the same numbers as other programs, so if you notice another program later in the future that wants to use 80 or 30, it doesn't matter and will not conflict with anything.
With those 2 lines added to your script, also do a chmod 755 /etc/init.d/qmail (or wherever it happens to be)
Now try the commands again to turn qmail on. Then do a chkconfig --list | grep on to see if qmail is starting at bootup.
Thanks - I'm working on this. The /service stuff did not work: It says it is unable to control /service because the filename does not exist. I notice that a lot of commands I type in at the prompt do not seem to work, but they do if I use the start menu "run command" box and include the path to the file.
qmail stat only works if I run it in the menu run command box (there are still several qmail processes running.