Programmatically receiving emails

From: Andreas Hoeschler (ahoesch@smartsoft.de)
Date: Thu Dec 18 2003 - 08:06:42 EST


Dear managers,

we will soon receive data via email (every few minutes) that should
automatically be imported into a database. That's why we need to
integrate a corresponding C-Program somehow into the mail delivery
mechanism. We are using Postfix 2.0.13 on Solaris 8. The emails that
are to be imported are sent to a specific email address
supplierdata@ourdomain.com. Delivery to all other email accounts
xxx@ourdomain.com should stay as it is now.

What is the easiest way to get this working? I have read
/usr/share/src/postfix-2.0.13/README_FILES/FILTER_README and am
considering to setup things as follows:

/etc/postfix/main.cf:

         content_filter = scan:localhost:10025

/etc/postfix/master.cf:

         scan unix - - n - 10 smtp

         localhost:10025 inet n n n - 10
spawn
             user=filter argv=/some/where/filter localhost 10026
         localhost:10026 inet n - n - 10
smtpd
             -o content_filter=
             -o local_recipient_maps=
             -o relay_recipient_maps=
             -o myhostname=localhost.domain.tld
             -o smtpd_helo_restrictions=
             -o smtpd_client_restrictions=
             -o smtpd_sender_restrictions=
             -o smtpd_recipient_restrictions=permit_mynetworks,reject
             -o mynetworks=127.0.0.0/8

Here /some/where/filter is a C-Programm that listens on port 10025 and
forwards everything it gets to port 10026 while doing the database
import stuff in the meanwhile. Would this work? Any (better)
suggestions would be greatly appreciated.

Regards,

    Andreas
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:27:43 EDT