Re: Appending contents to file
Danny de Bont <[email protected]> Thu, 21 Jan 2016 22:02:28 +0200
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <CAC1e3Yg-Oc00cxn7NiK=br66=SzwbVnzTZioE0w5fOqYnOZXRg@mail.gmail.com> |
Thank you Sir ... it works like a charm ... however I have noticed a problem with my implementation ... I have to type the whole command every time ... and most of the time I use my cell phone to do it ... How would I go about sending the the body as a variable to a BASH script? Thank you Danny On 21 Jan 2016 6:17 PM, "udi M" <[email protected]> wrote: > > > On 21/01/16 17:34, Danny de Bont wrote: > > Hi guys, > > Currently I am managing my Debian servers via simple commands in the > Subject of a mail message with an empty body ... > > Procmail would read the Subject and then perform a certain command ... > > For example: > If I want to start an Ftp server I would send an email with "Ftp start" as > the subject ... it works o.k for my needs ... > > However ... I want to send more complicated commands in the Body and not > the Subject ... > > For example: > When procmail gets an email with say "Execute command" in the Subject ... > I want procmail to pipe the command contained in the body (a one line BASH > command) to BASH ... > > Here is an example of a command I would send in the Body: > echo -e "\rLT 4>Body of email message\r\r" > /dev/ttyS1 > > Any pointers? > > Danny > > > :0 > * Subject: Execute command > { > :0 bf > | /bin/bash > } > > > > ____________________________________________________________ > procmail mailing list Procmail homepage: http://www.procmail.org/[email protected]://mailman.rwth-aachen.de/mailman/listinfo/procmail > > > > ____________________________________________________________ > procmail mailing list Procmail homepage: http://www.procmail.org/ > [email protected] > http://mailman.rwth-aachen.de/mailman/listinfo/procmail > ____________________________________________________________ procmail mailing list Procmail homepage: http://www.procmail.org/ [email protected] http://mailman.rwth-aachen.de/mailman/listinfo/procmail