-----Original Message-----
> From: [EMAIL PROTECTED] [mailto:owner-postfix-
> [EMAIL PROTECTED] On Behalf Of Jevos, Peter
> Sent: Thursday, October 23, 2008 9:56 AM
> To: Postfix users
> Subject: RE: Altermime and postfix - permission denied, Command died
> with status 1
> 
> 
> > Hi all
> >
> > I installed altermime to the working postfix + amavisd mail system
> >
> > Unfortunatelly altermime is not working properly.
> >
> > cat /etc/postfix/disclaimer
> > #!/bin/sh
> >
> > # System dependent settings
> > ALTERMIME=/usr/local/bin/altermime
> > ALTERMIME_DIR=/var/spool/altermime
> > SENDMAIL=/usr/sbin/sendmail
> >
> > # Exit codes of commands invoked by Postfix are expected
> > # to follow the conventions defined in <sysexits.h>.
> > TEMPFAIL=75
> > UNAVAILABLE=69
> >
> > # Change in to alterMIME's working directory
> > # Notify Postfix if 'cd' fails.
> > cd $ALTERMIME_DIR || { echo $ALTERMIME_DIR does not exist; exit
> > $TEMPFAIL; }
> >
> > # Clean up when done or when aborting.
> > trap "rm -f in.$$" 0 1 2 3 15
> >
> > # Write mail to a temporary file
> > # Notify Postfix if this fails
> > cat >in.$$ || { echo Cannot write to $ALTERMIME_DIR; exit $TEMPFAIL;
> }
> >
> > # Call alterMIME, hand over the message and
> > # tell alterMIME what to do with it
> > $ALTERMIME --input=in.$$ \
> >             --disclaimer=/etc/postfix/disclaimer.txt \
> >             --disclaimer-html=/etc/postfix/disclaimer.txt \
> >             --xheader="X-Copyrighted-Material: Mycompany Inc.'s
> Message
> > Disclaimer" || \
> >             { echo Message content rejected; exit $UNAVAILABLE; }
> >
> > # Call sendmail to reinject the message into Postfix
> > $SENDMAIL -i "$@" <in.$$
> >
> > # Use sendmail's EXIT STATUS to tell Postfix
> > # how things went.
> > exit $?
> >
> > My master.cf looks like:
> >
> > ....
> > 127.0.0.1:10025 inet n  -       n     -       -  smtpd
> >             -o content_filter=disclaimer:
> >             -o local_recipient_maps=
> >             -o relay_recipient_maps=
> >             -o smtpd_restriction_classes=
> >             -o smtpd_delay_reject=no
> >             -o smtpd_client_restrictions=permit_mynetworks,reject
> >             -o smtpd_helo_restrictions=
> >             -o smtpd_sender_restrictions=
> >             -o smtpd_recipient_restrictions=permit_mynetworks,reject
> >             -o smtpd_data_restrictions=reject_unauth_pipelining
> >             -o smtpd_end_of_data_restrictions=
> >             -o mynetworks=127.0.0.0/8
> >             -o strict_rfc821_envelopes=yes
> >             -o smtpd_error_sleep_time=0
> >             -o smtpd_soft_error_limit=1001
> >             -o smtpd_hard_error_limit=1000
> >             -o smtpd_client_connection_count_limit=0
> >             -o smtpd_client_connection_rate_limit=0
> >             -o receive_override_options=no_header_body_checks
> > ##disclaimer
> > disclaimer     unix    -       n       n       -       -       pipe
> >     flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender}
--
> > ${recipient}
> >
> > ....
> >
> > test:/etc/postfix # ls -all /etc/postfix/disclaimer*
> > -rwxr-x--- 1 root filter 1167 Oct 22 17:15 /etc/postfix/disclaimer
> > -rw-r----- 1 root filter   21 Oct 22 17:16
> /etc/postfix/disclaimer.txt
> >
> > ls -all /usr/local/bin/altermime
> > -rwxr-xr-x 1 root root 94K Oct 22 16:44 /usr/local/bin/altermime*
> >
> > ls -all /var/spool/filter/
> > total 8
> > drwxr-x---  2 filter filter 4096 Oct 22 16:21 .
> > drwxr-xr-x 16 root   root   4096 Oct 22 16:21 ..
> >
> > I guess all permissions are right.
> >
> > Log shows:
> >
> > Oct 22 17:20:20 testmonit pipe[15358]: fatal: pipe_comand: execvp
> > /etc/postfix/disclaimer: Permission denied
> > Oct 22 17:20:20 testmonit imapd: Connection, ip=[::ffff:127.0.0.1]
> > ......
> > .......
> > Oct 22 17:20:21 testmonit postfix/pipe[15355]: 32CDE65B2C:
> > to=<[EMAIL PROTECTED]>, relay=disclaimer, delay=1, status=bo
> > unced (Command died with status 1: "/etc/postfix/disclaimer")
> >
> > I'm using opensuse, therefore I don't have installed SELinux
> >
> > Thanks for any advice
> >
> > BR
> >
> > Peter
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:owner-postfix-
> > [EMAIL PROTECTED] On Behalf Of Wietse Venema
> > Sent: Wednesday, October 22, 2008 6:52 PM
> > To: Postfix users
> > Subject: Re: Altermime and postfix - permission denied, Command died
> > with status 1
> >
> > When reasonable file permissions don't work, consider fixing
> > killing Selinux, Apparmor, and so on.
> >
> >     Wietse
> 
> Dear Wietse, thank you for your answer
> 
> 
> I'm using opensuse, and i don't have installed Selinux or Apparmor
> 
> Can anybody think about this prblem ?
> 
> I have used setting from Book Of Postfix and I repaired it with
current
> Errata (http://www.postfix-book.com/errata.html ) from the pages
> 
> Thanks in advance
> 
> peter

So I have found out when I change permission for disclaimer files it
works fine, so it means the other user is accessing these 2 files

testmonit:/etc/postfix/filter # l
total 16K
drwxr-xr-x 2 root filter 4.0K Oct 23 14:34 ./
drwxr-xr-x 3 root root   4.0K Oct 23 14:39 ../
-rwxr-xr-x 1 root filter 1.3K Oct 23 14:34 disclaimer*
-rw-r--r-- 1 root filter   24 Oct 23 13:52 disclaimer.txt

The questions is who's accessing these files ?

But another problem appeared with Too many hops, that i will described
in the new post

BR

peter

Reply via email to