# squirrelmail/postfix issue



## artcurmudgeon (Jan 14, 2010)

Luckily its not broken....

I work as a sysadmin for a school district and all of our backbone services(web/mail/dns/mysql/moodlw) are all run on freebsd.

Here is my problem, we just got a new superintendent and she would like all the email addresses in the district in her addressbook. I need to find a way to export this from postfix as a csv file so I can reimport it into squirrelmail. I have looked at postfixadmin and while it shows email address and unsername it doesnt have a function for an export. I also tried to get a member list from mailman but even after editing the file I still get errors...

Any Thoughts?

thanks


----------



## dennylin93 (Jan 14, 2010)

What backend are you using for the accounts?


----------



## artcurmudgeon (Jan 14, 2010)

this server was set up with mysql/postfix/procmail/imap/squirrelmail..


----------



## Ruler2112 (Jan 14, 2010)

I don't know if it'll give you the format that you're looking for, but webmin has a feature to export user information.


----------



## crsd (Jan 14, 2010)

Try using [cmd=""]mysql -u postfix -p postfix -Bs -e 'SELECT name,username FROM mailbox;' | tr '\t' ',' > addr.csv[/cmd]


----------



## dennylin93 (Jan 15, 2010)

Do an SQL query to get a dump of all the addresses (something similar to crsd's query).


----------

