Script To Execute command via mail
    Greg Larkin 
    glarkin at FreeBSD.org
       
    Fri Aug 29 13:03:07 UTC 2008
    
    
  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
- --
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/OH0sRouByUApARAntMAJ43+cuEDrdEIZle4TTxa3orO+u05QCdHsOq
c1yjtkE0i7CN4dM04WgcfrM=
=0pjX
-----END PGP SIGNATURE-----
    
    
More information about the freebsd-questions
mailing list