Forum Replies Created
-
AuthorPosts
-
mosen
ParticipantHi larkost,
I’ll test it out for you.. if it’s not too late. I have a leopard and snow leopard build.
mosen
ParticipantThere has been a few E-mails directed my way regarding the script source and
more of the process. So I will try to reiterate and remember as much as I can.[b]10.4 or 10.5 cyrus imap to 10.6 dovecot migration[/b]
1. Back up the cyrus mail store, configuration, seen files etc. SERIOUSLY (you can use the nice mailBfr package to do this from [url]http://osx.topicdesk.com/[/url]. Personally I modified the mailBfr script to allow remote rsync locations so that there was less downtime on the switch from server1 to server2. (There’s still downtime though).
2. Install cyrus2dovecot. I believe there is a .pkg now 🙂
3. Create a script (I may supply one if i can figure out how 🙂 ) to convert the cyrus mail store + seen + subscription files to dovecot format. I used an example from the cyrus2dovecot documentation page: [url]http://www.cyrus2dovecot.sw.fu-berlin.de/documentation.html[/url]. I pretty much took the example script verbatim and adjusted it for my mail spool locations. I also made the output directory something like dovecot_temp, because there is another step before the mail will be recognised by dovecot in snow leopard.
4. Run the script. It will convert the cyrus store to a dovecot store. It preserves flags pretty well, i.e you won’t be left with inboxes full of unread mail etc. You do need to specify the quota again. For more information on the caveats of conversion, consult the documentation for cyrus2dovecot.
Now that you have a freshly converted dovecot mail store, snow leopard will be able to read the mail.. but it will expect the folder to be a different name than before. Instead of using the short username “jbloggs”, it will look up the GeneratedUID attribute of the user record from Open Directory (local or not). So we need a way to rename each user “jbloggs” to the GeneratedUID – something like E1126AC8-EAEF-11D8-855B-000A95C4234E/
I created a script for this purpose. It uses dscl /Search to use the available bound directories to look up the user account. Your setup may be different / mileage may vary / etc.
Please forgive me if you live in shell scripting, or you have a shebang tattoo, or if you thought the bourne identity was about shell process IDs, I only touch on bash scripting occasionally![b]guidrename.sh[/b]
[code]
#!/bin/bash# Directory containing Maildirs output by cyrus2dovecot.pl
SOURCE_PARTITION_DIR=/Volumes/Mail/dovecot_temp
DEST_PARTITION_DIR=/Volumes/Mail/dovecot_guid# Iterate through source directory with mailboxes and rename them
function process_directories ()
{
SOURCE_DIR_LIST=”$(ls -1 $SOURCE_PARTITION_DIR)”# Only break on newlines or line breaks, to avoid interpreting dirs with spaces.
IFS=`echo -en “\n\b”`for d in `ls -1 $SOURCE_PARTITION_DIR`; do
DS_RECORD=`dscl “/Search” -read “Users/”$d GeneratedUID`
if [ $? -eq 56 ]; then
echo “Could not find GeneratedUID for user ‘$d’, skipping..”
else
echo -n “$d -> ”
GUID=`echo -n $DS_RECORD |sed -e “s/[^:]*: //g”`
echo $GUID
mv “$SOURCE_PARTITION_DIR/$d/Maildir” “$DEST_PARTITION_DIR/$GUID”
chown -R $d “$DEST_PARTITION_DIR/$GUID”
chgrp -R mail “$DEST_PARTITION_DIR/$GUID”
chmod 0700 “$DEST_PARTITION_DIR/$GUID”
fi
done
}process_directories
[/code][i]
Note: My source dir is $d/Maildir because in the conversion step i used a destination of $d/Maildir. I thought this was necessary at the time.. turns out you can put the maildir storage inside the user folder itself and it doesn’t matter. If your conversion script is a copy of the cyrus2dovecot one you will want to include the sub-directory Maildir.[/i]5. Run the rename script against the already converted dovecot mail. You should end up with a folder full of GUID folders. If you deleted a user from open directory in 10.5 or 10.4 – it removed the user but not the mail. This is why you will see an error trying to rename that users folder – the user does not exist anymore but the mail does. If you want to rescue the persons mail, make a user for them or import the mail some other way. I decided to back up the old people on tape and then delete them.
Congratulations, your mail store folder should be ready for dovecot/snow leopard server. You should relocate it to its final place, and then using Server Admin, configure the mail store location accordingly. Start up the mail service and test a few accounts.
mo.
mosen
ParticipantMy mail migration was successful and the whole place is running on snow leopard server w/dovecot.
The steps we took were:
1. To avoid a massive amount of downtime when copying mail from server1 to server2 we used a modified mailBfr script (so that it would accept remote hosts) as a cron job every night, to ensure that when the migration happened, the mail spool would already exist on the target server (server2).
2. I ran a script which ran cyrus2dovecot.pl. This is explained by the cyrus2dovecot documentation.. it basically loops through the user directories and then launches cyrus2dovecot to convert each. The output of this went to a directory called dovecot_temp
3. I made up a script which loops through each user directory in dovecot_temp and mv (renames) each directory to the associated GeneratedUID attribute of the relevant open directory user. Basically it uses ldapsearch to get the GeneratedUID and then renames the folder. It also corrects the permissions to the ones dovecot expects. Note: like me, you might have accounts that were deleted, but their mail spool remains. Just letting you know.
4. The GUID folders were moved into the storage folder for dovecot, for me this is on an external raid volume. Mail is started and hey presto.. I had working user accounts (not often that anything goes this smoothly.. but i did do a fair bit of testing 🙂If you need detail on any of this, go ahead and ask.. I’ll try to help as much as i can.
mo.
mosen
ParticipantOk im not that patient 🙂 so I will write a shell script which employs cyrus2dovecot to convert cyrus mail to dovecot with Open Directory lookup of GUID.
Will post here when i have something to test out.mosen
ParticipantHiya,
I have a wild guess that they are touching components in case they don’t exist. So that something doesn’t
raise an error when trying to load those files.Thats just a wild guess though 🙂 i will check the actual script and post results to this thread.
mosen
ParticipantI’m thinking that they won’t give up their current deployment strategy, why?
because it works cross-platform, and they only need one set of scripts to do the windows installer and the
osx installer.If they change to .pkg/.msi or something then they just lose a whole lot of time duplicating the installer code.
Mosen.
mosen
Participantlooks like the CS4 deployment tools will just be a custom way to deploy the apps as an all-in-one installer. Still won’t support InstaDMG,
from the website:[quote]
Can I create packages that are compatible with MSI and PKG installs?No. Because of the complexity of the Creative Suite installation process, Adobe has created custom installers to ensure the correct installation of the software and their shared components.
[/quote]I’ll keep working on this… Even if it takes a while 🙂
Mosen.
mosen
ParticipantJust an update on the progress…
How it works:
– The repacker parses the payload structure and generates an index.
– The test script is set up to install a named payload for eg. “Dreamweaver”
– The payload manager finds all dependencies and satisfies those dependencies before installing the requested payload.
– Each dependency and payload is installed inside its own package root folder, named after the payload. I.e “AdobeDreamweaver9en_US” contains /Applications and /Library
– Running the application from the payload folder generates a licensing error (easy to fix with a 1 line text change – this will be scripted).
– After the licensing error is fixed the application runs perfectly assuming all of the “Common” components are already available.99% of the payload installers are parsed perfectly. With the exception of the flash plugin (because of some funky browser plugin detection) and two other items in “Common”.
The uninstaller scripts are not yet handled, so the repacker generated packages won’t generate uninstallable apps at the moment.
The CAPS/PCD database entries are not generated into the postflight scripts, so effectively my repacker packages are still broken and useless 🙂 However, I am very very close to a workable system of generating .pkg’s from adobe payloads! yay
Note about CS4: We haven’t purchased CS4 yet so I don’t know how that will work.. I’d be willing to bet that they use exactly the same build system for CS4 because throwing out the platform independent build process used in CS3 that they just made, would be like throwing away money.
Mosen.
mosen
Participantlpadmin is a command line app. It’s part of the cups package methinks.
mosen
ParticipantHiya,
I’ve used bacula on OSX 10.4 and it ran pretty well 🙂
I thought that bconsole expected config files in /etc though? I’m guessing that webmin is launching it with a different config dir. Try copying your bconsole.conf from the conventional location (which i seem to remember is /etc/bacula) to /usr/local/bacula/bin
mosen
ParticipantThanks jason! My applescripting is pretty bad since I come from a unix background 🙂
mosen
ParticipantOk file is uploaded to
[url]http://drop.io/uxytg02[/url]Contains an applescript droplet and a bash script which must exist in the same folder.
Basically you drag and drop an office update on the droplet and it will modify the update to work with InstaDMG. No backup will be created of the update so keep the update .dmg handy if you need the vanilla update.
The office update package must not be inside a read-only .dmg file or it won’t be able to modify the update of course.
The code is pretty quick n dirty but works 🙂
mosen
ParticipantYou are right larkost. I wanted to make the updates semi-automated, or at least have some way of checking pending updates to an InstaDMG build. Its true that a lot of the updates have machine specific requirements etc.. so I can put up with the manual process :).
It’s a shame these apps can’t be chrooted, as chrooting SystemPreferences would be a nice way of creating a set of plists for distribution.
mosen
ParticipantI guess that would be an error with distribution.dist. Sorry, i should have been clearer about the modifications to that script. The only lines you need to add are the ones that say return true;
Does that fix it up for you? maybe its something totally different and im assuming too much 🙂
mosen
ParticipantI have uploaded an AppleScript droplet which will convert existing Office Update mpkgs to work with InstaDMG by modifying them as above.
The code is pretty alpha so backup your updates before you mod them.
File is awaiting approval by the afp548 mods 🙂
-
AuthorPosts
Recent Comments