LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   squirrel mail address book (https://www.linuxquestions.org/questions/linux-server-73/squirrel-mail-address-book-755394/)

kishorerhce508 09-15-2009 12:22 PM

squirrel mail address book
 
HI to all this is Kishore, I am using RHEL 5.1 and sendmail 8...., squirrel mail 1.4.8-4.el5.

I want to import address from gmail, yahoo.....

but the squirrel mail address book had 5 fields

1. NICK NAME, 2. E-MAIL ADDRESS, 3.FIRST NAME, 4. LAST NAME,

5. ADDITIONAL INFO.

now I don't want all this stuff I only want one entry E-mail address

how to modify this, I don't want the other 4 fields.

What and how I must implement this..

can any one help me.


Thanks and regards

kishore kumar.

prasanta 09-16-2009 01:32 PM

The address book format should remain the same else squirrel mail will not read it and will pop up an error.I hope you have access to the your user's data directory. There will be a file by the name of username.abook. Just create entries in this format,

|kishore@mail.com||||

Regards,

--
Prasanta

kishorerhce508 09-16-2009 02:59 PM

Quote:

Originally Posted by prasanta (Post 3685573)
The address book format should remain the same else squirrel mail will not read it and will pop up an error.I hope you have access to the your user's data directory. There will be a file by the name of username.abook. Just create entries in this format,

|kishore@mail.com||||

Regards,

--
Prasanta

Hi Prasanta thanks for your fast response and I am creating entries as

|||kishore@mail.com|

is there any command to mix two files where file1 will be

|||
|||
|||

and file2 will be
kishore@gmail.com
kishore@yahoo.com
kishore@in.com

and finally the out put must be

|||kishore@gmail.com
|||kishore@yahoo.com
|||kishore@in.com

so I will be waiting for your reply...........

prasanta 09-16-2009 11:43 PM

Did you check whether the above structure is working or not with your squirrel mail. Please create an address book entry from the webmail and check the structure. I am not sure how to merge both the files with identical columns. In my case I would have just replaced the `file2` with those blank spaces.

In file2,

kishore@gmail.com
kishore@yahoo.com
kishore@in.com

Just use any editor and replace `\n` with `||||\n|`

Regards,

--
Prasanta

kishorerhce508 09-17-2009 04:19 PM

Quote:

Originally Posted by prasanta (Post 3686354)
Did you check whether the above structure is working or not with your squirrel mail. Please create an address book entry from the webmail and check the structure. I am not sure how to merge both the files with identical columns. In my case I would have just replaced the `file2` with those blank spaces.

In file2,

kishore@gmail.com
kishore@yahoo.com
kishore@in.com

Just use any editor and replace `\n` with `||||\n|`

Regards,

--
Prasanta

Thanks for your suggestions. Finally i fixed my issue with

awk command..............

kishorerhce508 09-17-2009 04:22 PM

Quote:

Originally Posted by kishorerhce508 (Post 3687628)
Thanks for your suggestions. Finally i fixed my issue with

awk command..............


awk '{print "| | |",$1}' /var/lib/squirrelmail/prefs/filename this will

show you the out put and

awk '{print "| | |",$1}' /var/lib/squirrelmail/prefs/filename > newfile

this will mix the file with | | | and i got my issue fixed ....

prasanta 09-17-2009 11:30 PM

That's great. Please mark the thread as solved.

Regards,

--
Prasanta


All times are GMT -5. The time now is 09:37 AM.