Re: qmail-newu
+ "Jacob (Mettavihari)" <[EMAIL PROTECTED]>: | >>[root@dhamma bin]# ./qmail-newu | >>qmail-newu: fatal: bad format in users/assign | | the line in /var/qmail/users/assign is a cut and paste | from the serial mail instalation file. | | +autoturn-:qmaild:501:500:/var/qmail/autoturn:-:: *the* line? Try add a final line containing a lone period. (I set Reply-To, since this is not a serialmail issue.) - Harald
Re: qmail-newu
On 19:37:13 - 27/04/01, Peter Farmer wrote: Ignore me, just had my question answered by Markus Stumpf in the thread "Is there something like a BADMAILTO directive???HELP..." Soz Peter > Hi all, > > I'm trying to get /var/qmail/users/assign to compile with qmail-newu but get the >following error: > > [shells] qmail # qmail-newu > qmail-newu: fatal: bad format in users/assign > > > As per the qmail-users man page: > > The file /var/qmail/users/assign assigns addresses to users. For example, > > =joe.shmoe:joe:503:78:/home/joe::: > > so my users/assign looks like this > > =peter.farmer:pfarmer:1001:100:/usr/local/pfarmer::: > > Am I doing something wrong? > > > TIA > > -- > Peter Farmer <[EMAIL PROTECTED]> > > Senior Systems Engineer > blueyonder - http://www.blueyonder.co.uk/
Re: qmail-newu
Peter Farmer <[EMAIL PROTECTED]> writes: > Am I doing something wrong? Did you possibly delete the final line (the one containing only a dot)? Frank
Re: qmail-newu via Perl script?
+ "Peter Janett" <[EMAIL PROTECTED]>: | Has anyone been able to execute the qmail-newu command via a Perl | script? I haven't tried, but can think of no reason why it should be impossible or even difficult: It's just another program to be run, which you can do using system("/var/qmail/bin/qmail-newu");. Maybe if you told us what you were doing, what you expected, and what happened? | Is there another way to accomplish what qmail-new does without | executing the command? Not without writing your own qmail-newu replacement, which seems rather pointless to me. In my own setup, BTW, I have a perl script generating users/assign and a Makefile organizing the running of this perl script and qmail-newuser. - Harald
Re: qmail-newu via Perl script?
Thanks for the reply. I tried exactly what you suggested: system("/var/qmail/bin/qmail-newu"); But this fails, appearing to be a permission problem. If I telnet in as the user that the script runs as, I get "Permission denied". So, I changed permissions, and then get: "qmail-newu: fatal: unable to open users/cdb.tmp" It looks like qmail-newu creates a cdb.tmp file, then copies it to the cdb file. Even if I change the permissions to allow the command to be executed by the user the script runs as, it fails to move (copy) the cdb.tmp file to the cdb file. Since this is for web based email, I need to do a "qmail=newu" each time someone signs up (each time the Perl script is run.) For this reason, setting up a shell script to run at certain intervals doesn't seem to be the correct solution. I'd like to see how you are running the command with your Perl script, or hear other suggestions Thanks, Peter Janett http://www.healthwell.com -Original Message- From: Harald Hanche-Olsen <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Tuesday, May 18, 1999 5:10 AM Subject: Re: qmail-newu via Perl script? > > > > >+ "Peter Janett" <[EMAIL PROTECTED]>: > >| Has anyone been able to execute the qmail-newu command via a Perl >| script? > >I haven't tried, but can think of no reason why it should be >impossible or even difficult: It's just another program to be run, >which you can do using system("/var/qmail/bin/qmail-newu");. Maybe if >you told us what you were doing, what you expected, and what happened? > >| Is there another way to accomplish what qmail-new does without >| executing the command? > >Not without writing your own qmail-newu replacement, which seems >rather pointless to me. In my own setup, BTW, I have a perl script >generating users/assign and a Makefile organizing the running of this >perl script and qmail-newuser. > >- Harald > > >
Re: qmail-newu via Perl script?
On Tue, 18 May 1999, Peter Janett wrote: > Thanks for the reply. I tried exactly what you suggested: > system("/var/qmail/bin/qmail-newu"); > > But this fails, appearing to be a permission problem. If I telnet in as the > user that the script runs as, I get "Permission denied". So, I changed > permissions, and then get: > "qmail-newu: fatal: unable to open users/cdb.tmp" > > Since this is for web based email, I need to do a "qmail=newu" each time > someone signs up (each time the Perl script is run.) For this reason, > setting up a shell script to run at certain intervals doesn't seem to be the > correct solution. I'd like to see how you are running the command with your > Perl script, or hear other suggestions I get the feeling that you need to run the perl script as root (or whomever else has permissions to those files/directories) Everything you've mentioned seems to be permissions problems. You might be able to get away with one of the qmail* uids, but you might end up having to run the script as root. That being said, I've never mucked around with scripting it. .Shawn
Re: qmail-newu via Perl script?
+ "Peter Janett" <[EMAIL PROTECTED]>: | It looks like qmail-newu creates a cdb.tmp file, then copies it to | the cdb file. No, it renames it. The reason is that the update has to be atomic, since there is a live mail system using the database. | Even if I change the permissions to allow the command to be executed | by the user the script runs as, it fails to move (copy) the cdb.tmp | file to the cdb file. Indeed, qmail-newu must have write privileges on the /var/qmail/user directory. + Asmodeus <[EMAIL PROTECTED]>: | I get the feeling that you need to run the perl script as root (or | whomever else has permissions to those files/directories) Everything | you've mentioned seems to be permissions problems. You might be | able to get away with one of the qmail* uids, but you might end up | having to run the script as root. Certainly, if you allow any uid other than root to muck around with the users directory, you have opened up a large potential security hole. To allow your web server to do this is bold and daring indeed. Some suid-ness and *very* careful and security-conscious programming is probably called for. - Harald
Re: qmail-newu via Perl script?
On Tue, May 18, 1999 at 11:10:58AM -0600, Peter Janett wrote: While we're on the subject, qmail-newu does not check to see if 2 copies are running. I hope your perl script is doing some sort of serialization, to make sure you don't accidentally run 2 qmail-newu's together, and end up with a corrupt users.cdb. > Thanks for the reply. I tried exactly what you suggested: > system("/var/qmail/bin/qmail-newu"); > > But this fails, appearing to be a permission problem. If I telnet in as the > user that the script runs as, I get "Permission denied". So, I changed > permissions, and then get: > "qmail-newu: fatal: unable to open users/cdb.tmp" -- System Administrator See complete headers for address, homepage and phone numbers
Re: qmail-newu via Perl Script
On Sat, Apr 29, 2000 at 03:56:34PM -0500, Peter Janett wrote: > I need to execute qmail-newu via a Perl script web interface. When I try, I > get this error: > qmail-newu: fatal: unable to open users/cdb.tmp > > I have played with the permissions on qmail-newu, and tried adding user > nobody (the user Apache is running as) to the qmail group, but I can't get > it figured out. Your script needs write access to the users directory in order to create users/cdb.tmp. Your users directory permissions probably look like this: drwxr-xr-x 2 rootqmail 512 Mar 23 08:44 users which won't allow your script, running as nobody, to create the cdb.tmp file. Chris
Re: qmail-newu: fatal: bad format in users/assign
On Thu, Jun 21, 2001 at 06:15:48PM +0800, Lye On Siong Johnny wrote: > Can anyone help me on this?? Not without more information. Post users/assign if it's short or post an URL if not. You can also to use a trial-and-error method to find the problem. Regards, Uwe
Re: qmail-newu: fatal: bad format in users/assign
My assign file is as follow +issimple.com-:issimple.com:510:509:/home/vpopmail/domains/issimple.com:-:: +loveproposal.com-:loveproposal.com:510:509:/home/vpopmail/domains/loveproposal.com:-:: +numberstrike.com-:numberstrike.com:510:509:/home/vpopmail/domains/numberstrike.com:-:: +serangoonstat.com.sg-:serangoonstat.com.sg:510:509:/home/vpopmail/domains/serangoonstat.com.sg:-:: +peacetransalation.com-:peacetransalation.com:510:509:/home/vpopmail/domains/peacetransalation.com:-:: +proptee.com-:proptee.com:510:509:/home/vpopmail/domains/proptee.com:-:: +everfeed.com.sg-:everfeed.com.sg:510:509:/home/vpopmail/domains/everfeed.com.sg:-:: +fujicon.com.sg-:fujicon.com.sg:510:509:/home/vpopmail/domains/fujicon.com.sg:-:: . At 10:31 AM 6/21/2001 +, Uwe Ohse wrote: >On Thu, Jun 21, 2001 at 06:15:48PM +0800, Lye On Siong Johnny wrote: > > > Can anyone help me on this?? > >Not without more information. > >Post users/assign if it's short or post an URL if not. > >You can also to use a trial-and-error method to find the problem. > >Regards, Uwe
Re: qmail-newu: fatal: bad format in users/assign
On Thu, Jun 21, 2001 at 08:18:14PM +0800, Lye On Siong Johnny wrote: > My assign file is as follow [...] works for me. Did you copy&paste it into eudora? Then it's quite likely that there's a space at the end of some line in the assign file. Regards, Uwe
Re: qmail-newu: fatal: bad format in users/assign
# into /var/qmail/control/assign. (in my case, 202 = qmaild UID, 201 = #nofiles GID) # #Then I run qmail-newu and it says "qmail-newu: fatal: bad format in #users/assign". Make sure your last line in users/assign file ends with a line with only a dot like this: . # #I had read the qmail-users, qmail-newu manual page carefully. So, I don't #know why it doesn't work. # #Please tell me what's wrong in my configuration. Thank you very much. # #Best regards, # #Dong # # #Nguyen Dang Phuoc Dong #Phuong Nam Net. - System Administrator. # # Goh Sek Chye SingNet Network Operations Centre --- PGP Public Key: finger [EMAIL PROTECTED] Key fingerprint = 55 9E FF EA 4D A7 33 25 03 00 3E BF A2 F3 AF 6A ---
Re: qmail-newu: fatal: bad format in users/assign
Hello, +AD4-Make sure your last line in users/assign file ends with a line with only a +AD4-dot like this: +AD4-. +AD4- Exactly+ACE- Thank you very much. It's not qmail problem. I didn't read the qmail-users manual page carefully. I'm terribly sorry, :-) Best regards, Dong Nguyen Dang Phuoc Dong Phuong Nam Net. - System Administrator.
Re: qmail-newu: fatal: bad format in users/assign
On Thu, 5 Aug 1999, Nguyen Dang Phuoc Dong wrote: [snip] > Then I run qmail-newu and it says "qmail-newu: fatal: bad format in > users/assign". This is almost certainly the missing '.' line required at the end. I prefer to create the users/assign file automatically, using qmail-pw2u. You can put your extra records for users/assign in users/append and never have to worry about the dot line. > I had read the qmail-users, qmail-newu manual page carefully. So, I don't > know why it doesn't work. > > Please tell me what's wrong in my configuration. Thank you very much. > > Best regards, > > Dong > > > Nguyen Dang Phuoc Dong > Phuong Nam Net. - System Administrator. > > > -- "Life is much too important to be taken seriously." Thomas Erskine<[EMAIL PROTECTED]>(613) 998-2836