php-admin based on perl-admin
Hi
I have converted the perl-admin source to php.
It's based on the version from Franky Van Liederkerke which I found in following posting:
http://mlmmj.mmj.dk/archives/mlmmj/2007-08/1122.html
Unfortunately I am to busy to write a README.
It works for me without problems.
For optimizing security I would need some help:
In my server environment I needed to set "SuexecUserGroup nobody nogroup" (on Debian Etch postfix delivers as user nobody). I did not work it out how to share the mlmmj list directory with a different group. Even when I setgid the list directory (and the directories below) to the shared group. Everytime (while subscribing/unsubscribing etc.) mlmmj tries to use files which it is not the owner of, mlmmj writes a permission problem to the mail log.
Oliver
Signature · 4 lines
Ich verwende die kostenlose Version von SPAMfighter fur private Anwender, die bei mir bis jetzt 6213 Spammails entfernt hat. Bezahlende Anwender haben diesen Hinweis nicht in ihren E-Mails. Laden Sie SPAMfighter kostenlos herunter: http://www.spamfighter.com/lde
Quoted 8 lines · Oliver Gading
I have converted the perl-admin source to php.
It's based on the version from Franky Van Liederkerke which I found in following posting:
http://mlmmj.mmj.dk/archives/mlmmj/2007-08/1122.htmlUnfortunately I am to busy to write a README.
It works for me without problems.
Quoted 8 lines
For optimizing security I would need some help:
In my server environment I needed to set "SuexecUserGroup nobody nogroup" (on Debian Etch postfix delivers as user nobody). I did not work it out how to share the mlmmj list directory with a different group. Even when I setgid the list directory (and the directories below) to the shared group. Everytime (while subscribing/unsubscribing etc.) mlmmj tries to use files which it is not the owner of, mlmmj writes a permission problem to the mail log.
If the subscribers directories (subscribers.d, digesters.d and nomailsubs.d) are group writable mlmmj-sub and mlmmj-unsub will change its gid to the group of the relevant directory when subscribing or unsubscribing.
So no setgid is neccesary. Just chmod g+w and chgrp to the shared group.
Signature · 1 line
Christian Laursen
Hi Christian
Thank you for your hints regarding my permission problem.
Quoted 5 lines
Quoted 5 lines
For optimizing security I would need some help:
In my server environment I needed to set "SuexecUserGroup nobody nogroup" (on Debian Etch postfix delivers as user nobody). I did not work it out how to share the mlmmj list directory with a different group. Even when I setgid the list directory (and the directories below) to the
shared group.
Quoted 7 lines
Quoted 3 lines
Everytime (while subscribing/unsubscribing etc.) mlmmj tries to use files which it is not the owner of, mlmmj writes a permission problem to the mail log.
If the subscribers directories (subscribers.d, digesters.d and nomailsubs.d) are group writable mlmmj-sub and mlmmj-unsub will change its gid to the group of the relevant directory when subscribing or
unsubscribing.
Quoted 2 lines
So no setgid is neccesary. Just chmod g+w and chgrp to the shared group.
Ok. I then added a system "mlmmj" with the members "virt,nobody". mlmmj delivers with nobody.nogroup
Apache acts with "SuexecUserGroup virt virt"
1. added one subscriber "[email protected]" via php-admin.
-> SUCCESS 2. added one subscriber "[email protected]" via email. -> SUCCESS 3. added one subscriber "[email protected]" via php-admin. -> SUCCESS 4. added one subscriber "[email protected]" via email. -> FAILED (Permission denied and new file .o.lock, see below)
5. listed subscribers via php-admin, but "[email protected]" is not shown in list (because of file "a" was being set to "nogroup" by mlmmj delivery)
/etc/passwd nobody:x:65534:65534:nobody:/nonexistent:/bin/sh virt:x:2054:2054:virt:/var/www/virtual/VIRTDOMAIN.TLD:/bin/false
/etc/group:
nogroup:x:65534:
virt:x:2054:
mlmmj:x:111:virt,nobody
/var/log/mail.log
Dec 20 20:52:28 MYHOST postfix/local[2551]: 549DD10AC1E6:
to=<list-test+subscri
[email protected]>, orig_to=<[email protected]>, relay=local,
delay=0.32, delays=0.22/0.05/0/0.05, dsn=2.0.0, status=sent (delivered to
comma
nd: /usr/local/bin/mlmmj-recieve -L /var/spool/mlmmj/VIRTDOMAIN.TLD/list-test)
Dec 20 20:52:28 MYHOST postfix/qmgr[2239]: 549DD10AC1E6: removed Dec 20 20:52:28 MYHOST postfix/smtpd[2507]: lost connection after DATA from unknown[IP] Dec 20 20:52:28 MYHOST postfix/smtpd[2507]: disconnect from unknown[IP] Dec 20 20:52:28 MYHOST /usr/local/bin/mlmmj-sub[2553]: mlmmj-sub.c:657:
Could n
ot open '/var/spool/mlmmj/VIRTDOMAIN.TLD/list-test/subscribers.d/o':
Permission denied
# ls -al /var/spool/mlmmj/VIRTDOMAIN.TLD/list-test/subscribers.d insgesamt 16 drwxrwxr-x 2 nobody mlmmj 4096 2007-12-20 20:47 . drwxr-xr-x 15 nobody nogroup 4096 2007-12-20 07:08 .. -rw-rw---- 1 nobody nogroup 15 2007-12-20 20:41 a -rw-rw---- 1 virt mlmmj 14 2007-12-20 20:40 g -rw-rw---- 1 virt mlmmj 18 2007-12-20 20:46 o -rw------- 1 nobody nogroup 0 2007-12-20 20:47 .o.lock
Yesterday, with "chmod g+sw subscribers.d" I was successful at least with the php-admin part.
But mlmmj delivery had got the same permission problem as shown above. And even more worse with php-admin was a "subscription moderation"-configured list, because
of other related sub-directories (and may be also because of mlmmj-send is not setgid-aware).
Oliver
Hi
Quoted 4 lines
I have converted the perl-admin source to php. It's based on the version from Franky Van Liederkerke which I found in following posting:
http://mlmmj.mmj.dk/archives/mlmmj/2007-08/1122.html
I forgot to mention that my new php-admin is also based on the latest version of php-admin (timestamp of May 2005).
I added (almost, see below) all new stuff from the most current perl-admin (August 2007), plus:
- "footer" config (was missing in tunables.pl)
- listing differences after changes to text files
- changes to subscriptions are shown with green and red colors
"Bulk add subscribers" is not yet implemented.
Quoted 1 line
Unfortunately I am to busy to write a README.
There is a README in the original mlmmj source in
mlmmj-1.2.15/contrib/web/php-admin/README
and one other in the perl-admin archive from August 2007. Both need to be merged somehow.
Oliver