Discussion:
Why is procmail not filtering my incoming mail
Harry Putnam
2017-01-06 00:16:30 UTC
Permalink
I've never had any trouble getting procmail setup and working .. in
many years of using it and thru many different versions of linux,
including gentoo.

Now on a newish gentoo host I've been setting up that host to retrieve
mail. Its running sendmail procmail and fetchmail.

When I retrieve mail with fetchmail ... procmail never process it.

I have .procmailrc of many years standing including many changes of
course. But nothing is happening with procmail at all.

No lines appear in .procmail.log and all mail lands at
/var/spool/mail/$myUSER

I've had so little trouble with procmail that I cannot even think how
to figure out what is happening.

head of .procmailrc below:

#shell-script-*--
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
SHELL=/bin/sh
DEFAULT=/var/spool/mail/$LOGNAME
MAILDIR=$HOME/spool/in
LOGABSTRACT=ALL
LOGFILE=/home/reader/t/var/log/procmail.log
LOG="$(echo
START
Processing <$FILENO>)
"
VERBOSE=YES

PSCRIPTS="/projects/perl"
SCRIPTS="/home/reader/scripts/"

[...]

Even if I have screwed up rule... I should at least see something in
procmail.log right?
Alan Clifford
2017-01-06 01:06:42 UTC
Permalink
Is sendmail (/usr/sbin/sendmail perhaps) a pointer to something else
rather than sendmail?


Alan

( Please address personal email to alan+1@ as email to lists@
is only read from my subscribed lists. )
--
Harry Putnam
2017-01-06 03:22:08 UTC
Permalink
Post by Alan Clifford
Is sendmail (/usr/sbin/sendmail perhaps) a pointer to something else
rather than sendmail?
No chance at all. The mail is being taken in by sendmail but no
evidence of any action by procmail
s***@shanew.net
2017-01-06 16:39:40 UTC
Permalink
The fact that you're not seeing anything in the procmail log makes me
think procmail isn't getting called correctly.

Could you paste the output of:
grep -A1 -B1 -i procmail /etc/mail/sendmail.cf
(or whatever the path to your main sendmail cf file if it's not standard)
Post by Harry Putnam
Post by Alan Clifford
Is sendmail (/usr/sbin/sendmail perhaps) a pointer to something else
rather than sendmail?
No chance at all. The mail is being taken in by sendmail but no
evidence of any action by procmail
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
--
Public key #7BBC68D9 at | Shane Williams
http://pgp.mit.edu/ | System Admin - UT CompSci
=----------------------------------+-------------------------------
All syllogisms contain three lines | ***@shanew.net
Therefore this is not a syllogism | www.ischool.utexas.edu/~shanew
Harry Putnam
2017-01-11 08:52:40 UTC
Permalink
***@shanew.net writes:

I'm sorry to have been so tardy responding but made a change in my
setup that took a while to get working. Basicly I scrapped fetchmail
and installed `getmail' .. using getmail to call procmail which seemed
to work just fine.

I'll have to run the new setup a while to see if there are problems I
haven't noticed .

I am or was a long time `fetchamil' user... since sometime in mid 90s
so was not eager to scrap it

However, it kind of makes the thread a moot point. Sorry I've wasted several
reponders time.

It's not really wasted .. at least not for me. I'm getting a better
understanding just reading the reponents comments.
Post by s***@shanew.net
The fact that you're not seeing anything in the procmail log makes me
think procmail isn't getting called correctly.
I thought so too. I did a fair bit of googling without a lot of
success. Once I finally got sendmail to work. Send was working ok.
Retrieval would stall and timeout at the point where fetchmail handed
off the incoming messages to local sendmail (submit.cf I guess)

I've since went a whole different route. I scrapped fetchmail
entirely, something I've been using for a lot of years.
Installed `getmail' studied up a bit on that syntax. And finally got
getmail to call procmail with incoming mail.

In summary:
So now I have sendmail working, scrapped fetchmail, getmail working
and procmail working. So I'm good to go.

However I would like to understand why I had the problems.
It will have to be another time when/if I go back to fetchmail or have
renewed problems with sendmail.
Post by s***@shanew.net
grep -A1 -B1 -i procmail /etc/mail/sendmail.cf
(or whatever the path to your main sendmail cf file if it's not standard)
First:
I am running the real sendmail on Debian. Here are the pkgs and versions
root # aptitude search -F '%p %v' '?installed'|sed 's/ //'|grep sendmail
libmail-sendmail-perl 0.79.16-1
sendmail 8.14.4-8+deb8u
sendmail-base 8.14.4-8+deb8u
sendmail-bin 8.14.4-8+deb8u
sendmail-cf 8.14.4-8+deb8u
sendmail-doc 8.14.4-8+deb8u

fetchmail 6.3.26-1+b1
procmail 3.22-24
and now:
getmail4 4.46.0-1+deb8

The output you requested:
------- ------- ---=--- ------- -------
root # grep -A1 -B1 -i procmail /etc/mail/sendmail.cf
Is kind of pointless now, since I've removed the procail entries
sendmail.mc
I started to include this but I've removed the procmail from my latest
config and did not keep a copy of the *.mc files that were failing to
call procmail.
------- ------- ---=--- ------- -------
Erich Veyhl
2017-01-06 19:54:24 UTC
Permalink
Date: Thu, 05 Jan 2017 19:16:30 -0500
Subject: Why is procmail not filtering my incoming mail
... Now on a newish gentoo host I've been setting up that host to retrieve
mail. Its running sendmail procmail and fetchmail.
When I retrieve mail with fetchmail ... procmail never process it...
No lines appear in .procmail.log and all mail lands at
/var/spool/mail/$myUSER...
...
Is procmail running at all -- can you run it manually? Is your new
host configured to look in the right place for .procmailrc?
Patrick Shanahan
2017-01-06 23:38:13 UTC
Permalink
Post by Harry Putnam
I've never had any trouble getting procmail setup and working .. in
many years of using it and thru many different versions of linux,
including gentoo.
Now on a newish gentoo host I've been setting up that host to retrieve
mail. Its running sendmail procmail and fetchmail.
When I retrieve mail with fetchmail ... procmail never process it.
I have .procmailrc of many years standing including many changes of
course. But nothing is happening with procmail at all.
No lines appear in .procmail.log and all mail lands at
/var/spool/mail/$myUSER
I've had so little trouble with procmail that I cannot even think how
to figure out what is happening.
#shell-script-*--
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
SHELL=/bin/sh
DEFAULT=/var/spool/mail/$LOGNAME
MAILDIR=$HOME/spool/in
LOGABSTRACT=ALL
LOGFILE=/home/reader/t/var/log/procmail.log
LOG="$(echo
START
Processing <$FILENO>)
"
VERBOSE=YES
PSCRIPTS="/projects/perl"
SCRIPTS="/home/reader/scripts/"
[...]
Even if I have screwed up rule... I should at least see something in
procmail.log right?
show "mda" for fetchmailrc

re sendmail, is it really sendmail or are you running postfix
--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Photos: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535
Photos: http://wahoo.no-ip.org/piwigo @ http://linuxcounter.net
Harry Putnam
2017-01-11 08:57:34 UTC
Permalink
Patrick Shanahan <***@gmail.com> writes:

[...]
Post by Patrick Shanahan
Post by Harry Putnam
Even if I have screwed up rule... I should at least see something in
procmail.log right?
show "mda" for fetchmailrc
Not sure what you mean her.... fetchmailrc?
Post by Patrick Shanahan
re sendmail, is it really sendmail or are you running postfix
Yes the real sendmail:
root # aptitude search -F '%p %v' '?installed'|sed 's/ //'|grep sendmail
libmail-sendmail-perl 0.79.16-1
sendmail 8.14.4-8+deb8u
sendmail-base 8.14.4-8+deb8u
sendmail-bin 8.14.4-8+deb8u
sendmail-cf 8.14.4-8+deb8u
sendmail-doc 8.14.4-8+deb8u

Please see my response Shanew.

I'm sorry to have wasted your time... but since posting this query
I've gone a different route, scrapping fetchmail for getmail.
@lbutlr
2017-01-09 09:39:51 UTC
Permalink
Post by Harry Putnam
Now on a newish gentoo host I've been setting up that host to retrieve
mail. Its running sendmail procmail and fetchmail.
Is Gentoo your local machine using fetchmail to get mail off the server?

Do you have a .forward to redirect the mail to procmail?

Is sendmail in a chroot jail?

Is fetchmail in a chroot jail?
--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.
Harry Putnam
2017-01-11 09:03:05 UTC
Permalink
Post by @lbutlr
Post by Harry Putnam
Now on a newish gentoo host I've been setting up that host to retrieve
mail. Its running sendmail procmail and fetchmail.
Is Gentoo your local machine using fetchmail to get mail off the server?
I was on a gentoo host, but now on debian Jessie
Post by @lbutlr
Do you have a .forward to redirect the mail to procmail?
No, just .procmailrc which is all I've ever needed to have procmail
working (There must have been different or better entries in
sendmail.cf)in the past
Post by @lbutlr
Is sendmail in a chroot jail?
No
Post by @lbutlr
Is fetchmail in a chroot jail?
No

Please see my response to Shanew in this thread. It tells why this
query is no longer in need of answers. Briefly put, I scrapped a long
used tool fetchmail, for getmail... which is configured to call
procmail and work just fine.

Sorry to have wasted you time and effort. However, just reading the
direction of these reponses give me a number of clues to a better
understanding of using sendmail.
Julian H. Stacey
2017-01-09 10:17:41 UTC
Permalink
Date: Mon, 9 Jan 2017 02:39:51 -0700
Post by Harry Putnam
Now on a newish gentoo host I've been setting up that host to retrieve
mail. Its running sendmail procmail and fetchmail.
Is Gentoo your local machine using fetchmail to get mail off the server?
Do you have a .forward to redirect the mail to procmail?
Is sendmail in a chroot jail?
Is fetchmail in a chroot jail?
check ownership of $HOME & $HOME/.procmalrc etc eg ~/mail directories.
(mine got changed recently when a script (not procmail associated) ran berserk,
& changed ownerships broke procmail)

Cheers,
Julian
--
Julian Stacey, BSD Linux Unix Sys Eng Consultant Munich
Reply below, Prefix '> '. Plain text, No .doc, base64, HTML, quoted-printable.
http://berklix.eu/brexit/#stolen_votes
Harry Putnam
2017-01-11 09:10:12 UTC
Permalink
"Julian H. Stacey" <***@berklix.com> writes:

[...]
Post by Julian H. Stacey
check ownership of $HOME & $HOME/.procmalrc etc eg ~/mail directories.
(mine got changed recently when a script (not procmail associated) ran berserk,
& changed ownerships broke procmail)
Pleae see my response to Shanew earlier up this thread to see why my
query has become a moot point for the time being.

I did check the things you list above... but also would have expected
some kind of error to clue me up.

It may well have been buried in the lengthy and tangled log output
from sendmail.

I've scrapped fetchmail (after many years of good use) amd switched to
`getmail', removed the procmail entries from sendmail.mc, re m4-ed
everthing, and now getmail is calling procmail with no problems.

Send and receive sendmail with no visible problems (so far).

Thanks for your time and effort.

Loading...