On Fri, 1 Aug 2008, Tomas Merlin wrote:
>
> I'm trying to have a rule for exim to do the following for all
> messages send to a particular address (say [EMAIL PROTECTED]):
>   - check if the email has a picture attachment

in acl_smtp_mime write

  warn
    condition = ${if match{$mime_filename}{[.](jpg|gif|png)\$} }
    set acl_m_IMG = true

>   - reject if it doesn't and send an email to the sender explaining
> the rejection

in acl_smtp_data write

  deny
    message = Your message did not have an image attached
  ! condition = $acl_m_IMG

>   - send the message to a command using the pipe transport

Probably easiest to configure this using an entry in /etc/aliases, e.g.

  magic_local_part: | magic_command

Tony.
-- 
<[EMAIL PROTECTED]>   <[EMAIL PROTECTED]>   http://dotat.at/   ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}

-- 
## List details at http://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/

Reply via email to