procmail
[Top] [All Lists]

procmail inserts blank lines

2002-10-06 08:56:28
 Hi!


I recently installed procmail using a combo of:

1. clearing SPAM from three POP-Drops via "mailfilter", using fetchmail's  
"preconnect"

2. Collecting mails from three POP-Drops via "fetchmail". All Mails are  
directed to a user called 'hicking', and are being sent to this use via  
"exim".

3. The user 'hicking' has his own .forward (containing "|/usr/bin/ 
procmail") and .procmailrc file. The messages are then checked by header  
and body for SPAM and certain mailingslists and then direct to differents  
users. Personal mail goes to the user 'garvin', newsletter to  
'garvin_mailings', binary files to 'garvin_binary' and finally spam to  
'garvin_spam'.

4. Those users maildrops are then polled via qpopper to a remote system.


My problem now is that /var/mail/hicking should in no case contain any  
mail, because all mails shall be directed to different users. My first  
setup sorted fetchmail-received mails to the 'garvin' users. There I had  
the problem that /var/mail/garvin was filled up with single blank lines.  
One blank line for each received mail which was directed to another user.

So I rebuilt the whole system and created the dummy-'hicking' user.

Problem now is, that now /var/mail/hicking gets filled up with empty,  
single blank lines.

I suspect that I am using a wrong forwarding machanism or sort of. All  
users (garvin, garvin_binary, ...) have their own .forward file and an  
empty .procmailrc file. In this file I only set a logfile, so that I can  
see which mails the different users got.

All recipes of the main user 'hicking' can be split to four categories, I  
will give an example for each of this, so maybe you can find my mistake?

The header:

------------------
PATH=/usr/local/bin/:/usr/bin/:/bin
MAILDIR=$HOME/Mail
LOGFILE=/var/log/procmail.log
VERBOSE=yes
------------------

A recipe to kill certain mails (like /dev/null, but more cautious):

------------------
:0
* From:(_dot_)*bad_guy(_at_)somewhere\(_dot_)com
/var/mail/null
------------------

A recipe to forward by header-matches (the action contains no linebreak,  
just in case your mailreader breaks it):

------------------
:0 fw:
* ^Subject:.*spam
|formail -i "Envelope-To: garvin_spam(_at_)localhost" -A"X-Procmail:  
SPAM"|$SENDMAIL $SENDMAILFLAGS garvin_spam
------------------

A recipe to forward by multiple header matches:

------------------
:0 fw:
* Subject:.*being
* Subject:.*watch
|formail -i "Envelope-To: garvin_spam(_at_)localhost" -A"X-Procmail: MULTI- 
SPAM"|$SENDMAIL $SENDMAILFLAGS garvin_spam
------------------

A recipe to forward by body matches:

------------------
:0 Bfw:
* month
* money
* back
|formail -i "Envelope-To: garvin_spam(_at_)localhost" -A"X-Procmail: MULTI- 
BODYSPAM"|$SENDMAIL $SENDMAILFLAGS garvin_spam
------------------

And finally my workaround-expression for getting rid of those empty lines:

------------------
:0
* $< 5
/var/mail/blanks
------------------

So my blank lines get piped to the last file. I still wonder, where those  
do come from? Any suggestions or bugs? I had a look at the FAQ and also  
changed some portions of my filter (like stripping extra lines from the  
.rc and adding locks), but that didn't help...


-- 
Bye,                                            ...[ icq  #21392242 |
 Garvin                                       ...[ www.supergarv.de |

... *The totality is present even in the broken pieces. - Aldous Huxley*
_______________________________________________
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>