[Dovecot] Remove leading and trailing spaces from folder names?
Hi!
Anybody got a doveadm script which can remove leading and trailing spaces from folder names?
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
2012/7/19 Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
You're migrating to M$ exchange??? :o
-- Chris
- Chris xchris89x@googlemail.com:
2012/7/19 Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
You're migrating to M$ exchange??? :o
Don't ask.
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
Am 19.07.2012 14:45, schrieb Ralf Hildebrandt:
Hi!
Anybody got a doveadm script which can remove leading and trailing spaces from folder names?
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
use imapsync ?
http://imapsync.lamiral.info/imapsync_example.bat.txt
REM imapsync example batch for Windows users REM lines beginning with REM are just comments
REM Replace imap.foo.org toto secretoto 192.168.42.4 titi secretiti with your own values
.\imapsync.exe --host1 imap.foo.org --user1 toto --password1 "secretoto" --host2 192.168.42.4 --user2 titi --password2 "secretiti"
Buy standalone imapsync.exe for win32
Struggle free from source code and Perl installation by buying the latest win32 standalone imapsync.exe for 42 EUR
- One year of imapsync updates without extra payment.
- 30 days money-back guarantee!
thats the real punish for going exchnage *g
-- Best Regards MfG Robert Schetterer
- Robert Schetterer robert@schetterer.org:
Am 19.07.2012 14:45, schrieb Ralf Hildebrandt:
Hi!
Anybody got a doveadm script which can remove leading and trailing spaces from folder names?
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
use imapsync ?
No, that doesn't work, since Exchange doesn't accept the folder names.
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
use imapsync ?
No, that doesn't work, since Exchange doesn't accept the folder names.
OK, in some cases one can use
--regextrans2 "s/Sent$/Sent Items/g"
--regextrans2 "s/Drafts$/Entw&APw-rfe/g"
--regextrans2 "s/spam$/Junk-E-Mail/g"
--regextrans2 "s/(.*) $/$1/g" \
but that cannot handle leading & trailing spaces in the foldernames
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
use imapsync ?
No, that doesn't work, since Exchange doesn't accept the folder names.
OK, in some cases one can use
--regextrans2 "s/Sent$/Sent Items/g"
--regextrans2 "s/Drafts$/Entw&APw-rfe/g"
--regextrans2 "s/spam$/Junk-E-Mail/g"
--regextrans2 "s/(.*) $/$1/g" \but that cannot handle leading & trailing spaces in the foldernames
in intermediate foldernames... It can fix:
"INBOX.foo " but can't fix "INBOX. foo. bar"
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
Am 19.07.2012 15:24, schrieb Ralf Hildebrandt:
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
use imapsync ?
No, that doesn't work, since Exchange doesn't accept the folder names.
OK, in some cases one can use
--regextrans2 "s/Sent$/Sent Items/g"
--regextrans2 "s/Drafts$/Entw&APw-rfe/g"
--regextrans2 "s/spam$/Junk-E-Mail/g"
--regextrans2 "s/(.*) $/$1/g" \but that cannot handle leading & trailing spaces in the foldernames
in intermediate foldernames... It can fix:
"INBOX.foo " but can't fix "INBOX. foo. bar"
thats a beginn, i looking to a solution too
-- Best Regards MfG Robert Schetterer
Am 19.07.2012 15:31, schrieb Robert Schetterer:
Am 19.07.2012 15:24, schrieb Ralf Hildebrandt:
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
- Ralf Hildebrandt Ralf.Hildebrandt@charite.de:
use imapsync ?
No, that doesn't work, since Exchange doesn't accept the folder names.
OK, in some cases one can use
--regextrans2 "s/Sent$/Sent Items/g"
--regextrans2 "s/Drafts$/Entw&APw-rfe/g"
--regextrans2 "s/spam$/Junk-E-Mail/g"
--regextrans2 "s/(.*) $/$1/g" \but that cannot handle leading & trailing spaces in the foldernames
in intermediate foldernames... It can fix:
"INBOX.foo " but can't fix "INBOX. foo. bar"
thats a beginn, i looking to a solution too
there is a tool for this no idea if it really working and fits to the problem
http://www.microsoft.com/en-us/download/details.aspx?id=1329
Overview
Transporter Suite contains a set of tools for migrations from both Lotus Domino Servers, and generic IMAP/POP sources. For Lotus Domino the suite contains a set of tools for Directory and Free/Busy interoperability between Lotus Domino 6, 7 and 8 and Exchange Server 2007 and Windows Server 2003/2008 Active Directory. In addition for Lotus Domino the suite contains migration tools to migrate users, groups, personal address lists, mailboxes, personal mail archives, and applications from Lotus Domino 5, 6, 7 or 8 to Active Directory, Exchange Server 2007, and Windows SharePoint Services 3.0.
--here it comes For generic POP/IMAP servers the suite contains a set of tools to bulk migrate mailboxes from any generic email servers that support the POP3 or IMAP4 protocol to mailboxes in Exchange Server 2007
as ever there are problems with it
http://social.technet.microsoft.com/forums/en-US/exchangesvrmigration/thread...
http://social.technet.microsoft.com/Forums/en-US/exchangesvrmigration/thread...
https://msmvps.com/blogs/andersonpatricio/archive/2008/02/04/microsoft-trans...
some other tool
IMAP to Exchange 2003 - Exchange Migration Wizard which runs at batch mode too
http://technet.microsoft.com/en-us/library/aa998102.aspx http://technet.microsoft.com/en-us/library/bb123854.aspx
if you need contact to exchange specialist i can give you some advanced one
i remember working on pup folders with pfadmin, this tools semms now to have more options, perhaps help
http://www.msexchange.org/articles/PFDavAdmin-tool-Part2.html
-- Best Regards MfG Robert Schetterer
On 19/07/2012 13:45, Ralf Hildebrandt wrote:
Hi!
Anybody got a doveadm script which can remove leading and trailing spaces from folder names?
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
Caveat that it might cause some wierd symptoms with clients, why not attack the dovecot mail backend and rename folders + sed the subscription files?
Something like "find | rename"
Good luck
Ed W
- Ed W lists@wildgooses.com:
On 19/07/2012 13:45, Ralf Hildebrandt wrote:
Hi!
Anybody got a doveadm script which can remove leading and trailing spaces from folder names?
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
Caveat that it might cause some wierd symptoms with clients, why not attack the dovecot mail backend and rename folders + sed the subscription files?
That's what I asked for: "Anybody got a doveadm script which can remove leading and trailing spaces from folder names?"
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
On 19/07/2012 15:07, Ralf Hildebrandt wrote:
- Ed W lists@wildgooses.com:
On 19/07/2012 13:45, Ralf Hildebrandt wrote:
Hi!
Anybody got a doveadm script which can remove leading and trailing spaces from folder names?
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
Caveat that it might cause some wierd symptoms with clients, why not attack the dovecot mail backend and rename folders + sed the subscription files? That's what I asked for: "Anybody got a doveadm script which can remove leading and trailing spaces from folder names?"
Oh, sorry. Why doveadm though? Why not attack the filesystem directly?
Ed
- Ed W lists@wildgooses.com:
Oh, sorry. Why doveadm though? Why not attack the filesystem directly?
It's a bit hard with mdbox: mailboxes.
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
On 25.7.2012, at 13.43, Ralf Hildebrandt wrote:
- Ed W lists@wildgooses.com:
Oh, sorry. Why doveadm though? Why not attack the filesystem directly?
It's a bit hard with mdbox: mailboxes.
Actually it is allowed to simply mv the directory names, but I don't think that's all that much easier than just using doveadm rename.
The way I'd do this is to just do doveadm mailbox list, put the strings through some regexps and doveadm rename if necessary. Repeat for all users.
- Timo Sirainen tss@iki.fi:
Actually it is allowed to simply mv the directory names, but I don't think that's all that much easier than just using doveadm rename.
My point exactly. It's such a nice tool, so why not use a tool which keeps the integrity of the mailboxes and folders if it exists. :)
The way I'd do this is to just do doveadm mailbox list, put the strings through some regexps and doveadm rename if necessary. Repeat for all users.
Yes, something along those lines. It's just that I find it hard to craft a regexp which does that. Maybe after the vacation.
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
On 25.7.2012, at 13.54, Ralf Hildebrandt wrote:
The way I'd do this is to just do doveadm mailbox list, put the strings through some regexps and doveadm rename if necessary. Repeat for all users.
Yes, something along those lines. It's just that I find it hard to craft a regexp which does that. Maybe after the vacation.
echo " foo/ b a r / baz / sup " | perl -pe 's, +/,/,g; s,/ +,/,g; s/^ +//; s/ +$//'
On 25/07/2012 11:59, Timo Sirainen wrote:
On 25.7.2012, at 13.54, Ralf Hildebrandt wrote:
The way I'd do this is to just do doveadm mailbox list, put the strings through some regexps and doveadm rename if necessary. Repeat for all users. Yes, something along those lines. It's just that I find it hard to craft a regexp which does that. Maybe after the vacation. echo " foo/ b a r / baz / sup " | perl -pe 's, +/,/,g; s,/ +,/,g; s/^ +//; s/ +$//'
Bet you can't pronounce all of the above
;-)
Stack overflow on doing it in bash (probably would use the perl regexp above though, but only because I understand perl regexps better)
http://stackoverflow.com/questions/369758/how-to-trim-whitespace-from-bash-v...
Ed W
Den 2012-07-25 12:52, Timo Sirainen skrev:
The way I'd do this is to just do doveadm mailbox list, put the strings through some regexps and doveadm rename if necessary. Repeat for all users.
plans for backports of 2.x to us there still stok on 1.2.x ?, i relly like to get 2.x dovecot going, but it so much diffrent that i keep it on todo :(
Am 19.07.2012 22:13, schrieb Wojciech Puchar:
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
ask microsoft
another example what low-brained guy you are do you recognize that you even stripped the question?
do you really think that he migrates to exchange because he have fun with it?
- Reindl Harald h.reindl@thelounge.net:
do you really think that he migrates to exchange because he have fun with it?
It seems to be a well known restriction, and folder names with leading or trailing spaces do indeed make little sense. In all cases those that I found were typos.
On Thu, 19 Jul 2012 23:27:31 +0200 Ralf Hildebrandt articulated:
- Reindl Harald h.reindl@thelounge.net:
do you really think that he migrates to exchange because he have fun with it?
It seems to be a well known restriction, and folder names with leading or trailing spaces do indeed make little sense. In all cases those that I found were typos.
I posted on the MS TechNet site an was told that there doesn't appear to be any support for it. Does anyone know of an actual RFC that specifically deals with this? I could not find one, but it was just a quick perusal. Personally, I agree with Reindl. Leading spaces don't seem to make any sense at all and I have not figured out why I would want a trailing one either.
-- Jerry ♔
"There are seldom good technological solutions to behavioral problems."
Am 20.07.2012 00:13, schrieb Jerry:
On Thu, 19 Jul 2012 23:27:31 +0200 Ralf Hildebrandt articulated:
- Reindl Harald h.reindl@thelounge.net:
do you really think that he migrates to exchange because he have fun with it?
It seems to be a well known restriction, and folder names with leading or trailing spaces do indeed make little sense. In all cases those that I found were typos.
I posted on the MS TechNet site an was told that there doesn't appear to be any support for it. Does anyone know of an actual RFC that specifically deals with this? I could not find one, but it was just a quick perusal. Personally, I agree with Reindl. Leading spaces don't seem to make any sense at all and I have not figured out why I would want a trailing one either.
i found that such folders work in exchange might work in version 2000/2003 and do not in 2007, so it seems that must be worked out in a pure exchange upgrade too, so migration ms transporter suite should handle it somehow, however Ralfs Problem seems to be so rare that it could more easy solved rename that folder by hand so we should now get back to dovecot support *g
-- Best Regards MfG Robert Schetterer
do you really think that he migrates to exchange because he have fun with it? so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
On 07/20/2012 09:48 AM, Wojciech Puchar wrote:
do you really think that he migrates to exchange because he have fun with it? so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
+1
On 7/20/12 9:56 AM, Frank Bonnet wrote:
On 07/20/2012 09:48 AM, Wojciech Puchar wrote:
do you really think that he migrates to exchange because he have fun with it? so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
+1
-1
A dovecot specific question was asked by the OP, but people seem to think this is a reason to bash either the OP, his company or non-dovecot software (exchange) for something which is related to the question, but off-topic for the list.
If you don't have any dovecot related input for the OP, just leave the thread alone, in stead of trolling. Thank you very much.
-- Tom
On 20 Jul 2012, at 09:05, Tom Hendrikx wrote:
On 7/20/12 9:56 AM, Frank Bonnet wrote:
On 07/20/2012 09:48 AM, Wojciech Puchar wrote:
do you really think that he migrates to exchange because he have fun with it? so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
+1
-1
A dovecot specific question was asked by the OP, but people seem to think this is a reason to bash either the OP, his company or non-dovecot software (exchange) for something which is related to the question, but off-topic for the list.
If you don't have any dovecot related input for the OP, just leave the thread alone, in stead of trolling. Thank you very much.
+1e100
On Fri, 20 Jul 2012 10:05:05 +0200 Tom Hendrikx articulated:
On 7/20/12 9:56 AM, Frank Bonnet wrote:
On 07/20/2012 09:48 AM, Wojciech Puchar wrote:
do you really think that he migrates to exchange because he have fun with it? so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
+1
-1
A dovecot specific question was asked by the OP, but people seem to think this is a reason to bash either the OP, his company or non-dovecot software (exchange) for something which is related to the question, but off-topic for the list.
If you don't have any dovecot related input for the OP, just leave the thread alone, in stead of trolling. Thank you very much.
+1
-- Jerry ♔
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
Am 20.07.2012 09:48, schrieb Wojciech Puchar:
do you really think that he migrates to exchange because he have fun with it?
so? is it my problem that he works in company managed by an idiot?
so why do you not simply shut ip at all?
YOU are really not in the position to qualify anybody as idiot, everybody but you can do this
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
his question was if someone has a ready script to rename the folders - so hwat is your problem?
Does it make sense?
yes it makes sense that someone requests a possible existing ready script instead start to write one, but as said you foolish idiot even stripped the real question of the OP before your arrogant answer
Am 20.07.2012 10:30, schrieb Wojciech Puchar:
so? is it my problem that he works in company managed by an idiot?
so why do you not simply shut ip at all? You are even more scared
i am not scared
i am only wondering why you are prove permanently that you are too stupid to understand basics like that there is no need for "reply all" on a mailing list, but thank god my dbmail backend supports "suppress_duplicates = yes" after the dovecot-proxy in front.......
really, after your off-list explainations why you are the only one who can build up storage systems while SAN-storage vendors are unable to do this you can not scare me any more
On 2012-07-20 4:23 AM, Reindl Harald h.reindl@thelounge.net wrote:
Am 20.07.2012 09:48, schrieb Wojciech Puchar:
do you really think that he migrates to exchange because he have fun with it?
so? is it my problem that he works in company managed by an idiot?
so why do you not simply shut ip at all?
Reindl... PLEASE stop replying to this troll, you just make the problem worse - you're better off sending him to /dev/null like I (and many others) have already... but when *you* reply, you defeat my filters.
--
Best regards,
Charles
On Fri, 20 Jul 2012 05:27:03 -0400 Charles Marcus articulated:
On 2012-07-20 4:23 AM, Reindl Harald h.reindl@thelounge.net wrote:
Am 20.07.2012 09:48, schrieb Wojciech Puchar:
do you really think that he migrates to exchange because he have fun with it?
so? is it my problem that he works in company managed by an idiot?
so why do you not simply shut ip at all?
Reindl... PLEASE stop replying to this troll, you just make the problem worse - you're better off sending him to /dev/null like I (and many others) have already... but when *you* reply, you defeat my filters.
Charles, I totally agree. This TROLL should just be banned by Timo. I wish he was banned from the FreeBSD* list(s) also. Apparently he is nothing more than a small SOHO employee with no factual knowledge or anything of value to contribute. I have filters in place to bounce his mail; however, when someone replies to his garbage, as you stated, it defeats the effectiveness of TCM (TROLL Counter Measures).
-- Jerry ♔
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
Am 20.07.2012 09:48, schrieb Wojciech Puchar:
do you really think that he migrates to exchange because he have fun with it? so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
Hi Wojciech, this is a free world, so if anyone want to give help why he shouldnt, of course its a little off topic in the dovecot list talking to exchange, but at last ,it doesnt hurt anyone, as long it gets no flood theme, anyway ,small knowings other servers is always fine, we dont live in a dovecot postfix world and gnu is no substitute for religion, the main goal of every tec mail list is to solve tec problems. At last ,i think pure M$ lovers arent booking this list that much that you need to be afraid of them *g
-- Best Regards MfG Robert Schetterer
2012/7/20 Wojciech Puchar wojtek@wojtek.tensor.gdynia.pl:
do you really think that he migrates to exchange because he have fun with it?
so? is it my problem that he works in company managed by an idiot?
Why dovecot users have to provide free support for microsoft software, while microsoft are paid for their "products" thousands of dollars?
Does it make sense?
Do you think Ralf is migrating just for fun to M$ exchange? Ralf is certainly no friend of M$ software.
I think he's freaked out when he heard about it.
-- Chris
On Thu, 19 Jul 2012 22:19:05 +0200 Reindl Harald articulated:
Am 19.07.2012 22:13, schrieb Wojciech Puchar:
Right now we're migrating mailboxes from dovecot -> Exchange, and Exchange cannot handle leading and trailing spaces in Folder names.
ask microsoft
another example what low-brained guy you are do you recognize that you even stripped the question?
do you really think that he migrates to exchange because he have fun with it?
Reindl, this reminds me of an old quote that is very pertinent to Wojciech:
"Never argue with a fool - they will drag you down to their level, then beat you with experience."
-- Jerry ♔
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
participants (13)
-
Benny Pedersen
-
Charles Marcus
-
Chris
-
Ed W
-
Frank Bonnet
-
J E Lyon
-
Jerry
-
Ralf Hildebrandt
-
Reindl Harald
-
Robert Schetterer
-
Timo Sirainen
-
Tom Hendrikx
-
Wojciech Puchar