From owner-freebsd-questions@FreeBSD.ORG Fri Aug 29 13:12:53 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 202D8106566B for ; Fri, 29 Aug 2008 13:12:53 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id ED9A48FC23 for ; Fri, 29 Aug 2008 13:12:52 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from 68-189-244-97.dhcp.oxfr.ma.charter.com ([68.189.244.97] helo=Gregory-Larkins-Computer.local) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KZ3mU-000PkT-6q; Fri, 29 Aug 2008 09:12:51 -0400 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by Gregory-Larkins-Computer.local (Postfix) with ESMTP id 9223E2416224; Fri, 29 Aug 2008 09:12:50 -0400 (EDT) Message-ID: <48B7F5D3.7070901@FreeBSD.org> Date: Fri, 29 Aug 2008 09:12:51 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Marcel Grandemange References: <029801c909d6$67d76330$37862990$@za.net> <48B7F387.4060602@FreeBSD.org> <029d01c909d8$272dd1f0$758975d0$@za.net> In-Reply-To: <029d01c909d8$272dd1f0$758975d0$@za.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=1C940290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) Cc: freebsd-questions@freebsd.org Subject: Re: Script To Execute command via mail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 13:12:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marcel Grandemange wrote: > Yes the Server I want to do this on Is a FreeBSD 7.0 box, however cannot use > procmail as all mboxes are virtual. > Ie not real accounts all exist only on mysql, and since I changed from a > normall stock setup to using mysql procmail no longer will work. > All boxes are in form of user@domain.com > > > I really miss procmail! > > -----Original Message----- > From: owner-freebsd-questions@freebsd.org > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Greg Larkin > Sent: Friday, August 29, 2008 3:03 PM > To: Marcel Grandemange > Cc: freebsd-questions@freebsd.org > Subject: Re: Script To Execute command via mail > > Marcel Grandemange wrote: >> I have an interesting situation. > >> I have a windows based sms server, this machine works in the following > way. >> It watches a shared directory for txt files that must be formatted in >> certain way and periodically sends them off to mobile. > >> What I want to do is create a SMTP to SMS gateway. > >> Easy in theory! > >> Rite a script to map shared drive, ensure it's connected and write the txt >> files in dir. > >> However the second part I have no idea, somehow I need to watch the mbox >> file of say a e-mail account called "test" > >> And IF a mail arrives parse it look for a security key if exists convert > to >> txt file and copy to shared dir. > > > Hi Marcel, > > Do you have a FreeBSD machine in the mix somewhere? If so, this sounds > like a job for procmail: http://en.wikipedia.org/wiki/Procmail > > Using procmail, you can create a script to process incoming emails and > process/reformat them as you see fit. > > Best regards, > Greg Hi Marcel, What mail server are you using with MySQL? I use a tool called vexim (http://www.freshports.org/mail/vexim/) that integrates Exim with MySQL and also supports virtual mailboxes. However, I can use procmail with any of the mailboxes, too. If you post more details about your setup, someone here might be able to figure out a solution so you can use procmail. Best regards, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIt/XT0sRouByUApARAnCaAJwJMdYxFe8RHlegKkf2KTcgSdUNNwCfbqGZ Swzyy+ALyLwdTFqDDOE4NAQ= =qT8u -----END PGP SIGNATURE-----