Re: Re: SAFECAT ERROR
Dear, The Perl "delivery" program is only used to call safecat program, nothing else. Because this I think the safecat is failing sometimes. The variables $login and $domain I get through the enviroment variables $ENV{'RECIPIENT'} and after I split the address in two parts. I use these variables when I run safecat program with the following sintaxe: system("/usr/local/bin/safecat /home/$domain/$login/Maildir/tmp /home/$domain/$login/Maildir/new"); I verified how this variables get and if they are being splited correctly. They always are getting and splited correctly. Safecat program is the only one thing that probably is failing, due to Perl program does nothing else. Regards, Cleiton
SAFECAT ERROR
Hi all, I've had some problems lately with safecat program. Sometimes some users of my qmail server ask me why your messages aren't getting in them directories. They send messages to themselves and sometimes this messages aren't delivered in the directory. I have an alias .qmail-default with the following expression "|/bin/delivery". This "delivery" program is a perl program. There are a procedure like this into this program: system("/usr/local/bin/safecat /home/$domain/$login/Maildir/tmp /home/$domain/$login/Maildir/new"); I checked the variables $domain and $login and they are right, but sometimes happen some error that I can't see and the message isn't delivered. Can someone help me about it? Best regards, Cleiton
Safecat error
Hi all, I've had some problems lately with safecat program. Sometimes some users of my qmail server ask me why your messages aren't getting in them directories. They send messages to themselves and sometimes this messages aren't delivered in the directory. I have an alias .qmail-default with the following expression "|/bin/delivery". This "delivery" program is a perl program. There are a procedure like this into this program: system("/usr/local/bin/safecat /home/$domain/$login/Maildir/tmp /home/$domain/$login/Maildir/new"); I checked the variables $domain and $login and they are right, but sometimes happen some error that I can't see and the message isn't delivered. Can someone help me about it? Best regards, Cleiton
Safecat error
Hi all, I've had some problems lately with safecat program. Sometimes some users of my qmail server ask me why your messages aren't getting in them directories. They send messages to themselves and sometimes this messages aren't delivered in the directory. I have an alias .qmail-default with the following expression "|/bin/delivery". This "delivery" program is a perl program. There are a procedure like this into this program: system("/usr/local/bin/safecat /home/$domain/$login/Maildir/tmp /home/$domain/$login/Maildir/new"); I checked the variables $domain and $login and they are right, but sometimes happen some error that I can't see and the message isn't delivered. Can someone help me about it? Best regards, Cleiton
Perl doubts
Hi all, I know this mailing list is about qmail, but I have some doubts about perl pogram as checkpassword. I use this perl program "checkpassword", because I use Postgres Database to authenticate my users. There are somethings into this perl program that I am not able to figure out. First: I start POP3 through inetd using the following line into the inted.conf file: pop3 stream tcp nowait root /var/qmail/bin/qmail-popup qmail-popup mydomain.com /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir I know that qmail-popup is a responsible program to get username and password from the network and after it gets it runs a sub-program (checkpassword) to check username and password and set the environment variables. I have three questions about it: How does qmail-popup get the username and password from the network? How does qmail-popup send to sub-program (checkpassword) the informations about username and password? More specifically what is the format of the data sent to this sub-program (checkpassword)? I have the checkpassword program done, but I would like you to help me about understanding what the program does. If someone could help about my checkpassword program I would thank. This is my checkpassword program: The most important line that I'd like to figure out is about how it gets from the qmail-popup the informations about username and password, how it gets to split this information and what means the lines started with $ENV. If it gets from the standart input, where is it? In the expression "<&=3"? If the lines $ENV are to set up the environment variables why must it do this? What Do the procedures in bold do? About the connection with database I don't have any problem. #!/usr/bin/perl # use Pg; my $TABLE = 'emails'; $conn = PQsetdb('','','','','ab'); %ENV = () ; my( $len, $buf, ) ; open( USER, "<&=3" ) or exit( -3 ) ; $len = read( USER, $buf, 512 ) ; close USER ; exit(-3) if $len < 4 ; # extract null-terminated user/pass pair from buf my( $user, $pass ) = split /\x00/, $buf ; $user = lc $user ; $buf = "\x00" x $len ; # Verifying the username and password $domain = 'ab.com.br'; $result = PQexec($conn,"SELECT * from $TABLE where email= '$user' AND password = '$pass';"); if (PQntuples($result) > 0) { if (-e "/home/$domain/$user") { } else { system("mkdir /home/$domain/\"$user\""); system ("/var/qmail/bin/maildirmake /home/$domain/\"$user\"/Maildir"); system (" echo ./Maildir/ > /home/$domain/\"$user\"/.qmail"); system (" touch /home/$domain/$user/.timestamp"); system("/usr/sbin/chown -R alias.qnofiles /home/$domain/\"$user\""); system("/usr/sbin/chown -R alias.qnofiles /home/$domain/\"$user\"/*"); system (" touch /home/$domain/$user/.timestamp"); } } $ENV{'USER'} = $user; $ENV{'UID'} = "alias"; #$ary[0][3]; $ENV{'GID'} = "qnofiles"; #$ary[0][4]; $ENV{'HOME'} = "/home/$domain/$ENV{'USER'}"; $ENV{'SHELL'} = "/bin/date"; exit(-4) unless $ENV{UID} ; $ENV{HOME} =~ m!((?:/\w[-_.\w]+)+)! ; $ENV{HOME} = $1 ; chdir $ENV{HOME} ; $> = $ENV{UID} ; $) = $ENV{GID} ; exec @ARGV; exit(0); exit( -4 ); Thanks in advance! Cleiton
Information
Hi all, I have some doubts about the qmail system. I've read the FAQ's and "Life with qmail" and others documentations, but I didn't get to figure out somethings. I'm a begginner in this subject and I count on you to help me. I installed the qmail package in a freeBSD box, but initially it doesn't working. So, I'd like to know if qmail system always needs additional programs to authenticate users and delivery messages like a checkpassword and safecat programs. Are there others programs to do them? I would like to figure out how checkpassword and safecat work. My doubts are! How does checkpassword catch the messages from the maildir mailbox and delivery to the message to qmail-pop3 or the client? How does safecat put in the messages into the maildir mailbox? I know that safecat catchs the messages from the standard input and write into the maildir mailbox, but how are this messages put in the std input and how does safecat catch them? Regards Cleiton.
Postgres
Hi all, Does anyone know how I can set up qmail with postgres database? Regards Cleiton
Information
Hi all, I just started using qmail 1.03 a week ago too, I have had some problems with it, and I've not found in the FAQ the solutions for these problems. Qmail is using postgres to authenticate the users. The authentications is working well. I used checkpassword daemon to connect in the database and authenticate the users. My problems are with SMTP. I installed the "qmail-1_03.tgz" package in a FreeBSD 3.4 Box. When I send a message for a local user, this message doesn't get in the mailbox. And the qmail-send answer me that the mailbox doesn't exist, but the mailbox exist, and it is with the right permissions. I use qmail with maildir option. The domain is in the locals, me and rcpthosts files. I've started pop3 and smtp in the inetd.conf file with the follow lines: pop3 stream tcp nowait root /var/qmail/bin/qmail-popup qmail-popup ab.com.br /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd I use the shell script in the /usr/local/etc/rc.d/qmaild.sh with the follow lines: #!/bin/sh # Using splogger to send the log through syslog. # Using qmail-local to deliver messages to ~/Mailbox by default. exec env - PATH="/var/qmail/bin:$PATH" \ qmail-start ./Maildir splogger qmail & Another thing is when I send a message from the local network to other domains, it answers me that these domains aren't in the rcpthosts files, but it's is very strange!!! Can you imagine if I put in the rcpthosts files whole the domains that exist in the Internet networking? I understood that the rcpthosts file is to avoid spam from the other networks, and not to filter the destination addresses. If you could help me about it I would thank. Regards Cleiton.