Re: forwarding msgs analyzing subject text

2001-05-31 Thread Massimo Quintini

Dear Russell

Fantastic.it works !

Thanks...thanks..and thanks again 

Massimo QUINTINI

Russell Nelson wrote:

> Massimo Quintini writes:
>  > Excuse me, but I have tried your solution but it don't works!
>
>  > |/var/qmail/bin/condredirect iauc `822field Subject | grep -q "IAUC"`
>
> Doh!  Yes, of course that won't work.  condredirect wants a program to
> run, not a string.  Try it this way:
>
> |/var/qmail/bin/condredirect iauc /bin/sh -c '822field Subject | grep -q "IAUC"'
>
> --
> -russ nelson <[EMAIL PROTECTED]>  http://russnelson.com
> Crynwr sells support for free software  | PGPok | Microsoft rivets everything.
> 521 Pleasant Valley Rd. | +1 315 268 1925 voice | Linux has some loose screws.
> Potsdam, NY 13676-3213  | +1 315 268 9201 FAX  | You own a screwdriver.

--
Massimo Quintini
Osservatorio Astronomico Collurania Teramo
Via Mentore Maggini s.n.c. 64100 TERAMO (Italy)
Tel +39-0861210490  Fax +39-0861210492
http://www.te.astro.it





Re: forwarding msgs analyzing subject text

2001-05-31 Thread Henning Brauer

On Thu, May 31, 2001 at 10:10:56AM -0400, Russell Nelson wrote:
> Massimo Quintini writes:
>  > Excuse me, but I have tried your solution but it don't works!
> 
>  > |/var/qmail/bin/condredirect iauc `822field Subject | grep -q "IAUC"`
> 
> Doh!  Yes, of course that won't work.  condredirect wants a program to
> run, not a string.  Try it this way:
> 
> |/var/qmail/bin/condredirect iauc /bin/sh -c '822field Subject | grep -q "IAUC"'

...and make sure you have DJB's mess822-package installed. 822field isn't
part of qmail.

-- 
* Henning Brauer, [EMAIL PROTECTED], http://www.bsws.de *
* Roedingsmarkt 14, 20459 Hamburg, Germany   *
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)



Re: forwarding msgs analyzing subject text

2001-05-31 Thread Russell Nelson

Massimo Quintini writes:
 > Excuse me, but I have tried your solution but it don't works!

 > |/var/qmail/bin/condredirect iauc `822field Subject | grep -q "IAUC"`

Doh!  Yes, of course that won't work.  condredirect wants a program to
run, not a string.  Try it this way:

|/var/qmail/bin/condredirect iauc /bin/sh -c '822field Subject | grep -q "IAUC"'

-- 
-russ nelson <[EMAIL PROTECTED]>  http://russnelson.com
Crynwr sells support for free software  | PGPok | Microsoft rivets everything.
521 Pleasant Valley Rd. | +1 315 268 1925 voice | Linux has some loose screws.
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX  | You own a screwdriver.



Re: forwarding msgs analyzing subject text

2001-05-31 Thread Massimo Quintini

Excuse me, but I have tried your solution but it don't works!

My files are

~massimo/.qmail

./Maildir/
|/var/qmail/bin/condredirect iauc `822field Subject | grep -q "IAUC"`

~alias/.qmail-iauc

&[EMAIL PROTECTED]

The messages in /var/log/qmail/current are


new msg 104056
info msg 104056: bytes 1094 from <[EMAIL PROTECTED]> qp 4756 uid 946
starting delivery 29: msg 104056 to local [EMAIL PROTECTED]
status: local 1/10 remote 0/20
delivery 29: failure:
condredirect:_usage:_condredirect_newaddress_program_[_arg_..._]/
status: local 0/10 remote 0/20
bounce msg 104056 qp 4764
end msg 104056
new msg 104057
info msg 104057: bytes 1669 from <> qp 4764 uid 951
starting delivery 30: msg 104057 to remote [EMAIL PROTECTED]
status: local 1/10 remote 0/20
delivery 30: success: did_1+0+0/
status: local 0/10 remote 0/20
end msg 104057

I have tried with many test but without success!!!

Thanks. Massimo QUINTINI

Russell Nelson wrote:

> Massimo Quintini writes:
>  > I must forward msgs from 1 sender to groups of users  AFTER EXAMINING
>  > SUBJECT TEXT
>  >
>  > example:
>  >
>  > the rcpt of msg is user1
>  > IF subject contains the char string "xxx" THEN the msg must be forwarded
>  > to users user2, user3, user4
>  > IF subject contains the char string "yyy" THEN the msg must be forwarded
>  > to users user5, user6, user7
>  > ..and so on
>  >
>  > It's possibile? How?
>
> cat >~user1/.qmail < ./Mailbox
> |condredirect user234 `822field Subject | grep -q "xxx"`
> |condredirect user567 `822field Subject | grep -q "yyy"`
> EOF
>
> cat >~alias/.qmail-user234 < &user2
> &user3
> &user4
> EOF
>
> cat >~alias/.qmail-user567 < &user5
> &user6
> &user7
> EOF
>
> --
> -russ nelson <[EMAIL PROTECTED]>  http://russnelson.com
> Crynwr sells support for free software  | PGPok | Microsoft rivets everything.
> 521 Pleasant Valley Rd. | +1 315 268 1925 voice | Linux has some loose screws.
> Potsdam, NY 13676-3213  | +1 315 268 9201 FAX  | You own a screwdriver.

--
Massimo Quintini
Osservatorio Astronomico Collurania Teramo
Via Mentore Maggini s.n.c. 64100 TERAMO (Italy)
Tel +39-0861210490  Fax +39-0861210492
http://www.te.astro.it





Re: forwarding msgs analyzing subject text

2001-05-30 Thread John R. Levine

Russ' solution would certainly work, but this is exactly the sort
of thing that procmail is intended for.  A procmailrc to do this
would look like this:

:0 c
* Subject:.*xxx
! user2 user3 user4

:0 c
* Subject:.*yyy
! user5 user6 user7


(Recent versions of procmail play better with qmail, in particular
they can deliver directly to both mboxes and maildirs.)


> > It's possibile? How?
>
>cat >~user1/.qmail <./Mailbox
>|condredirect user234 `822field Subject | grep -q "xxx"`
>|condredirect user567 `822field Subject | grep -q "yyy"`
>EOF
>
>cat >~alias/.qmail-user234 <&user2
>&user3
>&user4
>EOF
>
>cat >~alias/.qmail-user567 <&user5
>&user6
>&user7
>EOF
-- 
John R. Levine, IECC, POB 727, Trumansburg NY 14886 +1 607 387 6869
[EMAIL PROTECTED], Village Trustee and Sewer Commissioner, http://iecc.com/johnl, 
Member, Provisional board, Coalition Against Unsolicited Commercial E-mail



Re: forwarding msgs analyzing subject text

2001-05-30 Thread Russell Nelson

Massimo Quintini writes:
 > I must forward msgs from 1 sender to groups of users  AFTER EXAMINING
 > SUBJECT TEXT
 > 
 > example:
 > 
 > the rcpt of msg is user1
 > IF subject contains the char string "xxx" THEN the msg must be forwarded
 > to users user2, user3, user4
 > IF subject contains the char string "yyy" THEN the msg must be forwarded
 > to users user5, user6, user7
 > ..and so on
 > 
 > It's possibile? How?

cat >~user1/.qmail <~alias/.qmail-user234 <~alias/.qmail-user567 <  http://russnelson.com
Crynwr sells support for free software  | PGPok | Microsoft rivets everything.
521 Pleasant Valley Rd. | +1 315 268 1925 voice | Linux has some loose screws.
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX  | You own a screwdriver.



Re: forwarding msgs analyzing subject text

2001-05-30 Thread Lukasz Gogolewski

Hello,

Just a wild idea - maybe you can use procmail to filter your messages.
I know that procmail has the best match & do features.

Also try qmail.org for any user contributed utilities.

- Lucas

On Wed, 30 May 2001 15:38:14 +0200
Massimo Quintini wrote:

MQ>I must forward msgs from 1 sender to groups of users  AFTER EXAMINING
MQ>SUBJECT TEXT
MQ>
MQ>example:
MQ>
MQ>the rcpt of msg is user1
MQ>IF subject contains the char string "xxx" THEN the msg must be forwarded
MQ>to users user2, user3, user4
MQ>IF subject contains the char string "yyy" THEN the msg must be forwarded
MQ>to users user5, user6, user7
MQ>..and so on
MQ>
MQ>It's possibile? How?
MQ>
MQ>I think with use of .qmail files in /home/user1 specifing a program
MQ>(perl?, C?) that executes the forwarding. It's right? How can I manage
MQ>in program Subject: To: contents?
MQ>
MQ>Thanks
MQ>
MQ>
MQ>--
MQ>Massimo Quintini
MQ>Osservatorio Astronomico Collurania Teramo
MQ>Via Mentore Maggini s.n.c. 64100 TERAMO (Italy)
MQ>Tel +39-0861210490  Fax +39-0861210492
MQ>http://www.te.astro.it
MQ>
MQ>
MQ>


_
Lukasz Gogolewski - [EMAIL PROTECTED]
Tel: 347.452.6837 - Fax: 718.504.4822
SupremeDesigns- www.supremedesigns.com



forwarding msgs analyzing subject text

2001-05-30 Thread Massimo Quintini

I must forward msgs from 1 sender to groups of users  AFTER EXAMINING
SUBJECT TEXT

example:

the rcpt of msg is user1
IF subject contains the char string "xxx" THEN the msg must be forwarded
to users user2, user3, user4
IF subject contains the char string "yyy" THEN the msg must be forwarded
to users user5, user6, user7
..and so on

It's possibile? How?

I think with use of .qmail files in /home/user1 specifing a program
(perl?, C?) that executes the forwarding. It's right? How can I manage
in program Subject: To: contents?

Thanks


--
Massimo Quintini
Osservatorio Astronomico Collurania Teramo
Via Mentore Maggini s.n.c. 64100 TERAMO (Italy)
Tel +39-0861210490  Fax +39-0861210492
http://www.te.astro.it