Discussion:
[exim] ACL to stop an account to send email
Luciano Rinetti
2018-02-02 18:56:05 UTC
Permalink
How can i write an ACL to stop an account to send email ?
And continue to use IMAP server to read email ?
The mail server (Ubuntu server) uses Exim4 4.74 and Courier-imap 4.8.0.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Jasen Betts
2018-02-02 23:10:05 UTC
Permalink
Post by Luciano Rinetti
How can i write an ACL to stop an account to send email ?
And continue to use IMAP server to read email ?
The mail server (Ubuntu server) uses Exim4 4.74 and Courier-imap 4.8.0.
Find out how that account is sending mail and block it. there's
probably some evidence in the received header.
--
This email has not been checked by half-arsed antivirus software
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Cyborg
2018-02-03 10:44:34 UTC
Permalink
Post by Luciano Rinetti
How can i write an ACL to stop an account to send email ?
And continue to use IMAP server to read email ?
The mail server (Ubuntu server) uses Exim4 4.74 and Courier-imap 4.8.0.
a) your courier server has nothing to do with exim, so : yes, you can.

b)

I your case, these acls seems to be the best attempts:

acl_check_auth:
acl_check_mail:
acl_check_rcpt:

If the account uses smtp-auth , just deny it there.
If the account uses a fixed sender address, use check_mail
and you guessed it, if you need to stop mails to specific recipients,
use check_rcpt

Any of these acls has unique variables that might come handy. Check with
the Exim-Docs

hint:

deny condition ${if eq{$..........}{"***@blah.xx"}{yes}{no}}


Marius
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Luciano Rinetti
2018-02-03 11:26:00 UTC
Permalink
Thank you Marius,
i think the b) option is the one i choose with acl_check_out:
Let suppose the account is:
***@domain.com
how should be wrote the acl in the ACL configuration section of exim.conf ?
Post by Cyborg
Post by Luciano Rinetti
How can i write an ACL to stop an account to send email ?
And continue to use IMAP server to read email ?
The mail server (Ubuntu server) uses Exim4 4.74 and Courier-imap 4.8.0.
a) your courier server has nothing to do with exim, so : yes, you can.
b)
If the account uses smtp-auth , just deny it there.
If the account uses a fixed sender address, use check_mail
and you guessed it, if you need to stop mails to specific recipients,
use check_rcpt
Any of these acls has unique variables that might come handy. Check with
the Exim-Docs
Marius
--
Cordiali Saluti / Best Regards

Luciano Rinetti
***@movimatica.com
Mob. 335.7878.602

Movimatica S.r.l.
www.movimatica.com - ***@movimatica.com
______________________________________________
sede Operativa:
Centro Pier della Francesca
Fabbricato 4, Scala P, 2° Piano
C.so Svizzera, 185 - 10149 Torino - Italy
Tel. +39 011 7767694 - Fax +39 011 746179
______________________________________________
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Jeremy Harris
2018-02-03 12:38:04 UTC
Permalink
Post by Luciano Rinetti
how should be wrote the acl in the ACL configuration section of exim.conf ?
http://exim.org/exim-html-current/doc/html/spec_html/ch-access_control_lists.html#SECTaclconditions
--
Jeremy
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Luciano Rinetti
2018-02-03 17:27:46 UTC
Permalink
To avoid the intricate grammar of the acl rules, i found this simple
suggestion:
https://www.tekovic.com/exim-acl-for-blocking-certain-senders
It worked the first time, the denied sender, can read its mailbox, but
it receive an "Administrative prohibition."
message when it try to send an email.
Of course i restarted exim4 with:
kill -HUP `cat /var/run/exim4/exim.pid`

Hope this may be helpful to others.
Post by Jeremy Harris
Post by Luciano Rinetti
how should be wrote the acl in the ACL configuration section of
exim.conf ?
http://exim.org/exim-html-current/doc/html/spec_html/ch-access_control_lists.html#SECTaclconditions
Post by Jeremy Harris
--
Jeremy
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Continue reading on narkive:
Loading...