Hello,
 
why you use this sql include syntax, 
if you don't understand the datastructure? 
You should use web-cyradm.
 
For adding a Mailbox, you must do somethink like this: 
Look in conf.php from web-cyradm and in imapd.conf. 

If you have unixhierarchysep: yes in imapd.conf and
DOMAINASPREFIX in config.php from web-cyradm you must name 
your mailboxes like test.test.org, and if you have disabled it, 
there looks like this: testde0001.
 
Check the values and rename the mailboxes in your sql_import_file!
 
I think it must looks like this:
 
1. add a domain with a default prefix (should be test0001 if
USEDOMAINASPREFIX==0)
>From now postfix will accept mails for this domain.
 
2. add the useraccount so that he can authenticate against accountusers.
Here works your script.
>From now on the user cann auth against pam_mysql with imap/sieve/smtp and
pop

3.To relay and become Mails add a virtual db entry.
 
in virtual you have: alias, dest, username and status flag.
Your import_file must look like this:
 
[EMAIL PROTECTED]:test.test.org:test.test.org:1        i use
unixherarchiesep:yes and DOMAINASPREFIX==1!

And for catchall use this:

@test.org:test.test.org:test.test.org:1

Now all should work for you.
 
Greets 
  Marcel


________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
        Sent: Wednesday, August 03, 2005 8:35 AM
        To: [email protected]
        Subject: RE: [Web-cyradm] creating new users directly in mysql
        
        
        Hello,
         
        O.K.
         
        I've created new table virtual_add.txt:
        [EMAIL PROTECTED]:sleshem:sleshem:1
        [EMAIL PROTECTED]:aklemer:aklemer:1
         
        Added this info to virtual table:
          mysql> LOAD DATA LOCAL INFILE
'/srv/www/import_users/virtual_add.txt'
          INTO TABLE virtual
          FIELDS TERMINATED BY ':' 
          LINES TERMINATED BY '\n';
         
        And now I can see all info including 'Email address' of these new
users on web-cyradm interface.
         
        Now when I send e-mails to these new accounts I've created I got
'Recipient address rejected: User unknown in local recipient table' message
(see below):
         
        Aug  3 08:57:06 mail2 postfix/smtpd[6567]: NOQUEUE: reject: RCPT
from localhost[127.0.0.1]: 550 <[EMAIL PROTECTED]>: Recipient
address rejected: User unknown in local recipient table;
from=<[EMAIL PROTECTED]> to=<[EMAIL PROTECTED]> proto=ESMTP
helo=<localhost>
        Aug  3 08:57:06 mail2 postfix/smtpd[6567]: disconnect from
localhost[127.0.0.1]
        Aug  3 08:57:06 mail2 amavis[5711]: (05711-03) mail_via_smtp: 550
5.1.0 <[EMAIL PROTECTED]>: Recipient address rejected: User
unknown in local recipient table
        Aug  3 08:57:06 mail2 amavis[5711]: (05711-03) Not-Delivered,
<[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]>, Message-ID:
<[EMAIL PROTECTED]>, Hits: 1.787
         
         
        What's wrong? How to fix it?
         
        Best regards,
        Leon

        
        
________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marcel Hartmann
        Sent: Tuesday, August 02, 2005 8:15 PM
        To: [email protected]
        Subject: RE: [Web-cyradm] creating new users directly in mysql
        
        
        Hello,
         
        have you tested a normal web-cyradm? On the same DB?
         
        If you create a User you must have a Entry in:
         
        1. accountuser    -> pam auths pop|imap|smtp|sieve
        2. virtual            ->  postfix virtual domains, canonical maps
and mydestination
         
        Greets Marcel


________________________________

                From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
                Sent: Tuesday, August 02, 2005 4:06 PM
                To: [email protected]
                Subject: [Web-cyradm] creating new users directly in mysql
                
                
                Hello all,
                I have a list of users I have to insert into web-cyradm user
list.
                 
                I've created Cyrus accounts using modified Enrique script
(attached), I've modified it a little so it suits short usernames I use
(leon instead of leon.ns.edu.XX) and ACL issues. That's working fine and
users have been created and I can see them using "lm" command.
                 
                Now I had to insert these users into mysql:
                 
                I've created userssql_add.txt file, which looks like this:
        
sleshem:dV2HgJefAbFqI:edu.haifa.ac.il:edu.haifa.ac.il:Shosh:Leshem
        
aklemer:tguxshr/unccc:edu.haifa.ac.il:edu.haifa.ac.il:Anat:Klemer
                 
                And this is for mysql import:
                # mysql --local-infile=1 -u root -p
                mysql> USE mail;
                mysql> LOAD DATA LOCAL INFILE
'/srv/www/import_users/userssql_add.txt'
                  INTO TABLE accountuser
                  FIELDS TERMINATED BY ':' 
                  LINES TERMINATED BY '\n';
                Query OK, 2 rows affected (0.00 sec)
                Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
                
                 
                These 2 users are added to accountuser table.
                 
                I can connect and authenticate without any problem with
these user credentials
                 
                The problem is in web interface:
                I can see these users in the list of the accounts but 'Email
address', 'Name', 'Shurename' columns are empty for these 2 users :)
                When I go to 'Edit Account' for these users I got no info on
these users, and If I go to 'Edit Account' for other users I get 'Anat
Klemer' (these are Name and Surename of the second user I've inserted) in
Name and Surename for all of the old accounts.
                 
                Am I doing something wrong with MySQL import (may be there
is additional tables like 'virtual' I should populate or some index problem)
or is it because of the fact that I'm using Marcels' version for with
'Name', 'Shurename' ?
                 
                 
                Any ideas?
                 
                Best Regards,
                Leon
                
                
                                 
                 
                 
                 
                 
                 
                 
                 
                 
                 

                

_______________________________________________
This mailing list is hosted and supported
by bit-heads GmbH | http://www.bit-heads.ch

_______________________________________________
Web-cyradm mailing list
[email protected]
http://www.web-cyradm.org/mailman/listinfo/web-cyradm

Reply via email to