Postfix-postfwd testing

Hi,

I'm trying to test rules set up with postfwd on postfix (under debian).

Just to try I took this rule:

id=RULE01 ; sender==user@lillefan.com ; action=REJECT not allowed

in postfwd.cf.

Restarted postfix. Postfwd is started with this command:

#postfwd -d -i 127.0.0.1 -p 10040 -u root -g root -f /etc/postfwd.cf

The rule works fine if I test it with telnet. If I try it with a script that uses mailx nothing happens. All the mail are still delivered with mailx. In telnet I am refused to send the mail.

Mailscript: (run by user, and tried to run as root too)

#!/bin/bash
i=0
while [ $i != 2500 ]; do
echo test | /bin/mail -s "test message$i" "user@lillefan.com"
i=$(( $i + 1 ))
done;

Who is recipient in the case of my script? Is that the problem? I thought if I'm user@server:~$ then "user" is recipient when I run the script?

In telnet I do this:

telnet localhost 25
mail from: user@lillefan.com
rcpt to: user2@lillefan.com
data
hello from user!
.
quit

In telnet I get this: "Recipient address rejected: not allowed". With my bash script I get all my mails delivered without protest.

I should also add that this system is not up in the network. It's just for testing. Except this problem with the postfwd rules postfix works fine and as far as I can see the logs are OK.

Grateful for any and all ideas and suggestions.
Thanks!
//fisfia