[Wylug-help] EXIM - append advert
James Holden
wylug at jamesholden.net
Sun Aug 3 22:18:52 BST 2008
On Wed, Jul 30, 2008 at 09:31:01AM +0100, Gary Stainburn wrote:
> Hi folks.
>
> I've been asked to add a gif containing an advert to all outgoing emails.
>
> Anyone got any ideas how to do this using Exim?
>
> I need to be able to add the gif reliably catering for plain text, HTML and
> MIME.
>
> Also, I'd like to have a whitelist and add other filters so that it doesn't
> get added to internal emails or existing business partners, .vacation
> messages, Bulk emails (which we don't do, but would be nice to cater for
> anyway) and mailing list stuff.
>
> The main question is does anyone have any good examples of how to mangle
> outgoing emails - I figure it's going to be something to do with the smtp
> transport as that would immediately ignore all local deliveries
Hi Gary,
I was rather hoping somebody would answer this with a pointer to some
magic software that would do this for you :-/
But they didn't :)
I've written stuff in PHP to handle multipart MIME messages and furtle
with the contents and it's a broad and complex subject.
Apart from the fact that the ad will probably be a dumb idea, it's
almost certainly going to be easier to just get each mail user to put
the required copy in their own mail client. You may be able to do this
with some sort of group policy if they're Windows users on a domain.
For starters, you're not going to be able to add it to a plain text
email without transforming it to a multipart/related with an HTML
version of the original email as a text/html attachment and the GIF
comprising a multipart/related part.
Bodging it into an HTML email will require you identifying the body HTML
part, and converting it to multipart/related email with the GIF
correctly inserted.
It's a decidedly non-trivial effort all said.
There are PHP libraries that you could use, but it's quite a mammoth
task.
Cheers,
James
> --
> Gary Stainburn
>
> This email does not contain private or confidential material as it
> may be snooped on by interested government parties for unknown
> and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://list.wylug.org.uk/pipermail/wylug-help/attachments/20080803/002fa4af/attachment.bin
More information about the Wylug-help
mailing list