can't get Postfix for mail relay to work exactly right

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Scott Henderson
Date:  
Subject: can't get Postfix for mail relay to work exactly right
Howdy. Question for postfix experts. Everyone else can ignore
and go on to the interesting stuff... :)

Been workin on my little SMTP relay project. I need to set up a
server to just relay SMTP mail to and from my Exchange server,
and to filter spam. I'm new to this. So far so good. Running
postfix on Mandrake. Can anyone help me with this problem,
though. I've set up postfix so it will only relay mail from
trusted hosts (a few on the internal LAN), and thus connections
from untrusted hosts (both those within and without) can only
mail to specified domains, namely the ones homed on the Exchange
server (call them test1.com and test2.com). Those emails to
test?.com are thus always forwarded to the Exchange server, and
any untrusted sender can't use the box to relay. Great. But if an
untrusted host (in my test situation, an internal box, on the
same subnet as postfix) tries to send to both a valid address in
a specified domain (e.g. ), and an invalid (relay)
address (say to , on the cc line),
using the postfix box as the smtp server, postfix doesn't deliver
the email at all, but just kicks back at the sender with a
rejection, because one of the addresses would have been an
illegal relay. I figured it would just relay the email to the
valid recipient, and reject sending to the other. But no. Can
it be set up to do this? Thanks for any help! Scott