File etc procmailrc




















Better still, Procmail can be set up to write to a Qmail-style mail directory, usually called Maildir and located in users' home directories. Because it deals only with email delivered locally on your system, Procmail cannot be used for mail filtering if you use a client program such as Mozilla or Evolution to download email from your ISP's or company's server.

If you do not run your own mail server but still want to make use of Procmail's features, you will need to set up Fetchmail Mail Retrieval to download messages and pass them to the MTA on your system. The Webmin module for managing the system-wide configuration file is called Procmail Mail Filter, and can be found under the Servers category. Clicking on its icon will take you to the main page like the one shown in the screenshot below. All existing actions are listed, and below them are links for adding new actions of various types.

The Procmail module main page. Unlike other modules, this one will not complain if Procmail is not installed on your system. You should use the Software Packages module to check for and install the package that comes with your Linux distribution or operating system. If no package exists, you will need to download the source from www. Just installing Procmail is not enough for it to be actually used on your system though. By default, mail servers like Sendmail, Qmail and Postfix use their own standard mail delivery programs and not Procmail.

Individual users can change this by creating a. However, it is better to re-configure your MTA globally to use Procmail so that individual users do not have to set it up.

As long as you have the M4 files from which your primary Sendmail configuration file was built, setting up Sendmail to use Procmail is easy. Unfortunately, configuring the mail server by editing sendmail. However, all modern Linux distributions include the M4 files that you will need, either in the sendmail package or a separate one such as sendmail-cf. As the introduction to this chapter explains, the Procmail configuration file consists of a series of actions.

When email arrives, each is checked in order until one matches and its delivery mode carried out. Delivery takes place in the same manner and under the same restrictions as the delivery mode enabled with -d.

This option is incompatible with -p and -f. The following ones will only be parsed if the preceding ones have a not matching HOST-directive entry, or in case they should not exist.

If not even that can be found, processing will continue according to the default settings of the environment variables and the ones specified on the command line.

The -m option is typically used when procmail is called from within a rule in the sendmail. Bad substitution of "x" Not a valid environment variable name specified. Closing brace unexpected There was no corresponding opening brace nesting block.

Conflicting options Not all option combinations are useful Conflicting x suppressed Flag x is not compatible with some other flag on this recipe. Denying special privileges for "x" Procmail will not take on the identity that comes with the rcfile because a security violation was found e.

Descriptor "x" was not open As procmail was started, stdin, stdout or stderr was not connected possibly an attempt to subvert security Enforcing stricter permissions on "x" The system mailbox of the recipient was found to be unsecured, procmail secured it.

Error while writing to "x" Nonexistent subdirectory, no write permission, pipe died or disk full. Extraneous x ignored The action line or other flags on this recipe makes flag x meaningless. Failed to execute "x" Program not in path, or not executable.

Forced unlock denied on "x" No write permission in the directory where lockfile "x" resides, or more than one procmail trying to force a lock at exactly the same time. Incomplete recipe The start of a recipe was found, but it stranded in an EOF. Insufficient privileges Procmail either needs root privileges, or must have the right e uid and e gid to run in delivery mode. The mail will bounce. Invalid regexp "x" The regular expression "x" contains errors most likely some missing or extraneous parens.

Kernel-lock failed While trying to use the kernel-supported locking calls, one of them failed usually indicates an OS error , procmail ignores this error and proceeds. Kernel-unlock failed See above. Lock failure on "x" Can only occur if you specify some real weird and illegal lockfilenames or if the lockfile could not be created because of insufficient permissions or nonexistent subdirectories.

Lost "x" Procmail tried to clone itself but could not find back rcfile "x" it either got removed or it was a relative path and you changed directory since procmail opened it last time. Missing action The current recipe was found to be incomplete. Missing closing brace A nesting block was started, but never finished. Missing name The -f option needs an extra argument. Missing argument You specified the -a option but forgot the argument.

Missing rcfile You specified the -m option, procmail expects the name of an rcfile as argument. Missing recipient You specified the -d option or called procmail under a different name, it expects one or more recipients as arguments. No space left to finish writing "x" The filesystem containing "x" does not have enough free space to permit delivery of the message to the file.

I've also been recommended to use Python Milter, but don't have the time to learn Python right now. You would not need procmail for this. There are plenty similar setups with walkthroughs on the net, here is one using simple postfix content filters to do the job. Since you mention milters, you are probably using Sendmail it is good style to describe your software environment instead of letting your readers make guesses BTW - a similar setup should be possible with Sendmail as well, but presumably at a much greater level of complexity.

I am using postfix. THe only reason I mentioned milters was they were suggested as an idea to me a while back. Environment specs added above — Larry G. I see. So what's wrong with content filters then? I could be very wrong — Larry G. Show 2 more comments. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown. The Overflow Blog. The Mail::Procmailrc object is primarily a list of procmail component objects see below. When Mail::Procmailrc parses a procmail rc file, it decides which lines are variable assignments, which lines are comments, and which lines are recipes.

It preserves the order in which it encounters these procmail components and stores them as a list of objects in the main Mail::Procmailrc object. Sets the object's file attribute and parses the given file. If the file is not readable, returns undef. Normally not invoked directly. Returns a list reference.

Each item in the list is either a Variable, Literal, or Recipe object. Items are returned in the order they were originally parsed. You may assign to rc and rewrite the Mail::Procmailrc object thereby. Pushes the dat a um onto this object's internal object list. If the object being pushed is another Mail::Procmailrc object, that object's rc method is invoked first and the results are pushed.

Returns the path where this object will write when flush is invoked. If file is given an argument, the object's internal file attribute is set to this path. Writes the procmail object to disk in the file specified by the file attribute.



0コメント

  • 1000 / 1000