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

2004/5/20-21 [Computer/SW/SpamAssassin] UID:30333 Activity:high
5/20    Stupid procmail question from a procmail newbie:
        Sometimes a line has ':0'.  Sometimes it's ':0c:'.
        What's the significance of the 2nd ':'?
        \_ http://www.zer0.org/procmail/mini-faq.html#syntax-colon
           \_ Thanks!  -op
        \_ OK, so this isn't working for me.  I want, under a certain
           condition, for a message to go to a certain folder AND be
           forwarded to a certain address.  I have:
                :0
                * condition
                {
                :0c:
                ${MAILDIR}/file
                :0
                !name@domain.com
                }
            Any idea why this doesn't do what I want it to?
            \_ Are you sure your condition is correct?
                 \_ Yeah.  It actually works.  I was confused.  The problem
                    is in the log file.  It only seems to log the last
                    command.  So, in the case above, it logs that it
                    forwarded the mail, but not that it saved it to the
                    file.  It would be nice to log both, not only the
                    latter.
                        \_ There's a "VERBOSE" option for .procmailrc which
                           should come in handy.  Just turn it off when you're
                           done or bounces will show to senders.
                        \_ You can use AND clauses
                             \_ Isn't that only for the condition?  Or can
                                one use that for the actions too?
                :0
                * condition
                !name@domain.com
                        :0 A:
                        ${MAILDIR}/file
                   \_ This doesn't work, but thanks.  It only logs the
                      1st action, and it doesn't seem to even do the 2nd.
            \_ I'm getting a lot of SPAM at root on one of my computers.
               Is there a good procmail rule to say "only accept mail
               from my domain, say http://berkeley.edu, and unqualified names,
               like those that may orginate on the local machine?
                :0 :
                * ^From:.*berkeley.edu
                $MAILDIR

                # send all other mail to dev null
                :0
                /dev/null
                \_ Wont this trash mail that come from just "root" with no
                   @ sign in the From field?
                   \_ special case it.
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
	...
Cache (8192 bytes)
www.zer0.org/procmail/mini-faq.html#syntax-colon
Procmail FAQ This is a FAQ for Procmail, the mail processing utility for Unix. This Procmail FAQ is an attempt at answering the most often asked questions and straightening out the most frequent misconceptions about Procmail. This is no substitute for the manuals, and indeed presupposes some familiarity with the program's regular documentation. links to several tutorials which provide a sort of "quick start" documentation. Please note that this FAQ does not attempt to help you getting started with Procmail; refer to the tutorials mentioned above if that's what you're after. html -- this is a "virtual" URL which resolves to a different host. Please use this "virtual" URL rather than whatever your browser thinks it is you are currently looking at. This site can and will move in the relatively near future. original version 10) it has become a bit hard to know where exactly to expect information about some things. 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. Description, availability, and installation Procmail is a mail processing utility, which can help you filter your mail; sort incoming mail according to sender, Subject line, length of message, keywords in the message, etc; 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). The recommended version of Procmail to install is 3131 . The previous reasonably stable versions were 311pre4 and 311pre7. You would wait for 315, which should be announced shortly. html lists both implemented and planned changes relative to the latest release. Please note that some of the tips in this FAQ (or elsewhere) might not work for versions older than 311pre4. In particular, a great number of sites seem to be stuck on 310, which is a bad choice for a number of reasons. There should be plenty of incentive to upgrade to 3131 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. 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. Links section towards the end of this document -- but first, make sure you have found all of Procmail's manual pages; 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. 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. Q: How can I run an arbitrary Perl or shell script on all or selected incoming mail? 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. Procmail is excellent for fine-tuning and for sorting already identified spam to a separate folder (some sites will just tag suspect messages, but still let them through) but on today's Internet, proper antispam measures belong in the mail server layer (if not in the political layer). it contains pointers to the others under the "SEE ALSO" heading. 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). de> Locking strategies: dotlocking, fcntl() Default rcfile: $HOME/procmailrc System mailbox: /var/spool/mail/$LOGNAME For Formail and Lockfile, the companion utilities, it's harder to say as older versions (before 312) won't tell you themselves. Q: Please please tell me the address of the Procmail mailing list! 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. 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. Before you send stuff to a mailing list or a newsgroup, you need to know the basics of "netiquette," ie how to behave online. 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. 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; it's probably a good idea to indent it with a space or two and keep too much headers rather than too little) and a description of how you would like Procmail to react on it -- step by step -- can be an efficient way to get your message across. 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. 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. and other syntax issues Pro...
Cache (118 bytes)
domain.com
We suggest that you take advantage of these saving if you plan on keeping your domain name for the foreseeable future.
Cache (73 bytes)
berkeley.edu
For a text-only version of the campus home page, please follow this link.