I can process my mail!

From: Gregory L. Hansen (glhansen_at_steel.ucs.indiana.edu)
Date: 12/03/03

  • Next message: Alan Connor: "Re: I can process my mail!"
    Date: Wed, 3 Dec 2003 17:03:46 +0000 (UTC)
    
    

    I figured out how to pipe mail to my own scripts! I'd tried it before,
    with a .forward that looks like

    "| /N/fs17/glhansen/Steel/mailincrement"
    "| grep -i Subject: > a2"
    "| /usr/local/nmh/lib/slocal -verbose -user glhansen"

    Nothing happened, although grep saved subject lines to the file a2
    reliably.

    The secret was not to pipe it to my script, but pipe it to a shell with
    the script as an argument.

    "| /bin/bash /N/fs17/glhansen/Steel/mailincrement"

    And that works! I got nine messages in about the past half hour, although
    eight of them were deleted by the slocal filter.

    The first thing I want to do is kill any messages with a particular 109 KB
    virus attached, which I've saved in its encoded form, a sample for
    comparison. But between those messages and test messages I've sent
    myself, I'm having trouble figuring out the rules for finding the
    boundaries that begin each new attachment. Although the end boundary
    follows from the begin. And my book Inside Unix says things about
    uuencoded attachments that don't look like anything I see in my mail.
    It's easy to find by eye, but I'm not sure how to automate that in a way
    that won't confuse boundaries for message text.

    Is there any good reading material on mail? I know O'Reilly has a book on
    sendmail, but I'm not that interested in sendmail in particular. I more
    want something about all things mail, for people whose responsibilities
    are a little lighter than setting up and administering the company
    servers.

    -- 
    "The polhode rolls without slipping on the herpolhode lying in the 
    invarible plane." -- Goldstein, Classical Mechanics 2nd. ed., p207.
    

  • Next message: Alan Connor: "Re: I can process my mail!"

    Relevant Pages

    • Re: Help with Sending Multiple Emails!
      ... > messages from a script. ... using one of the several available email modules available on the CPAN. ... All you can check is that the pipe to sendmail ... and that the pipe was closed correctly. ...
      (comp.lang.perl.misc)
    • Re: SIG{PIPE}
      ... I checked my script and log written by script and I thing this is not a reason. ... I use pipe only for send data to sendmail and this work already. ...
      (comp.lang.perl.misc)
    • accessing a pipe from TCL and C, hang in `close/exit
      ... I have a TCL shell script which opens a socket to some remote host, ... and opens a read-converter pipe. ... data arrives on the remote host. ... Now I want to close the channel from C++: ...
      (comp.lang.tcl)
    • Re: [PATCH] x86: update vmlinux.lds.S to place .data section on a page boundary
      ... and this prevents kexec from loading a new kernel. ... its the standard of the script. ... on PT_LOAD sections being on page boundaries. ... and so we can't load any kernels with kexec at the moment. ...
      (Linux-Kernel)
    • Re: how do i..
      ... On Sun, 2004-08-22 at 18:31, Mr. Oberoi wrote: ... > error results from the program(shell script) to a file. ... scriptname> filename 2>&1 ... the pipe character is used to "chain" the output of the command on ...
      (Fedora)