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