* feature request: archivedir setting
@ 2008-01-03 2:13 Robin H. Johnson
2008-01-03 7:07 ` Mads Martin Joergensen
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Robin H. Johnson @ 2008-01-03 2:13 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
I'm writing this email, in the hope that somebody else has already
implemented what I'm interested in.
I'd like a tunable to specify what directory to use for the archive.
If nobody else has done it, I think it should be trivial to implement,
generally following this pseudo-code:
Existing:
archivename = concatstr(3, listdir, "/archive/", buf);
New:
char* archivedir = get_archivedir(listdir);
archivename = concatstr(3, archivedir, buf);
char* get_archivedir(listdir) {
archivedir = <$listdir/control/archivedir>;
return archivedir if archivedir;
return "$listdir/archive/";
}
--
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
[-- Attachment #2: Type: application/pgp-signature, Size: 329 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: feature request: archivedir setting
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
@ 2008-01-03 7:07 ` Mads Martin Joergensen
2008-01-03 19:00 ` Robin H. Johnson
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mads Martin Joergensen @ 2008-01-03 7:07 UTC (permalink / raw)
To: mlmmj
On 03/01/2008, at 3.13, Robin H. Johnson wrote:
> I'd like a tunable to specify what directory to use for the archive.
I wouldn't mind implementing this for you, but why not just symlink
the archive dir to somewhere else?
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: feature request: archivedir setting
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
2008-01-03 7:07 ` Mads Martin Joergensen
@ 2008-01-03 19:00 ` Robin H. Johnson
2008-01-03 19:21 ` Mads Martin Joergensen
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Robin H. Johnson @ 2008-01-03 19:00 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
On Thu, Jan 03, 2008 at 08:07:03AM +0100, Mads Martin Joergensen wrote:
> On 03/01/2008, at 3.13, Robin H. Johnson wrote:
>> I'd like a tunable to specify what directory to use for the archive.
> I wouldn't mind implementing this for you, but why not just symlink the
> archive dir to somewhere else?
While that works fine for a single instance (and indeed I tested a
single list with it), I've got 114 lists presently, with a fair growth,
and I want to have it smartly set during list creation time.
--
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
[-- Attachment #2: Type: application/pgp-signature, Size: 329 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: feature request: archivedir setting
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
2008-01-03 7:07 ` Mads Martin Joergensen
2008-01-03 19:00 ` Robin H. Johnson
@ 2008-01-03 19:21 ` Mads Martin Joergensen
2008-01-03 19:58 ` Mads Martin Joergensen
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mads Martin Joergensen @ 2008-01-03 19:21 UTC (permalink / raw)
To: mlmmj
* Robin H. Johnson <robbat2@gentoo.org> [Jan 03. 2008 20:00]:
> > On 03/01/2008, at 3.13, Robin H. Johnson wrote:
> >> I'd like a tunable to specify what directory to use for the archive.
> > I wouldn't mind implementing this for you, but why not just symlink the
> > archive dir to somewhere else?
> While that works fine for a single instance (and indeed I tested a
> single list with it), I've got 114 lists presently, with a fair growth,
> and I want to have it smartly set during list creation time.
How about a patch to specify a place to symlink to for
mlmmj-create-ml.sh than? WRT the existing list a very simple for loop
will help.
Will you have to change the existing lists as well?
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: feature request: archivedir setting
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
` (2 preceding siblings ...)
2008-01-03 19:21 ` Mads Martin Joergensen
@ 2008-01-03 19:58 ` Mads Martin Joergensen
2008-01-04 9:10 ` Morten K. Poulsen
2008-01-04 17:47 ` Neale Pickett
5 siblings, 0 replies; 7+ messages in thread
From: Mads Martin Joergensen @ 2008-01-03 19:58 UTC (permalink / raw)
To: mlmmj
* Mads Martin Joergensen <mmj@mmj.dk> [Jan 03. 2008 20:21]:
> WRT the existing list a very simple for loop will help.
for i in /var/spool/mlmmj/* ; do
mv $i/archive /path/to/newplace
ln -s /path/to/newplace/`basename $i`/archive $/archive
done
Untested, but you get the idea.
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: feature request: archivedir setting
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
` (3 preceding siblings ...)
2008-01-03 19:58 ` Mads Martin Joergensen
@ 2008-01-04 9:10 ` Morten K. Poulsen
2008-01-04 17:47 ` Neale Pickett
5 siblings, 0 replies; 7+ messages in thread
From: Morten K. Poulsen @ 2008-01-04 9:10 UTC (permalink / raw)
To: mlmmj
On Thu, 2008-01-03 at 20:58 +0100, Mads Martin Joergensen wrote:
> * Mads Martin Joergensen <mmj@mmj.dk> [Jan 03. 2008 20:21]:
> > WRT the existing list a very simple for loop will help.
>
> for i in /var/spool/mlmmj/* ; do
> mv $i/archive /path/to/newplace
> ln -s /path/to/newplace/`basename $i`/archive $/archive
> done
- ln -s /path/to/newplace/`basename $i`/archive $/archive
+ ln -s /path/to/newplace/`basename $i`/archive $i/archive
> Untested, but you get the idea.
Still untested :)
Morten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: feature request: archivedir setting
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
` (4 preceding siblings ...)
2008-01-04 9:10 ` Morten K. Poulsen
@ 2008-01-04 17:47 ` Neale Pickett
5 siblings, 0 replies; 7+ messages in thread
From: Neale Pickett @ 2008-01-04 17:47 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
I've been using this instead of the shell script that comes with mlmmj.
Minor tweaks should render it capable of symlinking your archive
directory to wherever.
This has some other stuff that links in with my postfix
auto-list-grabber thing (also attached) and an mhonarc doohickey (not
attached but I can if people want).
Neale
[-- Attachment #2: newlist --]
[-- Type: application/octet-stream, Size: 1186 bytes --]
#! /bin/sh -e
domain=woozle.org
list=$1
if ! shift; then
echo "Usage: $0 listname [owner]"
exit 1
fi
owner=$1
if ! shift; then
echo -n "Who runs the list? "
read owner
fi
echo "Enter a short description of the $list list, or just"
echo "hit enter for no description:"
echo -n "description: "
read desc
while true; do
echo -n "Archive messages on the web (y/n)? "
read archive
case "$archive" in
Y|y)
archive=archive
break
;;
N|n)
unset archive
break
;;
esac
done
base=/var/spool/mlmmj/$list
mkdir $base
echo "Copying skeleton..."
(cd /etc/mlmmj/skeleton && tar cf - .) | (cd $base && tar xmf -)
chown -R list:list $base
echo "Performing control file substitutions..."
# Do substitutions
cd /etc/mlmmj/skeleton/control
for i in *; do
m4 -DLIST=$list -DOWNER="$owner" -DDOMAIN="$domain" -DSHORTDESC="$desc" -DARCHIVE="$archive" $i > $base/control/$i
done
if [ -n "$archive" ]; then
touch $base/control/archive
fi
echo "Rebuilding postfix indices..."
make -C /etc/postfix
echo "All done."
echo
echo "You may want to poke around in $base/control."
echo "See /usr/share/doc/mlmmj/TUNABLES.gz for more information."
[-- Attachment #3: mlmmj.m4 --]
[-- Type: application/octet-stream, Size: 265 bytes --]
#
# mlmmj mail list alias doohickies
#
#
# Unless you are editing a file ending with .m4, your changes will be lost.
# This means you, Matt.
#
esyscmd(`
for i in /var/spool/mlmmj/*/; do
ml=$(basename $i)
echo "$ml \"|/usr/bin/mlmmj-recieve -L $i\""
done
')
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-04 17:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 2:13 feature request: archivedir setting Robin H. Johnson
2008-01-03 7:07 ` Mads Martin Joergensen
2008-01-03 19:00 ` Robin H. Johnson
2008-01-03 19:21 ` Mads Martin Joergensen
2008-01-03 19:58 ` Mads Martin Joergensen
2008-01-04 9:10 ` Morten K. Poulsen
2008-01-04 17:47 ` Neale Pickett
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.