Re: Problems converting Sqmail .abook flatfiles into MySQL tables.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 29, 2008 at 4:03 PM, Paul Lesniewski <paul@xxxxxxxxxxxxxxxx> wrote:
> Please don't top post.  Read the mailing list posting guidelines before posting.
>
>>>>  I was hoping someone can help with converting the .abook flatfiles into
>>>> mysql records. We were able to generate a sql script that should allow us
>>>> to
>>>> import all the .abooks by using the flat2sql.pl file that was supplied
>>>> from
>>>> http://www.squirrelmail.org/docs/admin/admin-5.html#db-backend, but as you
>>>> can see below the INSERT command attempts to add multiple enteries in the
>>>> same sqmail.address table. This of course generates a sql error.  The
>>>> error
>>>> references duplicate entry's for this one record.
>>>>
>>>> As you guess this user has more than one address in their .abook record.
>>>
>>> PRIMARY KEY (owner,nickname) is going to give you trouble if all your
>>> nicknames are ''
>>>
>>> Maybe change it to PRIMARY KEY (owner,email) ?
>>
>> Actually the problem seems to be with multiple entries with the same owner
>> name
>
> Then show the contents of the original .abook file
>
>>> INSERT INTO sqmail.address (owner,nickname,firstname,lastname,email,label)
>>> VALUES ('jcmerchant','','','Real Name','email.name@company','');

Just to close this thread, this problem is the result of an invalid
address book.  That may have been caused by a bug in an earlier
version of SM.  Recent versions always have a non-empty nickname that
should always be unique.

>>> INSERT INTO sqmail.address (owner,nickname,firstname,lastname,email,label)
>>> VALUES ('jcmerchant','','','Real Name','email.name@company','');
>>>
>>> INSERT INTO sqmail.address (owner,nickname,firstname,lastname,email,label)
>>> VALUES ('jcmerchant','','','Hoksbergen','edsylvia@xxxxxxxxxxxxxxx','');
>>>
>>> INSERT INTO sqmail.address (owner,nickname,firstname,lastname,email,label)
>>> VALUES ('jcmerchant','','','Nancy King','njking@xxxxxxxxxxx','');
>>>
>>> INSERT INTO sqmail.address (owner,nickname,firstname,lastname,email,label)
>>> VALUES ('jcmerchant','','','Krish & Bob
>>> Fennessy','nana1950@xxxxxxxxxxx','');
>>>
>>> INSERT INTO sqmail.address (owner,nickname,firstname,lastname,email,label)
>>> VALUES ('jcmerchant','','','Rita Glasscock','plcrc@xxxxxxx','');
>

------------------------------------------------------------------------------
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux