[Mimedefang] Saving selected attachs on disk?

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Mon Jun 18 02:51:38 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 17 Jun 2007, Fernando Gleiser wrote:

> I know it can be easilly done with MD, but I'm not sure about how I can do 
> it.

Hmm, I would rather deploy a specific MDA, e.g. using the so-called 
".forward" mechanism. Say procmail or some specially crafted script / 
program.

> The function's logic is very simple:
>
> if ($Recipient == "magicaccount at domain) {

                  eq

There is @Recipients as there might be multiple recipients.

> 	if (attach has xml extension) {
> 		save attach to disk
> 	} else {
> 		discard message;
> 	}
>
> 	deliver message;

Why deliver a message, when you already have the file?

> }
>
> the part I'm nor sure about is how do I get the file's name from $entity

2nd argument of filter().

Bye,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRnYrfOgJIbZtwg6XAQKR4Af/WvqC+QBvKhkkdcyI831I0Od4t4Vev6jI
JIpO9wjCN/+MycH5mfmOuENA1QPWTG8aXTrmqKkWbQxR7juuPcRktNB2SSuQ3gef
92/97232RV08ILU2hQiKYXWXYKjajr2bsZ2RqrSGGfdk5Le9khHKKVA+tn0xxnI9
Rqn345yK918QHGqBFtcqjVZZNciwdJzQ8+D4PnUqpFmjPjcRnDvflYu+0zZfsh3V
B2yZrz7AS7Ct2SqzPkDLyT6UM+RicQVU2+2wK9m0VL9xyNv97bRj6bzgZ6clcxa7
C8/WQzGJnCiEID7grixOBOLrzJTuSlFvZ45eS2qctPKW4hgmIzu8Mw==
=cVUw
-----END PGP SIGNATURE-----



More information about the MIMEDefang mailing list