I think I will have to implement my own SMTP Access Policy [1] in this case.

1- http://www.postfix.org/SMTPD_POLICY_README.html


Phil Stracchino <ph...@caerllewys.net> schrieb am Mo. 8. Okt. 2018 um 14:34:

> On 10/8/18 6:42 AM, Manuel Mely wrote:
> > Well the tables look basically like this:
> >
> > domain: id (binary), name (string), ... other fields
> > external_domain: id (binary), name (string)
> > domain_external_domain_association: id(binary), domain__id(binary),
> > external_domain(binary), receive (int), send (int)
> >
> > So, the idea is that virtual domains (domain table) can be configured to
> > send or receive from the internet or from/to allowed external domains.
> > Therefore the domain_external_domain_association table.
> > So i can ask something like, for the virtual domain X, is there any
> > association to external_domain entries.
> >
> > query= SELECT [OK OR REJECT GOES
> > HERE] FROM domain_external_domain_association  AS deda
> > JOIN domain as d ON deda.domain_id = d.id <http://d.id>
> > JOIN external_domain as ed ON deda.external_domain_id = ed.id
> > <http://ed.id> WHERE d.name <http://d.name> = 'HERE MY VDOMAIN' AND
> > deda.receive = 1 AND ed.name <http://ed.name> = '%d'
> >
> > d.name <http://d.name> => should be recipient domain.
> > ed.name <http://ed.name> => is the sender domain, which works fine with
> > %d, as I have another check before with a similar query.
>
> OK, so %d gets substituted with domain name?
>
>
> > The problem is, I want to use in a check_sender_access information about
> > the recipient (for the joins in the query), which i think does not work.
>
> Yeah, I don't see anything wrong with the query itself, but whether
> it'll work in a check_sender_access rule is another question, which I
> can't answer because I've never tried to do that.
>
>
> --
>   Phil Stracchino
>   Babylon Communications
>   ph...@caerllewys.net
>   p...@co.ordinate.org
>   Landline: +1.603.293.8485
>   Mobile:   +1.603.998.6958
>

Reply via email to