Thanks for your help :)

I've found the problem.
The documentation of the postfix says that 
----------------------------------------------
# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf.  The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for    
# non-UNIX accounts with "User unknown in local recipient table".
#
#mailbox_transport = lmtp:unix:/file/name

mailbox_transport = cyrus
---------------------------------------------

I've changed the transport data configuring amavisd-new in a slightly different 
manner than reccommended in Lucs HOWTO, 
So it was a local_recipient_maps thing.

Now its fixed.


Regards,
Leon

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 10:59 AM
To: [email protected]
Subject: RE: [Web-cyradm] creating new users directly in mysql

Hello,

I also use unixherarchiesep:yes and DOMAINASPREFIX==1

I'm using short names instead of long usernames like Michael Muenz suggested.
Edited newaccount.php like this:
if ($DOMAIN_AS_PREFIX){
                                $prefix         = $domain;
                                $username       = $email;
                                if ($freenames!="YES") {
                                    // $username = $username . "." . $domain;
                                      $username = $username;

And vuala, I can use leon instead leon.edu.XXX as username!

I have added entries in accountuser and virtual table exactly the same way as 
for existing users (existent working accounts I've added the usual way via 
web-cyradm interface).

I'm doing it this way because I want to enter a massive amount of users from 
another server to web-cyradm installation.

May be I should use another syntax, adding these new users to MySQL?

Best Regards,
Leon

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcel Hartmann
Sent: Wednesday, August 03, 2005 10:34 AM
To: [email protected]
Subject: RE: [Web-cyradm] creating new users directly in mysql

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
_______________________________________________
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
_______________________________________________
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