Re: [exim] Attachment handling

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tor Slettnes
Data:  
Para: Steffen Heil
CC: exim-users
Asunto: Re: [exim] Attachment handling
Steffen Heil wrote:

> I need to fulfill the following:
> 1) I need to deliver a mail for a user, but I need to cut every
> attachment,
> which is not of a certain type. Every allowed attachment should be
> kept and
> delivered with the message.


If you want to block incoming mails w/non-desirable attachment "types",
you can do so via the Exiscan-ACL patch. Simply put something like the
following in your DATA ACL:

  deny
    message     = We do not accept ".$found_extension" attachments here.
    demime      = bat:btm:cmd:com:cpl:dll:exe:lnk:msi:pif:prf:reg:scr:vbs:url




If, on the other hand, you want to remove attachments, but still forward
the remainder of the message, then you might have to do so

    * either by piping the mail to an external program (e.g. "procmail")
      as the default "transport" (that program would also have to
      perform the delivery),
    * or by launching an external filter program via the
      "transport_filter" option (that program would simply print the
      modified message on standard output; Exim would proceed with the
      delivery at that point).


In either case, the logic for stripping attachments out of messages
would probably be best handled via "procmail" or a similar program, not
by Exim.


> 2) I need to deliver a mail for a user, WILL ALL ATTACHMENTS, but only if
> there is at least one attachment of a certain type.


Ditto.