Wietse Venema:
> Erwan David:
> > On 15/07/11 22:25, James D. Parra wrote:
> > > Hello,
> > >
> > > I want to restrict postfix to only send mail to our domain, yet to no
> > > others. In other words, I want to set it up to not send mail to any
> > > outside address and only to accounts within our domain
> > > (anyuser@our_domain_only.com). This is a test server and is not a mail
> > > server, per say. Postfix will only be send mail for users who are logged
> > > into it. (SuSE 11.4)
> > >
> > > Could someone point me to a howto for mail restrictions when sending.
> > >
> > > Many thanks,
> >
> > Maybe have error as default transport, and a special transport (in
> > transport map) for local domain ?
>
> Yup, that would do the trick.
/etc/postfix/main.cf:
default_transport = error:5.7.1 This destination is prohibited.
transport_maps = hash:/etc/postfix/transport
/etc/postfix/transport:
example.com smtp:
This avoids regular expressions, and also has the same limitation
of not stopping user%[email protected] of [email protected].
To stop that, specify:
/etc/postfix/main.cf:
swap_bangpath = no
allow_percent_hack = no
Wietse