Wadeegh Hendricks wrote:
I thought I would resend this as it may be old and nobody looking at it,
if not and I am just being ignored then my aplogies :-)
My scenario is as follows:
I have an SMTP server setup to relay all mail to a server on the
internet that does virus and SPAM scanning as well as adding the
relevant disclaimers to emails. I have certain emails that cannot be
altered by disclaimers as they have to be a in a particular format and
the disclaimer server adds the standard disclaimer to all mails. Now
these mails are being sent from particular addresses to many diferent
recipients and these are the emails that I need to have sent directly
out and not relayed via the other server. I know the format for the
sender_dependent_relayhost_maps files is as follows:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
server.somedomain.com <http://server.somedomain.com>
How do I setup my sender_dependent_relayhost_maps file that will take
all mail from the address [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
and then take the domain of the recipient address, do a lookup for the
MX record and then send it directly to that domain's MX. For the next
address it would do the same process and check the MX and send to the
destination address MX record. Is there a way that you can tell it to
send to SMTP as you can in the /etc/postfix/transport file such as
"[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> smtp: " ??
Many Thanks in advance
Wadeegh
I don't think postfix has a specific feature to disable
relayhost based on sender name.
Here's some ways I can think of to solve your problem...
- use sender_dependant_relayhost_maps to send the exceptions
to an alternate relayhost that doesn't alter the mail. A
second instance of postfix on your server would do the job
nicely if you don't have an alternate relay host available.
- use a regexp sender_dependant_relayhost_maps to set
relayhost for everyone but the exceptions. Something like
this might work:
!/[EMAIL PROTECTED]/ [some.relay.host]
The expression gets a little more complicated if you need to
exempt several senders.
!/^(user1|user2|user3)@example\.com$/ [some.relay.host]
--
Noel Jones