I send up this mailing list with help from everyone here.
This workd fine
from=`formail -rzx To:`
:0
* ^TO_test
* !^FROM_DAEMON
* !^X-Loop: test(_at_)mydom(_dot_)com
* $? fgrep "$from" $PMDIR/test.approved
| $SENDMAIL `cat $PMDIR/test.sendto`
:0Eh
* ^TO_test
* !^FROM_DAEMON
* !^X-Loop: test(_at_)mydom(_dot_)com
|(formail -r -A"Precedence: junk"\
-I"From: Auto Reply from mydom <postmaster(_at_)mydom(_dot_)com> "\
-I"Organization: US"\
-I"Subject:Your not a US" \
-A"X-Loop: test(_at_)mydom(_dot_)com";\
cat $PMDIR/test.txt )|$SENDMAIL -t
BUT>> I tried to add this to the first half and now it wont send
mail. In the log it looks like its working, but it never reaches
sendmail.
:0
* ^TO_test
* !^FROM_DAEMON
* !^X-Loop: test(_at_)mydom(_dot_)com
* $? fgrep "$from" $PMDIR/test.approved
# new
|(formail -r -A"Precedence: normal"\
-I"From: Auto Reply from mydom <postmaster(_at_)mydom(_dot_)com> "\
-I"Organization: US"\
-I"Subject:Your not a US" \
-A"X-Loop: test(_at_)mydom(_dot_)com"; )
# end new
| $SENDMAIL `cat $PMDIR/test.sendto`
:0Eh
* ^TO_test
* !^FROM_DAEMON
* !^X-Loop: test(_at_)mydom(_dot_)com
|(formail -r -A"Precedence: junk"\
-I"From: Auto Reply from mydom <postmaster(_at_)mydom(_dot_)com> "\
-I"Organization: US"\
-I"Subject:Your not a US" \
-A"X-Loop: test(_at_)mydom(_dot_)com";\
cat $PMDIR/test.txt )|$SENDMAIL -t
Thanks All
T. Bachis