PDA

Bekijk Volledige Versie : Mailinglist overzetten, hoe los ik dat op?



Herbert
03/11/08, 08:44
Op een server heeft een klant een mailinglist draaien en die wil ik overzetten naar een server waar DA op draaid.
Een korte uitleg:
Er wordt gebruik gemaakt van Hypermail/maildir2mbox/Postfix
De mail komt via Postfix binnen in Maildir format, maildir2mbox zet het om naar Mbox format omdat Hypermail daar alleen kan werken.
Via een cron opdracht wordt de Maildir uitgelezen en de mail wordt omgezet naar Mbox
Hypermail leest Mbox uit en de lijst wordt bijgewerkt en in de goede map neergezet.

Nu vraag ik mij af of dit niet makelijker kan?

ronaldlokers
03/11/08, 09:30
[offtopic] Hopen dat ik niet op die Nailinglist sta dan :P (je titel) [offtopic] //edit: aangepast

Kan je niet de mailinglist software die bij DA zelf zit gebruiken? Ik weet niet wat precies de eisen zijn aan het systeem, maar volgens mij voldoet het systeem dat bij DA zelf zit ook.

Herbert
03/11/08, 10:06
[offtopic] Hopen dat ik niet op die Nailinglist sta dan :P (je titel) [offtopic] //edit: aangepast

Kan je niet de mailinglist software die bij DA zelf zit gebruiken? Ik weet niet wat precies de eisen zijn aan het systeem, maar volgens mij voldoet het systeem dat bij DA zelf zit ook.

Foutje.. het betreft een Mailinglist archive
Het gaat om de mails die verstuurd zijn voor een motorclub, iedere deelnemer kan in het archive de mails doorzoeken en bekijken.

t.bloo
03/11/08, 10:35
Standaard mailinglist module van DA is prut, daar zou ik mijn tijd niet aan verliezen.

Herbert
03/11/08, 16:52
Ik ben al wat verder..
Het omzetten van Maildir naar Mbox gaat niet meer met het script maildir2mbox
Op de server waar het op moet wordt Maildir gebruikt, ik kan ook niet vinden hoe je voor 1 user de mail op Mbox om kan zetten.. dan is het probleem opgelost.
Kan dat wel eens als je alles op Maildir hebt staan en voor 1 klant Mbox wilt gebruiken?
Hieronder het script wat niet doet:


#!/bin/sh
#
################################################## ###################
#
# mailbox-auto
# copyright (c) 2004 Systems Aligned Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# contact the author directly for more information at:
# bzammit at systemsaligned dot com
# Systems Aligned Inc.
# http://www.systemsaligned.com
#
################################################## ###################
#
# history
#
# updated: july 08 2004
# version 0.2
# - first public release
# - added more comments to the code
# - added GPL licence text
# - fixed some spelling errors in echo text
#
# updated: june 23 2004
# version 0.1
# - internal release
# - Credit goes to Charles Cazabon from the qmail@list.cr.yp.to
# mailing list for getting the script started.
#
# start script
#
START=/home/ydcn/imap/ydcn.info/nl/Maildir
# Check if the mail folder exists, OR create the folder.
[ -d "$START"mail ] || mkdir "$START"mail
#
# Find all the Maildir's in the directory by looking for cur,new,tmp sub direcories
#
find $START -type d | while read d ; do
[ -d "$d/cur" -a -d "$d/new" -a -d "$d/tmp" ] || continue
echo Processing "$d"
if [ "$d" = "$START"Maildir ]; then
#
# Enter this loop if the files found are for the Inbox
#
# Call the maildir2mbox conversion program with some environment variables set
#
env MAILDIR="$d" MAIL="$START""mail/web12_nl_ydcn" MAILTMP="$START"mbox.tmp /usr/sbin/maildir2mbox
chmod 660 "$START""mail/web12_nl_ydcn"
# chown ydcn:mail "$START""web12_nl_ydcn"
echo " "
echo "Change to the root user and change the ownership on the mailbox:"
echo "# chown ydcn:mail /var/spool/web12_nl_ydcn"
echo " "
#
# Move the new mbox file to the Red Hat 9 default location for mail spools
#
# cp "$START""web12_nl_ydcn" /var/spool/mail/
# else
#
# Enter this loop if the files found are for subdirectories other than Inbox
#
USERDIR=`basename "$d" | sed 's/\.//'`
echo "Directory is: $d"
# echo "Directory without period is: $USERDIR"
echo Saved mail file is: "$START"mail/"$USERDIR"
#
# Call maildir2mbox conversion program with some environment variables set
#
env MAILDIR="$d" MAIL="$START"mail/"$USERDIR" MAILTMP="$START"mbox.tmp /usr/sbin/maildir2mbox
fi
done


# Mailboxlist block
#
# Create an mbox .mailboxlist file so programs know what extra
# directories are used, and where they can be found.
#
[ -f "$START".mailboxlist ] && rm "$START".mailboxlist

echo " "
for FILE in $( find "$START"mail/ -type f )
# The above string needs to be fixed for directories with whitespace.
# It breaks at the moment, by creating a directory for each
# whitespace separated word in an mbox file name.
do
MAILBOXFILE=mail/`basename "$FILE"`
echo .mailboxlist entry: "$MAILBOXFILE"
echo "$MAILBOXFILE" >> "$START".mailboxlist
done
exit 0
#
# end script
#