Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] Looking for email client or server

Expand Messages
  • Scott Ruckh
    Search the web for procmail?
    Message 1 of 7 , May 10 10:00 AM
    • 0 Attachment
      Search the web for procmail?
    • adamwaller_333
      ... Haven t heard of procmail yet, but I am willing see where I can get with it.
      Message 2 of 7 , May 10 10:23 PM
      • 0 Attachment
        --- In nslu2-linux@yahoogroups.com, "Scott Ruckh" <sruckh@...> wrote:
        >
        > Search the web for procmail?
        >

        Haven't heard of procmail yet, but I am willing see where I can get with it.
      • John
        ... The usual Unix solution would be to use fetchmail to download the e-mail from the pop server (gmail.com or whatever). Set up fetchmail to pass messages to
        Message 3 of 7 , May 10 11:05 PM
        • 0 Attachment
          On Mon, May 11, 2009 at 05:23:20AM -0000, adamwaller_333 wrote:
          > --- In nslu2-linux@yahoogroups.com, "Scott Ruckh" <sruckh@...> wrote:
          > >
          > > Search the web for procmail?
          > >
          >
          > Haven't heard of procmail yet, but I am willing see where I can get with it.

          The usual Unix solution would be to use fetchmail to download the
          e-mail from the pop server (gmail.com or whatever). Set up
          fetchmail to pass messages to procmail. The usual purpose of
          procmail is to sort e-mails, saving them to appropriate folders.
          However, you can use procmail to execute a program/script of your
          choosing when an e-mail arrives. To do this, you create a file
          (usually ~/.procmailrc) with "recipes". One recipe might look
          like:

          :0 c
          * ^From:.*my@...
          * ^Subject: my-requested-action
          | { cd ~/some/dir ; my-program ; my-2nd-program ; }

          For every e-mail that arrives from your cell phone address with the
          specified subject line, this recipe causes a subshell to start and
          it runs the commands given. The text of the e-mail will be provided as
          stdin to the subshell. Procmail has many options to customize the
          behavior.

          If you don't like either fetchmail or procmail, they are competitors
          to choose from.

          John
        • adamwaller_333
          I decided it would be easier to use gmail instead of hotmail. fetchamil says that it is recieving the emails but i seem to be missing something with procmail
          Message 4 of 7 , May 11 12:42 PM
          • 0 Attachment
            I decided it would be easier to use gmail instead of hotmail.
            fetchamil says that it is recieving the emails but i seem to be missing something with procmail

            Here is what my .procmailrc file looks like:

            # .procmailrc
            # routes incoming mail to appropriate mailboxes
            PATH=$HOME/usr/bin:/usr/local/bin:/opt/bin
            MAILDIR=$HOME/Mail
            PMDIR=$MAILDIR
            LOGFILE=$PMDIR/procmail.log
            LOGABSTRACT=NONE
            SHELL=/bin/sh
            #VERBOSE=NONE

            :0 c
            * ^From:.*myphonenumber@...
            * ^Subject: Test
            | { cd ~/home/scripts ; test }

            The script that i want to run in this case is "/home/scripts/test"
            I can exicute the script itself in the command line and it works just fine.

            Here is what my .fetchamilrc file looks like:

            poll pop.gmail.com with proto POP3 and options no dns
            user 'ampdog88@...' with pass "password" is 'root' here options ssl ss
            mda 'procmail'

            I run the command "fetchmail -f /home/.fetchmailrc -v" and i get this:

            # fetchmail -f /home/.fetchmailrc -v
            fetchmail: WARNING: Running as root is discouraged.
            fetchmail: 6.3.9 querying pop.gmail.com (protocol POP3) at Mon, 11 May 2009 13:36:54 -0600 (MDT): poll started
            Trying to connect to 209.85.199.109/995...connected.
            fetchmail: Issuer Organization: Equifax
            fetchmail: Unknown Issuer CommonName
            fetchmail: Server CommonName: pop.gmail.com
            fetchmail: pop.gmail.com key fingerprint: 44:A8:E9:2C:FB:A9:7E:6D:F9:DB:F3:62:B2:9E:F1:A9
            fetchmail: POP3< +OK Gpop ready for requests from 209.193.68.92 f21pf10166775rvb.5
            fetchmail: POP3> CAPA
            fetchmail: POP3< +OK Capability list follows
            fetchmail: POP3< USER
            fetchmail: POP3< RESP-CODES
            fetchmail: POP3< EXPIRE 0
            fetchmail: POP3< LOGIN-DELAY 300
            fetchmail: POP3< X-GOOGLE-VERHOEVEN
            fetchmail: POP3< UIDL
            fetchmail: POP3< .
            fetchmail: POP3> USER ampdog88@...
            fetchmail: POP3< +OK send PASS
            fetchmail: POP3> PASS *
            fetchmail: POP3< +OK Welcome.
            fetchmail: POP3> STAT
            fetchmail: POP3< +OK 1 1187
            fetchmail: POP3> LAST
            fetchmail: POP3< -ERR Not supported
            fetchmail: Not supported
            fetchmail: POP3> UIDL
            fetchmail: POP3< +OK
            fetchmail: POP3< 1 GmailId121312d47478408c
            fetchmail: POP3< .
            1 message for ampdog88@... at pop.gmail.com (1187 octets).
            fetchmail: POP3> LIST 1
            fetchmail: POP3< +OK 1 1187
            fetchmail: POP3> TOP 1 99999999
            fetchmail: POP3< +OK message follows
            reading message ampdog88@...@...:1 of 1 (1187 octets)
            #* flushed
            fetchmail: POP3> DELE 1
            fetchmail: POP3< +OK marked for deletion
            fetchmail: POP3> QUIT
            fetchmail: POP3< +OK Farewell.
            fetchmail: 6.3.9 querying pop.gmail.com (protocol POP3) at Mon, 11 May 2009 13:36:55 -0600 (MDT): poll completed
            fetchmail: normal termination, status 0
            #



            --- In nslu2-linux@yahoogroups.com, John <jl.050877@...> wrote:
            >
            > On Mon, May 11, 2009 at 05:23:20AM -0000, adamwaller_333 wrote:
            > > --- In nslu2-linux@yahoogroups.com, "Scott Ruckh" <sruckh@> wrote:
            > > >
            > > > Search the web for procmail?
            > > >
            > >
            > > Haven't heard of procmail yet, but I am willing see where I can get with it.
            >
            > The usual Unix solution would be to use fetchmail to download the
            > e-mail from the pop server (gmail.com or whatever). Set up
            > fetchmail to pass messages to procmail. The usual purpose of
            > procmail is to sort e-mails, saving them to appropriate folders.
            > However, you can use procmail to execute a program/script of your
            > choosing when an e-mail arrives. To do this, you create a file
            > (usually ~/.procmailrc) with "recipes". One recipe might look
            > like:
            >
            > :0 c
            > * ^From:.*my@...
            > * ^Subject: my-requested-action
            > | { cd ~/some/dir ; my-program ; my-2nd-program ; }
            >
            > For every e-mail that arrives from your cell phone address with the
            > specified subject line, this recipe causes a subshell to start and
            > it runs the commands given. The text of the e-mail will be provided as
            > stdin to the subshell. Procmail has many options to customize the
            > behavior.
            >
            > If you don't like either fetchmail or procmail, they are competitors
            > to choose from.
            >
            > John
            >
          • John
            ... If the problem is with procmail and not fetchmail, did you check procmail s log? You can also turn on verbose logging for better diagnostics However, also
            Message 5 of 7 , May 11 1:49 PM
            • 0 Attachment
              On Mon, May 11, 2009 at 07:42:27PM -0000, adamwaller_333 wrote:
              > LOGFILE=$PMDIR/procmail.log
              > LOGABSTRACT=NONE
              > SHELL=/bin/sh
              > #VERBOSE=NONE

              If the problem is with procmail and not fetchmail, did you
              check procmail's log? You can also turn on verbose logging for
              better diagnostics

              However, also check:

              On Mon, May 11, 2009 at 07:42:27PM -0000, adamwaller_333 wrote:
              > PATH=$HOME/usr/bin:/usr/local/bin:/opt/bin
              > [snip]
              >
              > :0 c
              > * ^From:.*myphonenumber@...
              > * ^Subject: Test
              > | { cd ~/home/scripts ; test }
              >
              > The script that i want to run in this case is "/home/scripts/test"
              > I can exicute the script itself in the command line and it works just fine.

              Note that "/home/scripts/test" is not in the path you
              specified. If this is the only problem, the solution might be as
              simple as:

              :0 c
              * ^From:.*myphonenumber@...
              * ^Subject: Test
              | /home/scripts/test

              However, note that you cd to "~/home/scripts". If you are
              running as root, then that directory expands (see shell documents
              for "tilda expansion") to "/root/home/scripts" and not
              "/home/scripts" where you said "test" resided. Does
              "/root/home/scripts" exist? If not, the shell would generate an
              error message when cd'ing to it.

              Also, examine the path:

              > PATH=$HOME/usr/bin:/usr/local/bin:/opt/bin

              The first element of the path, if you are running as root, expands
              ("variable expansion") to /root/usr/bin which probably doesn't
              exist. You likely wanted

              PATH=$HOME/scripts:/usr/bin:/usr/local/bin:/opt/bin

              or, maybe:

              PATH=/home/scripts:/usr/bin:/usr/local/bin:/opt/bin

              If you also want the path to include the current directory (i.e.
              whatever you have cd'd into), then add a final colon:

              PATH=$HOME/scripts:/usr/bin:/usr/local/bin:/opt/bin:

              John
            • adamwaller_333
              THANK YOU A LOT. That helped a lot. There is no /root/home but there is a /root and /home . I copied the .procmail and the .fetchamil to /root just in
              Message 6 of 7 , May 11 11:55 PM
              • 0 Attachment
                THANK YOU A LOT.
                That helped a lot. There is no "/root/home" but there is a "/root" and "/home". I copied the .procmail and the .fetchamil to /root just in case that would help make things easier, had them in the /home. I also fixed the PATH line. Works like I had hoped it would.



                --- In nslu2-linux@yahoogroups.com, John <jl.050877@...> wrote:
                >
                > On Mon, May 11, 2009 at 07:42:27PM -0000, adamwaller_333 wrote:
                > > LOGFILE=$PMDIR/procmail.log
                > > LOGABSTRACT=NONE
                > > SHELL=/bin/sh
                > > #VERBOSE=NONE
                >
                > If the problem is with procmail and not fetchmail, did you
                > check procmail's log? You can also turn on verbose logging for
                > better diagnostics
                >
                > However, also check:
                >
                > On Mon, May 11, 2009 at 07:42:27PM -0000, adamwaller_333 wrote:
                > > PATH=$HOME/usr/bin:/usr/local/bin:/opt/bin
                > > [snip]
                > >
                > > :0 c
                > > * ^From:.*myphonenumber@...
                > > * ^Subject: Test
                > > | { cd ~/home/scripts ; test }
                > >
                > > The script that i want to run in this case is "/home/scripts/test"
                > > I can exicute the script itself in the command line and it works just fine.
                >
                > Note that "/home/scripts/test" is not in the path you
                > specified. If this is the only problem, the solution might be as
                > simple as:
                >
                > :0 c
                > * ^From:.*myphonenumber@...
                > * ^Subject: Test
                > | /home/scripts/test
                >
                > However, note that you cd to "~/home/scripts". If you are
                > running as root, then that directory expands (see shell documents
                > for "tilda expansion") to "/root/home/scripts" and not
                > "/home/scripts" where you said "test" resided. Does
                > "/root/home/scripts" exist? If not, the shell would generate an
                > error message when cd'ing to it.
                >
                > Also, examine the path:
                >
                > > PATH=$HOME/usr/bin:/usr/local/bin:/opt/bin
                >
                > The first element of the path, if you are running as root, expands
                > ("variable expansion") to /root/usr/bin which probably doesn't
                > exist. You likely wanted
                >
                > PATH=$HOME/scripts:/usr/bin:/usr/local/bin:/opt/bin
                >
                > or, maybe:
                >
                > PATH=/home/scripts:/usr/bin:/usr/local/bin:/opt/bin
                >
                > If you also want the path to include the current directory (i.e.
                > whatever you have cd'd into), then add a final colon:
                >
                > PATH=$HOME/scripts:/usr/bin:/usr/local/bin:/opt/bin:
                >
                > John
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.