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...
|