Re: [exim] deny relying if sender is not in a domain

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Torsten Mueller
Date:  
À: exim-users
Sujet: Re: [exim] deny relying if sender is not in a domain
Sebastian Muñiz schrieb:

> Hi.
> I have been looking for a way to allow delivery of a mail
> but only if sender is in my domain.
> I´d like to restrict the mail addresses that my users can use in my lan and
> have a log of those mails sent.


I do it based on the $authenticated_id. All users who authenticate,
must use "their own domain" (which is selected by an MySQL lookup).

So my snippet looks like this (placed in acl_check_rcpt )

deny    authenticated  = *
      set acl_m9 = ${lookup mysql{select domain from mail where
         username = '${quote_mysql:$authenticated_id}'} {$value} fail}
      senders        = ! $acl_m9
      message        = Sender domain is not $acl_m9


Greetings Torsten