Berkeley CSUA MOTD:Entry 27545
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2003/2/26-27 [Computer/SW/SpamAssassin, Computer/SW/Unix] UID:27545 Activity:nil
2/26    I have a file with all the mail I've got in the past few months
        (single file). I would like to run that file through procmail
        to produce several sorted files (in particular, I'm interested
        in the spam folder, but also want the other folders). Presumably
        there's a straightforward way to do this?
        \_ Answering my own question:
           http://mirror.ncsa.uiuc.edu/procmail-faq/mini-faq.html#split
ERROR, url_link recursive (eces.Colorado.EDU/secure/mindterm2) 2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2012/8/16-10/17 [Computer/SW/SpamAssassin] UID:54458 Activity:nil
8/16    Why does my Y! mail account always full of unfiltered spam
        mails (and they're obviously spams)? Why can't they do
        a better job like Google mail? Why does Y! mail charge
        for exporting email? Google mail doesn't do that.
	...
2010/8/13-9/7 [Computer/SW/SpamAssassin] UID:53924 Activity:nil
8/12    Ugg, no spamd any longer?  I figured I'd have to just give up on my
        soda address (sad, very sad) but Vacation doesn't seem to be installed
        either, so I can't even leave a mesg. to people telling them where
        tom mail me now.  Or can I ?  Any advice out there.  Or can we get
        spamassassin/spamd reinstalled or Vacation or... help....
        \_ Ha, gmail as spamassassin.  presently I am forwarding to gmail
	...
2009/12/8-26 [Politics/Domestic/Crime, Computer/SW/SpamAssassin] UID:53580 Activity:low
12/8    Old news, but new to me:
        Spam King kills himself and his family after escaping prison
        http://blogs.zdnet.com/security/?p=1553&tag=rbxccnbzd1
        Hopefully more spammers will take the hint.
        \_ I wish the same fate can go to all marketing and
           advertising folks, selling people things they don't
	...
2009/8/18-9/1 [Computer/SW/Database, Computer/SW/Languages/Perl] UID:53283 Activity:low
8/18    trying to write an intentionally slow regex.
        what is your worst regex ever?
        this is using MySQL regexp but I'll also accept
        perl format         --brain
        \_ you need to know how regex is implemented internally in order to
           have a worst regex in terms of running time. Something that uses
	...
2009/7/17-24 [Computer/SW/SpamAssassin] UID:53157 Activity:nil
7/17    Thanks to steven, et al. for restoring Soda. In lieu of www.csua providing
        status, could there be a text file with current status and future plans.
        I'm wondering if SpamAssassin is obsolete (and my procmailrc and scripts)
        and won't be restored, and what's filtering spam now.  thanks!
        \_ How do I buy steven a beer or donate gobs of money?
           \_ I got him a Hacker-Pschorr, he seems to like ales.  Prob IPAs
	...
2009/5/8-14 [Computer/SW/SpamAssassin] UID:52971 Activity:nil
5/7     Dear csua, looks like /usr/bin/spamc and /usr/bin/formail don't exist
        on the emailer. I'm getting a bunch of binaries not found error
        on my .procmail-log.
    \_ Complaining via motd is not a reliable way to be heard and get your
       stuff fixed. Try emailing us. --t
	...
2012/8/29-11/7 [Computer/SW/Security] UID:54467 Activity:nil
8/29    There was once a CSUA web page which runs an SSH client for logging
        on to soda.  Does that page still exist?  Can someone remind me of the
        URL please?  Thx.
        \_ what do you mean? instruction on how to ssh into soda?
           \_ No I think he means the ssh applet, which, iirc, was an applet
              that implemented an ssh v1 client.  I think this page went away
	...
2012/9/20-11/7 [Computer/SW/Unix, Finance/Investment] UID:54482 Activity:nil
9/20    How do I change my shell? chsh says "Cannot change ID to root."
        \_ /usr/bin/chsh does not have the SUID permission set. Without
           being set, it does not successfully change a user's shell.
           Typical newbie sys admin (on soda)
           \_ Actually, it does: -rwsr-xr-x 1 root root 37552 Feb 15  2011 /usr/bin/chsh
	...
2012/9/24-11/7 [Computer/SW/Languages, Computer/SW/Unix] UID:54484 Activity:nil
9/24    How come changing my shell using ldapmodify (chsh doesn't work) doesn't
        work either? ldapsearch and getent show the new shell but I still get
        the old shell on login.
        \_ Scratch that, it magically took my new shell now. WTF?
           \_ probably nscd(8)
	...
2012/3/29-6/4 [Computer/HW/Memory, Computer/HW/CPU, Computer/HW/Drives] UID:54351 Activity:nil
3/29    A friend wants a PC (no mac). She doesn't want Dell. Is there a
        good place that can custom build for you (SSD, large RAM, cheap video
        card--no game)?
        \_ As a side note: back in my Cal days more than two decades ago when
           having a 387SX made me the only person with floating-point hardware,
           most machines were custom built.
	...
2012/4/27-6/4 [Computer/SW/Languages/Misc, Computer/SW/Unix] UID:54372 Activity:nil
4/27    I wrote a little shell script to collect iostat data:
        #!/bin/bash
        DATE=`date +%m%d`
        DATADIR=/var/tmp/user
        OUTPUTFILE=$DATADIR/$DATE.out
        while true
	...
2012/1/27-3/26 [Computer/SW/Unix] UID:54299 Activity:nil
1/27    Interesting list of useful unix tools. Shout out to
        cowsay even!
        http://www.stumbleupon.com/su/3428AB/kkovacs.eu/cool-but-obscure-unix-tools
        \_ This is nice.  Thanks.
	...
2011/10/26-12/6 [Computer/SW/Unix] UID:54202 Activity:nil
10/24  What's an easy way to see if say column 3 of a file matches a list of
       expressions in a file? Basically I want to combine "grep -f <file>"
       to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
       I can do this with "egrep -f " and use regexp instead of strings, but
       was wondering if there was some magic way to do this.
       \_ UNIX has no magic. Make a shell script to produce the ask or egrep
	...
2011/5/19-7/13 [Computer/SW/Languages/Misc] UID:54115 Activity:nil
5/19    If script A runs, and calls script B ..... is it possible for me to exit\
        script A based on results of script B and not continue?
        \_ assume any shell
        \_ Yes.
           \_ without passing the result to some stupid temp file?
              \_ It sounds like you want "scriptb || exit", which will run
	...
2011/3/12-4/20 [Consumer/CellPhone, Computer/HW/Laptop] UID:54057 Activity:nil
3/12    I am curious what others think of tablets like iPad. They don't seem
        useful to me, but I use my computer for more than web browsing,
        Facebook, and Twitter. Why would I buy one instead of a laptop?
        They seem like a disabled laptop to me, but at a higher price.
        \_ You are most likely a coder.  iPad is not for coders.  They are
           what you get your non-technical friends.  Or musicians.  Look at
	...
Cache (8192 bytes)
mirror.ncsa.uiuc.edu/procmail-faq/mini-faq.html#split
In the Contents, I try to include a mention of all very frequently asked questions, even if they're in a subsection of a subsection (further adding to the bloat, I'm afraid). The below table of contents is an abridged "best of" instead of a full TOC. Or, how can I let several local users share the same POP mailbox at the upstream? Or, what is the most frequently made wrong assumption about mail delivery? Description, availability, and installation Procmail is a mail processing utility, which can help you filter your mail; Procmail is also a complete drop-in replacement for your MDA. See Infinite Ink's 78 Mail Filtering and Robots page for information about related utilities for various other platforms, and competing Unix programs, too (there aren't that many of either). You can download Procmail from the 79 main Procmail site or a number of mirrors. The Links page has a listing of 80 well-established mirror sites. The installation procedure is fairly straightforward but probably not the first thing you should attempt after you get a Unix account. If you feel adventurous, and have a friend with a working copy of Procmail for your type of operating system and hardware, you can just snatch her/his binary. However, you need to be aware that this defeats some checks which the installation program performs, such as determine where your mail spool is, what kinds of file locking should be employed, etc. Be particularly wary if you use NFS-mounted mail spool directories. The distribution comes with a 83 simple FAQ (locally produced HTML version -- the 84 text-only original is also available) which covers some issues faced when first getting acquainted with Procmail, such as how to view the manual pages, but it primarily addresses various installation problems. There's also answers to some very frequently asked questions, some of which are not dealt with in the document you're reading now. Please look at least at the TOC of the "original" FAQ as well. If you are new to Unix, you should probably read up on regular expressions (grep/sed/awk/perl etc) and a little on mail handling before attempting to tackle the Procmail manual pages. Related quick questions Q: I just downloaded Procmail, and want to learn to write my own recipes. A: The distribution package comes with some pointers, and includes manuals, of course. In addition to that, the 87 links page, which is a companion page to this FAQ has links to several good tutorials. There is also a small collection of links 88 near the end of this FAQ. There are many good tutorials and the purpose of this FAQ is not to compete with them, although some basic questions about Procmail's syntax recur in various on-line forums often enough to warrant their inclusion here as well. A: No, and it's somewhat unlikely that anybody would undertake a port. Excerpt: "I've seriously looked at porting it to NT, yes. Correction: Even simpler, you can leave out the condition lines completely if you want to do your action (in this case, run a shell script) unconditionally. More-complicated conditions can also be exit codes of other shell scripts or programs, or tests against the full body of the message, or against Procmail variables (Procmail's variables are also exported to the environment of subprocesses, so they are essentially environment variables. Finally, the action can be a nested block of more "recipes," as these condition-action mappings are called in Procmail jargon, to try if the outer condition is met. Obviously, you are not restricted to Perl or shell scripts. Anything you can run from a Unix command prompt can be run from Procmail, in principle, although running interactive programs doesn't usually make much sense. Make sure you find all of the pages procmail, procmailex, prorcmailrc, and regexp (or perhaps egrep or grep if you don't have a general introduction to regular expressions on your system). Q: Please please tell me the address of the Procmail mailing list! A: See answer to previous question, or the 104 periodic Mini-FAQ pointer posting. There used to be an alternative list, which was started by Rhett 'Jonzy' Jones, but it appears to be dead. There is now also a procmail-dev list for those interested in developing Procmail, and similarly a smartlist-dev for SmartList development. The 107 links page has links to various resources, including tutorials and examples. Please don't assume that the FAQ author is interested in inquiries about free consulting services. I read the Procmail mailing list and answer questions when I can. Several others do that too, so you stand a better chance of getting a decent answer by mailing the list rather than me. Keep the subscription instructions around, so you know how you got on the list in the first place -- usually getting off the list involves a very similar procedure. See also the 108 Unsubscribe FAQ * Procmail-specific instructions: + Don't ask questions which are answered in the documentation or in the FAQs. In addition to the time of others, you will be wasting your own, because most of the people who read your message will silently ignore you (or in bad cases mutter to themselves and killfile you for all eternity. Procmail users are particularly well equipped for this). Use the Subject header to label your message for the reader (not for yourself). Subjects like "Procmail," "Help," or "Problem" will be the first to be skipped by those who don't have the time to read all messages all the time. Similarly, in the message itself, you should describe your problem in concrete terms. Often a "model message" (trimmed down to a bare minimum; If you did try all of the above, please mention it in your message. At the very least, it tells people you did do your homework. By the way, the 109 debugging section below has some suggestions for additional things to try before you post. An additional tip: You should perhaps familiarize yourself with the FAQs for related Usenet newsgroups. A: The list is presently open for posting by anyone, including the spammers. This may have to be changed because of the rising tide of spam, which would be unfortunate, because many people might not want to be bothered to subscribe to the list in order to just ask one question. A: Try subscribing yourself anew and see if things start to change. SmartList is rather paranoid and will easily unsubscribe you if it gets bounces from your address. You can check there whether you have received the newest messages. The neat stuff starts when you want to ignore "pro-mail" and "ProMail" while still looking for anything else that begins with "pro" and also contains "mail", but this example ends here. Any beginners' book about Unix will contain a more detailed tutorial on regular expressions, most likely in conjunction with examples using the grep and sed programs. For reference, the manual page for egrep (an extended grep) at your site should contain a concise listing of regular expression operators. This regular expression will catch any sequence of horizontal whitespace (including none at all -- change the * to a + if you want to make sure there's at least one whitespace character). Some mailer programs use tabs instead of spaces in some places, others will attempt to "pad" all header fields with spaces to make the headers somewhat more readable. Finally, Subject headers are written by mere humans who sometimes press the space bar twice, perhaps only because they want to see if that will break your autoresponder script. Therefore, your Procmail recipes frequently need to match arbitrary runs of whitespace characters if you want them to work in all situations. File locking Under Unix and other multitasking operating systems, several processes can be running at once. This means several mail messages can be in delivery at the same time. Without Procmail, the default system mailer hopefully handles this just fine when mail is delivered to a system mailbox, but if two Procmails are delivering two messages to the same file more or less at the same time, you end up with problems. Don't use file locking when delivering to /dev/null (because then it doesn't matter if the message gets mangled, and you migh...