procmail
[Top] [All Lists]

Re: Procmail isn't handing off mail like it should.

2003-06-17 10:59:57
On Mon, 16 Jun 2003 19:16:45 -0400 Lord Raiden 
<dragoncrest(_at_)voyager(_dot_)net> wrote:

Seeing your .fetchmailrc (remember to clean the usernames/passwords)
and
.procmailrc would probably help. It's hard to tell what's broken if we
don't know what you're telling the system to do.

Ok, here they are.  Here's the fetchmailrc file.

set logfile "/usr/home/megos/fetchmail.log"
set postmaster "megos"
set no bouncemail
set spambounce
set syslog

defaults no dns, protocol pop3, options fetchall, no keep

poll domain1 no dns
        user 'user1' there with password 'pass' is
        megos here
        user 'user2' there with password 'pass' is
        megos here

poll domain2 no dns
        user 'user1' there with password 'pass' is
        megos here
        user 'user2' there with password 'pass' is
        dad here
        user 'user3' there with password 'pass' is
        paul here

Ok, here's the .procmailrc

# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 800000
| /usr/local/bin/spamc

# Mails with a score of 15 or higher are almost certainly spam (with
0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/usr/local/megos/mail/spam

# All mail tagged as spam (eg. with a score higher than the set
threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
/usr/local/megos/mail/spam

# Work around procmail bug: any output on stderr will cause the "F" in
"From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "
  
  :0 fhw
  | sed -e '1s/^/F/'
}

# This addition filters viruses
:0 fhw
* B ?? ^Content-type: (audio|application)
* B ?? name=.*\.(com|exe|bat|scr|pif|hta|shs|vb[es]|ws[fh])\>
* Subject: *\/.+
/usr/local/megos/mail/viruses

For the local user megos all mail is delivered fine because it's
delivered locally.  User dad and user paul are brought in, supposidly
filtered, then forwarded off to a dumping account on another server
where they'll be totally free of spam and viruses.  Megos is being
filtered fine.  Users dad and paul aren't getting filtered at all.

You'll get answers faster (and probably more accurate) by posting this to
the list rather than to me directly. I'm buried in re-writing our online
order forms to meet Authorize.Net's new policies *AND* I'm no "expert" at
either fetchmail or procmail. But I use both and know what is required to
get questions answered. My message to the list was intended to get you to
re-ask your question on the list with the required info.

I'm copying this to the list as well as to you.

From the above info *I* am assuming that "megos" has write permissions to
the maildirs of "dad" and "paul". So, fetchmail is dumping their mail
directly into their folders. 

Procmail isn't processing their mail because it isn't being delivered to
user "megos" and the .procmailrc is in /home/megos and if there is a
.procmailrc in /home/ dad and /home/paul procmail doesn't use them because
the mail is being delivered *AS* user "megos" to those directories.

You say "paul" and "dad" are being forwarded -- *I* don't see any
forwarding happening in anything you sent along. In fact, I see no delivery
recipes except to the 'spam' and 'viruses' mail boxes. Where's the rest of
the .procmailrc?

You should probably:

a) Read the fetchmail docs and set up a system-wide fetchmail using
/etc/ftechmailrc and customized .procmailrc files in each users home
directory

or

b) Set all users to "is megos here" in your .fetchmailrc. This would
require using the To: and Cc: headers to properly direct the mail in your
.procmailrc which can be a real pain if someone sends a message to more
then one of you.

You may want to wait for other replies from the list. I'm running on about
4 hours sleep over the last 3 days and my mind is in "PHP" mode rather than
"Proxmail" mode.

G

-- 
Gerald V. Livingston II

Configure your Email to send TEXT ONLY -- See the following page:
http://expita.com/nomime.html

'74 Kombi (to be renamed - LifeSaver doesn't 'feel' right)
'69 Type 1 - AirBall the Rolling Basket Case
http://www.phorce1.com
http://www.buskatiers.org


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>