If you really want no relayhost for a list of senders, this is not
easily done with Postfix. sender_dependent_relayhost_maps was
designed to do the exact opposite: specify a relayhost for a list
of senders.
If the sender list is REALLY small, you could use the pcre built-in
negation operator:
/etc/postfix/main.cf:
relayhost =
sender_dependent_relayhost_maps = pcre:/etc/postfix/sender_relay.pcre
/etc/postfix/sender_relay.pcre:
if !/[EMAIL PROTECTED]/
if !/[EMAIL PROTECTED]/
/./ [my.isp.com]
endif
endif
This sends mail from everyone but a few to [my.isp.com], but this
approach becomes unwieldy if you need to specify many senders.
Of course we could introduce a hack where a special lookup result
of "NONE" (or some other magic string) means don't use a relayhost.
Postfix would then look like this:
/etc/postfix/main.cf:
relayhost =
sender_dependent_relayhost_maps =
hash:/etc/postfix/sender_relay static:[my.isp.com]
/etc/postfix/sender_relay:
[EMAIL PROTECTED] none
[EMAIL PROTECTED] none
which is much cleaner.
Introducing "NONE" (or whatever) requires a source code change.
It also will raise expectations: people will try to use it in other
tables and be disappointed that it does not work there, just like
you tried to use "smtp:" in a place where Postfix expects "host"
or "host:port".
Wietse