[Phpwm] Getting mail into a mysql database

David Goodwin david at codepoets.co.uk
Thu May 28 13:03:45 UTC 2009


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

Mike Tipping wrote:
> I have a simple support system that allows people to submit messages through
> a web form. These messages all go into a MySQL DB and are dealt with.
> 
> I now want to add messages from email so all messages that come to a
> specific email address are parsed into the same DB.
> 
> The mail server I'm using a the mo is Postfix.
> 
> Any ideas on the best way of doing this.


You have choices :)

a) Postfix can always_bcc to a particular domain (e.g. always_bcc =
roger at mail.archive; then configure a transport or alias so that's dumped
to a file. You'd want to setup a cron job or similar to scan a directory
and do something based on what is there.

b) Setup an alias as per previous email

c) Setup a content filter, which is an external script which receives
the email, can modify it / save it / whatever and then reinject it back
into the server for delivery. I've written plenty of these - but have
always used Perl for the job.... although I'm pretty sure PHP could do
it as well.

thanks,

David.

- --
David Goodwin

[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk       ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoei/AACgkQ/ISo3RF5V6bSgwCfftv3HDdn+/rey7plAld+LqCW
b1oAn3nA6RIkhXZpnEOQDtjNRIgKN1Ek
=dZTm
-----END PGP SIGNATURE-----



More information about the Phpwm mailing list