procmail
[Top] [All Lists]

mailing list. New Problem

1996-12-03 08:58:46
WOW! This works great, but now I have a new problem.
When the mail is rejected because it is not in the 'ok'
file, it is handled by mylast receipt which handles my 
non-existant user mail. Is there a flag  in the receipt
that I can use with this. One that works like.
IF FALSE DO??

 from=`formail -rzx To:`
 
 :0
 * ^TO_test
 * $? fgrep "$from" $PMDIR/ok
 | $SENDMAIL `cat $PMDIR/a.list`

### IS THERE A FLAG I CAN USE ON THIS RECEIPT BELOW THAT 
### WILL WORK ONLY IF THE ABOVE RECEIPT FALLS THROUGH

:0 ic
* ^TO.*
*!^FROM_DAEMON
*!^X-Loop: 
|(formail -r -A"Precedence: junk"\
-I"From: <postmaster(_at_)mydom(_dot_)com> "\
-I"Subject: Undeliverable" \
-A "X-Loop: test(_at_)mydon(_dot_)com";\
cat $FILEDIR/badadd.txt )|$SENDMAIL -t


Thansk again
T. Bachis






On Mon, 2 Dec 1996 tbac(_at_)mail(_dot_)idt(_dot_)net wrote:

BUT I want it only to work if certain people send mail to it.
So I added this, but it doesn't work.


:0
* ^TO_test
* ^FROM.*($PMDIR/ok)
| $SENDMAIL  `cat $PMDIR/a.list`


from=`formail -rzx To:`

:0
* ^TO_test
* $? fgrep "$from" $PMDIR/ok
| $SENDMAIL `cat $PMDIR/a.list`

This should work. $PMDIR/ok should contain one address per line.

I'm sure it can still be improved.

--
 

<Prev in Thread] Current Thread [Next in Thread>