On Fri, Jul 21, 2017 at 10:36:47PM +0200, Michael Büker wrote:
> sorry to bump myself here, but can anyone say if what I'd like is 
> even possible with postfix?

Of course.

> Should this be a feature request to the devs, maybe?

If so that would be done here also.

> On 18.07.2017 13:02, Michael Büker wrote:
> >Here's two alternate ideas of how I would like postfix to behave 
> >instead:
> >
> >1. Postfix should reject all mail that doesn't have a "From: "
> >identity associated with a relayhost in
> >sender_dependent_relayhost_maps.

You'd want a check_sender_access restriction lookup against the 
sender address list.

A nice way to keep such a list in one file would be a sqlite 
database.  For the restriction it would simply return "OK":

[ main.cf ]

[ ... ]
sender_dependent_relayhost_maps =
        sqlite:/path/to/sender/relay-query
smtpd_sender_restrictions = check_sender_access
        sqlite:/path/to/sender/access-query, reject

The sender_dependent_relayhost_maps query would use the same sqlite 
backend and same basic query, but the access query would have a 
"result_format = OK".

(You can use any lookup table type you want, I am merely making a 
suggestion in the interest of having all the data in one place.)

> >2. Postfix should *only* relay through one of the hosts in 
> >sender_dependent_relayhost_maps (or deliver locally), and *never* 
> >try to deliver directly to some external domain's MX.

That one could be done with "default_transport = error:not allowed" 
and replacing sender_dependent_relayhost_maps with 
sender_dependent_default_transport_maps.
-- 
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to