[ ispman-Patches-1517858 ] notifyUsers - recreating an atavism

"SourceForge.net" <[email protected]> Mon, 10 Jul 2006 21:15:04 -0700
Newsgroups gmane.comp.isp.ispman.devel
Message-ID <[email protected]>
Patches item #1517858, was opened at 2006-07-06 00:42
Message generated for change (Comment added) made by s0undt3ch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308390&aid=1517858&group_id=8390

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Andreas John (derjohn)
Assigned to: Joerg Delker (jdelker)
Summary: notifyUsers - recreating an atavism

Initial Comment:
Hello,
after the notifyUsers is mentioned in the
ispman.conf.example, I tried it out and it didn't work.
There where even tmpl files missing. Atif pointed out
that they can be found in the CVS attic.

I figured out how the job dispatching in ISPMan works.
maybe this helps others to understand, so I write it down:

1.) Use the WEB UI ("admin panel") to set you message
2.) The web UI ("cgi") puts the process into LDAP
3.) ispman-agent searches for processes in the LDAP
4.) ispman-agent executes in "task/<tasktype>_task.pl"
the function "<tasktype>_task" (in my case:
NotifyUsers_task), which returns a @cmd
5.) ispman-agent executes the command in @cmd on CLI
(in my case ispman.notifyUsers ....)
6.) ispman.notifyUsers uses in my case the
lib/send_email_to_domain.lib to figure out all users to
notify and sends the mail to them

I attach all files and patches needed, to get it
running again:

[from attic] ./cgi-bin/tmpl/users/notify.tmpl
[from attic]
./cgi-bin/tmpl/users/notificationReadyToSend.tmpl
[new] bin/ispman.notifyUsers
[preplaced] tasks/NotifyUsers_task.pl
[patch] /lib/ISPMan/MessagingMan.pm

In MessagingMan I use Email::Valid to check for the
correctness of e-mail addresses, to in Debian we need
"libemail-valid-perl" and it's dependencies.

Flaws: Currently you cannot send to "all users of all
domains" via the CLI tool, you have to use the Web UI
for doing so, but I dont feel this is a disadvantage,
as the web UI created the message with all headers for
you (MIME!).

rgds,
derjohn

----------------------------------------------------------------------

Comment By: Pedro Algarvio (s0undt3ch)
Date: 2006-07-11 05:15

Message:
Logged In: YES 
user_id=927681

This patch introduced a problem in the build process, it no
longer respects DESTDIR instalation systems.

I say it's because of this precise patch because it didn't
happened before this was introduced.

I run Gentoo, and here's a snipet of what happens when I
update the package from source to install it:

What was updated:
 * Updating ISPMan's source from CVS (This might take some
time)...
cvs update: warning: .cvsignore was lost
U .cvsignore
cvs update: warning: DISTFILES was lost
U DISTFILES
P bin/ispman.deleteMailbox
P bin/ispman.dnsset
P bin/ispman.dnsshow
U bin/ispman.notifyUsers
U bin/ispman.soap.server
P bin/ldifdiff
P bin/functions/dnsshow.functions.pl
U debian/README.Debian
U debian/apache.conf
U debian/changelog
U debian/compat
U debian/control
U debian/copyright
U debian/dirs
U debian/ispman-agent.init
U debian/ispman-agent.install
U debian/ispman-lib.docs
U debian/ispman-lib.install
U debian/ispman-lib.links
U debian/ispman-web.install
U debian/ispman-web.links
U debian/ispman.conf
U debian/mod-perl.apache.conf
U debian/rules
U debian/watch
U debian/patches/00list
U debian/patches/01_liblocations.dpatch
U debian/patches/02_ldif_patch.dpatch
P docs/ChangeLog
P docs/contrib/debian-packages.txt
P install-data/templates/vhosts.conf.template
P ispman-web/cgi-bin/tmpl/menu.tmpl
P ispman-web/cgi-bin/tmpl/mailgroups/edit.tmpl
U ispman-web/cgi-bin/tmpl/users/notificationReadyToSend.tmpl
U ispman-web/cgi-bin/tmpl/users/notify.tmpl
RCS file: /cvsroot/ispman/ispman/lib/dns.bind8.lib,v
retrieving revision 1.24
retrieving revision 1.25
Merging differences between 1.24 and 1.25 into dns.bind8.lib
lib/dns.bind8.lib already contains the differences between
1.24 and 1.25
P lib/ISPMan/MailGroupMan.pm
P lib/ISPMan/MessagingMan.pm
P lib/ISPMan/DNSMan/TXTrecords.pm
U tasks/NotifyUsers_task.pl

The error in the instalation process:
./install-sh -c tasks/createHomeDirectory_task.pl
/var/tmp/portage/ispman-1.3_rc2/image//opt/ispman/tasks/createHomeDirectory_task.pl
./install-sh -c tasks/RemoveCanonicalMapEntry_task.pl
/var/tmp/portage/ispman-1.3_rc2/image//opt/ispman/tasks/RemoveCanonicalMapEntry_task.pl
./install-sh -c tasks/AddVirtualHostDirectories_task.pl
/var/tmp/portage/ispman-1.3_rc2/image//opt/ispman/tasks/AddVirtualHostDirectories_task.pl
./install-sh -c tasks/RemoveRelayDomainEntry_task.pl
/var/tmp/portage/ispman-1.3_rc2/image//opt/ispman/tasks/RemoveRelayDomainEntry_task.pl
./install-sh -c tasks/NotifyUsers_task.pl
/var/tmp/portage/ispman-1.3_rc2/image//opt/ispman/tasks/NotifyUsers_task.pl
ACCESS DENIED  rename:    /opt/ispman/conf/sedvz3JDo
ACCESS DENIED  unlink:    /opt/ispman/conf/sedvz3JDo
sed: cannot remove /opt/ispman/conf//sedvz3JDo: Permission
denied
>>> Completed installing ispman-1.3_rc2 into
/var/tmp/portage/ispman-1.3_rc2/image/

--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE =
"/var/log/sandbox/sandbox-www-apps_-_ispman-1.3_rc2-23456.log"

rename:    /opt/ispman/conf/sedvz3JDo
unlink:    /opt/ispman/conf/sedvz3JDo
--------------------------------------------------------------------------------
!!! This ebuild is from an overlay:
'/usr/local/overlays/ispman-portage'


----------------------------------------------------------------------

Comment By: Joerg Delker (jdelker)
Date: 2006-07-06 22:33

Message:
Logged In: YES 
user_id=43997

applied to HEAD:

/cvsroot/ispman/ispman/bin/ispman.notifyUsers,v  <-- 
ispman.notifyUsers
initial revision: 1.1

/cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/users/notificationReadyToSend.tmpl,v
 <--  notificationReadyToSend.tmpl
new revision: 1.3; previous revision: 1.2

/cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/users/notify.tmpl,v
 <--  notify.tmpl
new revision: 1.3; previous revision: 1.2

/cvsroot/ispman/ispman/lib/ISPMan/MessagingMan.pm,v  <-- 
MessagingMan.pm
new revision: 1.5; previous revision: 1.4

/cvsroot/ispman/ispman/tasks/NotifyUsers_task.pl,v  <-- 
NotifyUsers_task.pl
new revision: 1.2; previous revision: 1.1


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308390&aid=1517858&group_id=8390


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642