procmail
[Top] [All Lists]

some problems...

1997-05-20 10:10:00

First of all, DROPPRIVS doesn't work (or I'm unable to understand
documentation). I have a mailer:

Mhalyava,P=/usr/local/bin/procmail.halyava, F=qSpPls89DFMhun, S=10/30, R=20/40, 
M=100000, T=DNS/RFC822/X-Unix, U=halyava, A=procmail -p -Y -f $g -a $u $h 
halyava

a record in the mailertable:

halyava.ru halyava:/etc/procmailrcs/halyava

and /etc/procmailrcs/halyava with 

USER=halyava 
MAILDIR=/u/halyava
DROPPRIVS=yes  

in the begin of this file. Well. Anyway, this damn thing runs as root :(
And I want to run it only as user halyava... 

Second problem: I have a recepie:

:0
* (^TO:|for).*\/request@(halyava|freebee.techno|homepage.techno).ru
| /u/halyava/bin/halyava.pl

Usually, this works. But sometimes script halyava.pl fails for unknown
reasons (dunno why... it works fine when I run it maually and feed
the failing message into its stdin):

procmail: Matched "request(_at_)halyava(_dot_)ru"
procmail: Match on "((^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently
(-Resent)?)-To):(.*[^a-zA-Z])?):|for).*\/request@(halyava|freebee.techno|homepag
e.techno).ru"
procmail: [10415] Tue May 20 19:35:14 1997
procmail: Executing "/u/halyava/bin/halyava.pl"
procmail: [10415] Tue May 20 19:35:16 1997
procmail: Error while writing to "/u/halyava/bin/halyava.pl"

After that, procmail continues forward, and I'm getting strange results :(
When this message "Error while writing.." appear? Is it possible to trace
stderr of the script (if it's executed at all)? Is it possible to stop
procmail at this point, regardless of the error?

Third problem: I have some bouncing recepies. Sometimes they work:

:0
* !^FROM_DAEMON
* !^X-Loop: request(_at_)halyava(_dot_)ru
* (^To:|for).*\/([a-z,_A-Z,0-9]+)@(halyava|freebee.techno|homepage.techno).ru
| (formail -r -A"Precedence: junk" \
              -I"Subject: BOUNCE" \
              -A"X-Loop: request(_at_)halyava(_dot_)ru" \
              -A"Reply-to: postmaster(_at_)halyava(_dot_)ru" \
              -I"From: MAILER-DAEMON(_at_)halyava(_dot_)ru" ; \
           echo "\nThis is an auto-reply from HALYAVA server." ; \
           echo "==========================================\n\n" ; \
           echo "Sorry, there are no such user $MATCH.\n" ; \
           echo "Пользователь $MATCH отсутствует на сервере \"ХАЛЯВА\".\n" \
        ) | $SENDMAIL -t

But sometimes NOT! It says in the log:

procmail: Error while writing to " (formail -r -A"Precedence: junk" \
              -I"Subject: BOUNCE" \
              -A"X-Loop: request(_at_)halyava(_dot_)ru" \
              -A"Reply-to: postmaster(_at_)halyava(_dot_)ru" \
              -I"From: MAILER-DAEMON(_at_)halyava(_dot_)ru" ; \
           echo "\nThis is an auto-reply from HALYAVA server." ; \
           echo "==========================================\n\n" ; \
           echo "Sorry, there are no such user $MATCH.\n" ; \
           echo "Пользователь $MATCH отсутствует на сервере \"ХАЛЯВА\".\n" \
        ) | $SENDMAIL -t"

Glitch #4: ^MAILER_DAEMON is a good thing, but it kills mails from root@, and
it's bad... we have several recepients who write from root (don't tell me
"it's wrong" -- yes it is, but tell it to THEM). BTW, sometimes some blasted
old PC software, designed for UUCP uses root as standard name. How to
use MAILER_DAEMON and still accept mail from roots?

Last thing can be avoided, but simply annyoing: when I use

BOZOS=`echo \`cat /u/halyava/.bozos\`|tr ' ' '|'`
:0
* !^FROM_DAEMON
* !^X-Loop: request(_at_)halyava(_dot_)ru
* $(^From:|by|from).*\/${BOZOS}

$MATCH is empty :(

Frustrated...

-- 
Roman V. Isaev                         Moscow, Russia
========================================================
Homepage ------------> http://accessnet.ru/lp/rm/index.html
Obscene limericks ---> http://accessnet.ru/lp/rm/eng/elim.html
Firearms in Russia --> http://accessnet.ru/lp/rm/eng/firearms.html

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