[Lazarus] processing incoming mail
duilio foschi
octopushole at gmail.com
Sat Feb 20 23:08:45 CET 2016
in this article
http://www.thecodingmachine.com/triggering-a-php-script-when-your-postfix-server-receives-a-mail/
somebody shows a way to run a PHP script when the mail server (postfix in
this case) receives a mail.
Cant the same be done with a FPC console application ?
Thank you
Peppe
---
On Thu, 18 Feb 2016, duilio foschi wrote:
we have a linux server with domain (say)
>
> www.ourserver.com
>
> A mail server of some type is installed.
>
> The mail server uses the following mysql tables:
>
> +----------------------+
> | Tables_in_mailserver |
> +----------------------+
> | view_aliases |
> | view_users |
> | virtual_aliases |
> | virtual_domains |
> | virtual_users |
> +----------------------+
>
> Probably some of you will quickly recognize the sort of mailserver used
> here (I dont remember its name).
>
> By accessing these tables from MySQL I know how to create a new email
> account and how to forward emails sent to each mail account.
>
> Is there a way to programmatically intercept all incoming emails, process
> them and eventually store them in a database ?
>
You should define a filter for your MTA. The filter is then a program you
write, and this program can do whatever it wants. It will need to report
back to the MTA. Usually some pre-defined exit codes are used for this.
> If possible, I'd like to do that by Lazarus CGIs.
>
I don't think CGI is an option for such a system.
2016-02-18 10:23 GMT+01:00 duilio foschi <octopushole at gmail.com>:
> we have a linux server with domain (say)
>
> www.ourserver.com
>
> A mail server of some type is installed.
>
> The mail server uses the following mysql tables:
>
> +----------------------+
> | Tables_in_mailserver |
> +----------------------+
> | view_aliases |
> | view_users |
> | virtual_aliases |
> | virtual_domains |
> | virtual_users |
> +----------------------+
>
> Probably some of you will quickly recognize the sort of mailserver used
> here (I dont remember its name).
>
> By accessing these tables from MySQL I know how to create a new email
> account and how to forward emails sent to each mail account.
>
> Is there a way to programmatically intercept all incoming emails, process
> them and eventually store them in a database ?
>
> If possible, I'd like to do that by Lazarus CGIs.
>
> What exactly I'd like to do is to check for some special tokens in the
> incoming emails and store or forward them accordingly.
>
> Please instruct me re where to start.
>
> Thank you
>
> Peppe
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160220/ee66477d/attachment-0003.html>
More information about the Lazarus
mailing list