Re: [exim] ACL testing

Pàgina inicial
Delete this message
Reply to this message
Autor: Heiko Schlittermann
Data:  
A: exim-users
Assumpte: Re: [exim] ACL testing
Daniel Botting via Exim-users <exim-users@???> (Fr 20 Sep 2019 12:20:17 CEST):
> Hi,
>
> I was kindly provided advice on an ACL to catch malformed messages that
> cannot be scanned, I have input placed the below in the config:
>
> check_mime:
>      deny condition     = ${if eq
> {$mime_content_type}{message/partial}{yes}{no}}
>      message            = MIME error: MIME type message/partial not allowed
> here
>
> I am looking to test this as if I'm sending from a host authenticating to
> the mailserver using it to send outbound.
>
> You can test an acl in an exim config file by:
>
> exim -C exim4.conf -bh 127.0.0.1
>
> How would I test an individual acl such as the above please.


Isolate the ACL into a config file as much as possible, that is, create
the smallest config possible, that still fits your need:


    acl_smtp_recipient = accept
    acl_smtp_mime = acl_check_mime


    begin acl


    acl_check_mime:
        deny condition     = ${if eq {$mime_content_type}{message/partial}{yes}{no}}
             message       = MIME error: MIME type message/partial not allowed here


        accept



And now test this with a handcraftes message stored in message.eml:


    swaks --body ./message.eml -f x@??? -t x@??? \
        --pipe 'exim -C exim.conf-test -bh 192.168.1.1'



    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -