Re: Kernel Edgeplay

Paolo <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <20090103154122.GA20656@localhost>
On Sat, Jan 03, 2009 at 07:55:09AM -0700, Chris Babcock wrote:
> > socket(1)?
> 
> Prototype uses sendmail, but that's not going to scale for larger lists.
> 
> I'm not using socket because I'm a script jockey not a C programmer.

that's wholly in script realm (man 1 socket; in Debian it's its own pkg), eg:

~$ rm -f /tmp/a.log; socket -q -p "ash /tmp/a" localhost 25; cat /tmp/a.log

c=220 r=npp MasqMail 0.2.21 ESMTP
c=250 r=npp pretty old mailer, huh?
c=250 r=OK xx@localhost is a nice guy.
c=250 r=OK oopla@localhost is our friend.
c=354 r=okay, and do not forget the dot
c=250 r=OK id=1LJ8Z8-5Pt-00

with:
#---[/tmp/a]----------------------------------------------
|#!/bin/ash
|leggi() {
|  while read c r;do
|    echo c=$c r=$r >>/tmp/a.log
|    case $c in
|      250) return 0 ;;
|      3*) return 0 ;;
|      5*) return 1 ;;
|      *) ;;
|    esac
|  done
|}
|
|echo helo npp
|leggi || exit 1
|echo mail from: xx@localhost
|leggi || exit 1
|echo rcpt to: oopla@localhost
|leggi || exit 1
|echo data
|leggi || exit 1
|echo subject: prova
|echo ""
|echo prova
|echo .
|leggi || exit 1
|#rm /tmp/a.log
#----------------------------------------------

and you get the idea ...

> > you could use just 1 'killer' process, which checks
...
> machine. That will work. Thank you.

you're welcome :)

-- 
paolo

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.