El 29/06/2016 a las 10:40 a.m., Fabián M Sales escribió:
> Hello list,
>
> In a top of my file config:
>
> localpartlist mail_list_this_server = /opt/exim/mail_list_this_server
>
> -
>
> I need to block outgoing mails which is not from an existing and valid
> email account on the server.
>
> Some of the tests performed is for example:
>
> I have this ACL:
>
> acl_not_smtp
> deny condition = ${if exists {/opt/exim/mail_list_this_server}}
> message = From no esta en el archivo mail_list_this_server.
> $sender_from
> !condition =
> ${lookup{${domain:$header_from:}}lsearch{/opt/exim/mail_list_this_server} {yes}{no}}
>
> logwrite = From no esta en el archivo mail_list_this_server
>
> My problem is if I use ${domain:$header_from:} only give a domain, but
> how I can see full from the account? (user@domain) to compare with my file
You can extract the full email address with ${address:$header_from}
>
> I can do this without comparing it to a file? any ideas?
It depends where do you have all valid mail accounts... If there is a
database, a ldap or local users there is were you check if there is a
valid user. You should also enforce some smtp auth to do this the right
way, and then compare the from header with this value (I think is
$authenticated_sender) to avoid forging a valid from header from another
user
>
>
> I have on My list /opt/exim/mail_list_this_server
>
> pepe@???
> juan@???
> ....
> ..
>
> Best Regards.
>
> Fabián Sales.
>