Re: [exim] Exim rule for only accepting messages with pictur…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Tony Finch
Datum:  
To: Tomas Merlin
CC: exim-users
Betreff: Re: [exim] Exim rule for only accepting messages with picture attachment on an address
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 photo@???):
> - 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.
--
<fanf@???> <dot@???> 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}}