procmail
[Top] [All Lists]

Re^2: chmod immediately?

1997-07-14 16:44:00
Dave/WebMaster <ddave(_at_)ddave(_dot_)com> wrote:

Dave/WebMaster> On Sun, 13 Jul 1997, Timothy Luoma wrote:
Dave/WebMaster> 
Dave/WebMaster> >       Author: Mitsuru Furukawa <<furu(_at_)009(_dot_)com> 
Dave/WebMaster> ---
Dave/WebMaster> > or (better)
Dave/WebMaster> > 
Dave/WebMaster> > 
Dave/WebMaster> > :0
Dave/WebMaster> > 
Dave/WebMaster> > <<snip>
Dave/WebMaster> > 
Dave/WebMaster> > echo "<<h1>END of WEB<</h1>" >> $WEB/$FILE.html && chmod a+r 
$WEB/$FILE.html
Dave/WebMaster>                                                   ^^
Dave/WebMaster> 
Dave/WebMaster> I'm lost here. Why the && ?

It's not me:->

Dave/WebMaster> 
Dave/WebMaster> I like the idea of email to web. In the last few months I've 
seen some 
Dave/WebMaster> very brief discussions on recipes. Can you point me to any 
resources that 
Dave/WebMaster> delve into it a bit more? Is this something procmail can handle 
or do I 
Dave/WebMaster> need to dig into perl for ideas?

Email-to-web is completely a procmail script job
while web-to-email(replying it on web) may involve cgi programming.
Here is a part of my very simple email-to-web recipe
(web-to-email & japanese related parts excluded; still developing).
It works fine with Netscape, but not so with IE.
IE erases, for example, "<myaddres(_at_)myhome(_dot_)com>" completely;-<
I first thought of using sed to replace with &lt; and etc,
but I gave up because it occasionally garbles 2-byte Japanese chars.
Any idea?

-----
   FILE=`date "+%y%m%d.%H%M%S.$$"`   # Thanks for suggestions!
   WEBMAIL=$HOME/public_html/restricted
   :0h
   HEAD=|formail -X ""               # Thanks to the manual:->
   :0b
   BODY=|formail -I ""               # Thanks to the manual:->
   UMASK=022   # set less paranoid umask to create world readable file
               # thanks to Philip Guenther! it's working like a devil!!!
  :0ciw
|echo "Content-Type: text/html\n\n" > $WEBMAIL/$FILE.html;\
echo "\n" > $WEBMAIL/$FILE.html;\
echo "<html><head><title>MAIL2WEB</title></head>\n" >> $WEBMAIL/$FILE.html;\
echo "<body BGCOLOR=\"#FFFFA8\">\n" >> $WEBMAIL/$FILE.html;\
echo "<h3>MAIL2WEB</h3>\n" >> $WEBMAIL/$FILE.html;\
echo "<FORM>\n" >> $WEBMAIL/$FILE.html;\
echo "<TEXTAREA ROWS=5 COLS=100>\n" >> $WEBMAIL/$FILE.html;\
echo "$HEAD" >> $WEBMAIL/$FILE.html;\
echo "</TEXTAREA>\n" >> $WEBMAIL/$FILE.html;\
echo "<TEXTAREA  ROWS=10 COLS=100>\n" >> $WEBMAIL/$FILE.html;\
echo "$BODY>" >> $WEBMAIL/$FILE.html;\
echo "</TEXTAREA>\n" >> $WEBMAIL/$FILE.html;\
echo "</FORM>\n" >> $WEBMAIL/$FILE.html;\
echo "<h3>END of MAIL2WEB</h3>" >> $WEBMAIL/$FILE.html;
echo "</body></html>\n" >> $WEBMAIL/$FILE.html;\
     UMASK=077    # restore the paranoid mask
                  # thanks again
-----

_/_/_/      Mitsuru FURUKAWA      _/_/_/
_/_/_/        Tokyo, Japan        _/_/_/
_/_/_/     mailto:furu(_at_)009(_dot_)com    _/_/_/
_/_/_/  http://www.009.com/furu/  _/_/_/

<Prev in Thread] Current Thread [Next in Thread>