"Server" via mail: /usr/spool/mail/me a named pipe

"Server" via mail: /usr/spool/mail/me a named pipe

Post by Brien M. Oberste » Tue, 05 Jul 1994 09:35:12



hi,
  I'm trying to set up some method of being able to
send mail to an account of mine and have it do stuff
as stated in the message.  If I decide that security is
a concern then I could check for a PGP signature on the
message.

Would I be able to accomplish this by making my mail file
(/usr/spool/mail/<user>) a named pipe?  Would I need
to write code to poll the file or would I just say
fgets() and It would hang until there's data?  Sorry
if some of these questions are elementary, but I don't
really know the easiest way to approach this proble

thanks,
  brien

PS Oh yeah, sendmail doesn't do the "|newprog" in the .forward thing
But that's pretty much exaclty what I want to do.

 
 
 

"Server" via mail: /usr/spool/mail/me a named pipe

Post by Raja B Dao » Tue, 05 Jul 1994 14:56:16



Quote:>Would I be able to accomplish this by making my mail file
>(/usr/spool/mail/<user>) a named pipe?  Would I need
>to write code to poll the file or would I just say
>fgets() and It would hang until there's data?

This should work, and no need to poll, a blocking read will do.
IMO, an easier method is to write a .forward file that pipes the
email to an executable file:

"| /path/executable"

Check the aliases(5) man page, on a SUN (at least) it explains that.

--Raja

-=-

Ohio Supercomputer Center                       http://www.osc.edu/lam.html

 
 
 

"Server" via mail: /usr/spool/mail/me a named pipe

Post by S. Wai » Fri, 08 Jul 1994 01:25:05



: This should work, and no need to poll, a blocking read will do.
: IMO, an easier method is to write a .forward file that pipes the
: email to an executable file:

: "| /path/executable"

: Check the aliases(5) man page, on a SUN (at least) it explains that.

An even better solution is to install 'procmail'..  A GREAT package
that'll make mail processing a breeze!

--Steve

 
 
 

1. problems piping from "split" to "mail" (split | mail)



: Hi !
:
: Can anybody give me a hint why the following doesnt work?
:

:
: Piping from uuencode to split works flawless (checked it with "tee"), but
: something doesnt work out in piping from split to mail. What happens is:
: the   uuencoded file gets split up correctly (lets assume its split into
: four pieces) and four mails are sent of to the correct address, but they
: are empty. Instead the four files are found on disk. Any ideas?

Yeah, you didn't read the man page for split:

 split(1)
split(1)

 NAME
      split - split a file into pieces

 SYNOPSIS
      split [-l line_count] [-a suffix_length] [file [name]]

      split [-b n[k|m]] [-a suffix_length] [file [name]]

      Obsolescent:
      split [-n] [file [name]]

 DESCRIPTION
      split reads file and writes it in pieces (default 1000 lines) onto a
      set of output files.  [...]

*sigh*

--Dave
--
http://armf18.dow.on.doe.ca:6700/~dbrown "On two occasions I have been asked
[by members of Parliament], 'Pray, Mr.  Babbage, if you put into the machine
wrong figures, will the right answers come out?' I am not able rightly to
apprehend the kind of confusion of ideas that could provoke such a question."

2. samba 2.0.6 & win 2k

3. Sendmail: mails rejected with "550-unrouteable mail domain "blade150.lafr.de""

4. Pizza box ATX cases?

5. Netscape News and Mail via "tredir" from "term"

6. Where to get a Copy of Linux

7. /var/spool/mail vs. /usr/spool/mail

8. Solaris x86 on old hardware

9. "mail" program - necessary to run mail server myself to e-mail to Internet?

10. "size" indication in "ls" of named pipe

11. Why does "cd /usr/////bin" = "cd /usr/bin"?

12. "/usr" versus "/usr/local"

13. GETSERVBYNAME()????????????????????"""""""""""""