Forwarder prototype?

Discussion re sg development. You don't have to be a developer.

Forwarder prototype?

Postby Guest » Fri Aug 29, 2003 1:40 pm

By: syskoll ( Fred )
Forwarder prototype?
2002-12-12 21:48

Josh, Amit,

We agree the Forwarder should be delivered as Perl and C. I would like to start coding this little piece. Here are the amended specs:

- Perl for portability, optional C code for raw speed
- Is invoked by "| /path/of/program" in .forward, hence gets the email message in stdin
- Checks for a local socket (FIFO) to see if spameater.pl is alive and listening
- If not, starts spameater.pl and wait for it to initialiaze
- Sends the email message to spameater.pl through the FIFO (faster than IP socket)
- Allow command-line parms to turn on various debugging traces such,as in

"| /path/of/program -t 1 -l /tmp/logfile" in .forward to turn on traces level 1 and write them in /tmp/logfile.

Please let me know if you agree. Also, give me your thoughts about how to test this on the test system.

Thanks,

-- SysKoll


By: maratheamit ( Amit Marathe )
RE: Forwarder prototype?
2002-12-14 07:40
The spec seems fine.

As for testing, we should agree on some simple protocol so that two of us are not trying to make changes to the system at the same time. I guess send an email to the group (through the developers forum) stating what times you are going to need the system for exclusive use.

-- Amit


By: syskoll ( Fred )
Access locking
2002-12-14 12:15
Email will be good. Also, when you start doing changes, create a file called LOCK in the spamgourmet home dir, with command:
who am i > LOCK

This will give other team members the pseudo-tty and time of your login.

Remove LOCK when the changes are done.

If you forget to remove LOCK, the who command will indicate whether you're still logged on with the same pty or not. If you're not logged anymore, chances are you just forgot to remove the LOCK file.

What do you think?

-- SysKoll


By: syskoll ( Fred )
Forwarder prototype available
2002-12-15 20:57
Hello,

I wrote a Perl prototype of the Forwarder. It actually uses a tcp socket because a FIFO can remain in the system while its creator is gone, anad hence is not a good solution to verify that the creator process is already running.

So Forwarder does this:
- Tries to connect to a local IP port to see if spameater.pl is alive and listening
- If not, starts spameater.pl and wait for it to initialiaze
- Sends the email message to spameater.pl through the socket
- Quits.

Since my system isn't set to run spameater.pl, I tested Forwarder by making it launch a simple test daemon named fwdlistener.pl that listens to that port and echoes the data passed into the socket. fwdlistener.pl is supposed to be a placeholder for, and have the same interface as, spameater.pl.

Forwarder and fwdlistener.pl are ready for test by you guys. I'd like you to review the code and tell me if I have forgotten some error condition (I test for several).

Can I do a cvs add of these files on the test machine for you to review?

Thanks,

-- SysKoll


By: maratheamit ( Amit Marathe )
RE: Forwarder prototype?
2002-12-17 15:03
Why don't you check in the files into CVS? The Forwarder can go in the spamgourmet main directory and the fwdlistener.pl in the testing sub-directory.

I would also suggest that Forwarder take two config options: the port on which to find spameater.pl and the full path to spameater.pl. And for ease of setup these two options should be added to spamgourmet.config (which will then be read by both the Forwarder and spameater.pl).


By: maratheamit ( Amit Marathe )
RE: Forwarder prototype?
2002-12-17 18:57
Why don't you check in the files into CVS? The Forwarder can go in the spamgourmet main directory and the fwdlistener.pl in the testing sub-directory.

I would also suggest that Forwarder take two config options: the port on which to find spameater.pl and the full path to spameater.pl. And for ease of setup these two options should be added to spamgourmet.config (which will then be read by both the Forwarder and spameater.pl).


By: syskoll ( Fred )
RE: Forwarder prototype?
2002-12-18 21:33
Amit,

I tried a cvs add spamgourmet/forwarder.pl but I probably don't have the right permissions:

$ export CVS_RSH=ssh
$ cvs -z3 -d:ext:syskoll@cvs.spamgourmet.sourceforge.net:/cvsroot/spamgourmet add spamgourmet/forwarder.pl
syskoll@cvs.spamgourmet.sourceforge.net's password:
Permission denied, please try again.

I don't seem to have permission to add a new file in the project.

Josh, can you please either authorize me to do add or create
empty files of the following names:
spamgourmet/forwarder.pl
spamgourmet/testing/fwdlistener.pl
spamgourmet/testing/forwarder.README

Thanks,

-- SysKoll



By: jqh1 ( Josiah Hamilton )
RE: Forwarder prototype?
2002-12-19 18:26
Syskoll,
For the life of me, I can't figure out why you wouldn't have permission to add files. I did see somewhere that we should use the host:
cvs1.sourceforge.net
instead of cvs.spamgourmet.sourceforge.net - not sure whether that would have any impact, though.

Next chance I get, I'll take a shot at adding empty files in the locations you mentioned.

Josh


By: syskoll ( Fred )
Back from vacation
2003-01-09 20:04
Josh,

I was out of town for the last two weeks. Did you get the two files I sent to you (the forwarder and its test program)?

-- SysKoll


By: jqh1 ( Josiah Hamilton )
RE: Forwarder prototype?
2003-01-12 13:46
SysKoll,
Hope your holidays were nice -- I've pretty much been off the map, too. I did get the files and checked them into cvs. I have them on the test machine, but haven't fired them up yet -- pretty code though! -- I'm currently working on getting the Mail::Audit enabled package into production. Soon after, I'll get the test environment up and running for forwarder.
Guest
 

Return to Developers

Who is online

Users browsing this forum: No registered users and 16 guests

cron