>
>
> > If you want to choose transport based on sender, you probably want
> > "sender_dependent_default_transport_maps"
> >
> >
> http://www.postfix.org/postconf.5.html#sender_dependent_default_transport_maps
> >
>
>
It seems that this option doesn't support wildcards.
It says
>The tables are searched by the envelope sender address and @domain.

So, I set "discard" as default transport, and did one exception with this
option.

main.cf:
sender_dependent_default_transport_maps = hash:/etc/postfix/map
default_transport=discard

map:
@example.org    smtp

Sending mail from "example.org"
$ swaks --to u...@example.net --from r...@example.org -4 --server 127.0.0.1

Goes to SMTP:
postfix/smtp[4156]: 62D4D9F81D: to=<u...@example.net>, relay=none,
delay=0.04, delays=0.01/0.01/0.03/0, dsn=5.1.0, status=bounced (Domain
example.net does not accept mail (nullMX))

Sending mail from "example.net"
$ swaks --to u...@example.net --from r...@example.net -4 --server 127.0.0.1

Discard:
 postfix/discard[4162]: 2209D9F81D: to=<u...@example.net>, relay=none,
delay=0.01, delays=0.01/0/0/0, dsn=2.0.0, status=sent (example.net)

Reply via email to