[Postfixbuch-users] disclaimer in postfix mit kav und altermime

Oliver Rau oliver.rau at koeln.de
Do Mär 1 13:21:21 CET 2007



Kai Fürstenberg schrieb:
> 
> 
> Mmmmh. Damit könntest du Recht haben. :-(
> Dann wäre vielleicht
> pickup    fifo  n       -       n       60      1       pickup
> 		-o content_filter=lmtp:127.0.0.1:10030
> pickup2   fifo  n       -       n       60      1       pickup
> 
> discl     unix  -     n       n       -   -   pipe
>      flags=Rq user=discl argv=/etc/postfix/disclaimer
>      -f ${sender} -- ${recipient}
>      -o content_filter=
>      -o pickup_service_name=pickup2
> 
> ein Ansatz.

das funktioniert leider so auch nicht, da
1. wieder den lmtp-loop drin
2. recipient wird nicht uebergeben siehe log

Mar  1 12:53:10 mail postfix/qmgr[6971]: 94F6F7F0: 
from=<oliver.rau at systemlogistik.dpd.de>, size=10166, nrcpt=3 (queue active)
Mar  1 12:53:10 mail postfix/smtpd[6991]: disconnect from 
localhost.localdomain[127.0.0.1]
Mar  1 12:53:10 mail postfix/lmtp[7125]: 7AF6680A: 
to=<content_filter=@mail.systemlogistik.dpd.de>, 
relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.0.0 
<content_filter=@mail.systemlogistik.dpd.de> Ok)
Mar  1 12:53:10 mail postfix/pickup[6969]: A6C8380B: uid=107 
from=<oliver.rau at systemlogistik.dpd.de>
Mar  1 12:53:10 mail postfix/cleanup[7005]: A6C8380B: 
message-id=<45E6BEA2.1030201 at systemlogistik.dpd.de>
Mar  1 12:53:10 mail postfix/pipe[6992]: 94F6F7F0: 
to=<content_filter=@mail.systemlogistik.dpd.de>, relay=discl, delay=0, 
status=sent (mail.systemlogistik.dpd.de)
Mar  1 12:53:10 mail postfix/pipe[6992]: 94F6F7F0: 
to=<oliver.rau~systemlogistik.dpd.de at mail.systemlogistik.dpd.de>, 
relay=discl, delay=0, status=sent (mail.systemlogistik.dpd.de)
Mar  1 12:53:10 mail postfix/pipe[6992]: 94F6F7F0: 
to=<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de>, 
relay=discl, delay=0, status=sent (mail.systemlogistik.dpd.de)
Mar  1 12:53:10 mail postfix/qmgr[6971]: 94F6F7F0: removed
Mar  1 12:53:10 mail postfix/qmgr[6971]: A6C8380B: 
from=<oliver.rau at systemlogistik.dpd.de>, size=10385, nrcpt=6 (queue active)
Mar  1 12:53:10 mail postfix/lmtp[7125]: 7AF6680A: 
to=<content_filter=@mail.systemlogistik.dpd.de>, 
orig_to=<content_filter=>, relay=127.0.0.1[127.0.0.1], delay=0, 
status=sent (250 2.0.0 <content_filter=@mail.systemlogistik.dpd.de> Ok)
Mar  1 12:53:10 mail postfix/lmtp[7125]: 7AF6680A: 
to=<oliver.rau~systemlogistik.dpd.de at mail.systemlogistik.dpd.de>, 
relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.0.0 
<oliver.rau~systemlogistik.dpd.de at mail.systemlogistik.dpd.de> Ok)
Mar  1 12:53:10 mail postfix/lmtp[7125]: 7AF6680A: 
to=<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de>, 
relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.0.0 
<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de> Ok)
Mar  1 12:53:10 mail postfix/lmtp[7125]: 7AF6680A: 
to=<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de>, 
orig_to=<pickup_service_name=pickup2>, relay=127.0.0.1[127.0.0.1], 
delay=0, status=sent (250 2.0.0 
<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de> Ok)
Mar  1 12:53:10 mail postfix/qmgr[6971]: A6C8380B: 
to=<-o at mail.systemlogistik.dpd.de>, orig_to=<-o>, relay=none, delay=0, 
status=bounced (invalid recipient syntax: "-o at mail.systemlogistik.dpd.de")
Mar  1 12:53:10 mail postfix/cleanup[6985]: ABB86808: 
message-id=<20070301115310.ABB86808 at mail.systemlogistik.dpd.de>
Mar  1 12:53:10 mail postfix/qmgr[6971]: ABB86808: from=<>, size=11967, 
nrcpt=1 (queue active)
Mar  1 12:53:10 mail postfix/qmgr[6971]: 7AF6680A: removed
Mar  1 12:53:10 mail postfix/smtpd[6991]: connect from 
localhost.localdomain[127.0.0.1]
Mar  1 12:53:10 mail postfix/smtpd[6991]: C178C7EB: 
client=localhost.localdomain[127.0.0.1]
Mar  1 12:53:10 mail postfix/smtpd[6991]: disconnect from 
localhost.localdomain[127.0.0.1]
Mar  1 12:53:10 mail postfix/lmtp[6986]: A6C8380B: 
to=<content_filter=@mail.systemlogistik.dpd.de>, 
relay=127.0.0.1[127.0.0.1], delay=0, status=bounced (host 
127.0.0.1[127.0.0.1] said: 552 
<content_filter=@mail.systemlogistik.dpd.de> Error ! (in reply to end of 
DATA command))
Mar  1 12:53:10 mail postfix/lmtp[6986]: A6C8380B: 
to=<content_filter=@mail.systemlogistik.dpd.de>, 
orig_to=<content_filter=>, relay=127.0.0.1[127.0.0.1], delay=0, 
status=bounced (host 127.0.0.1[127.0.0.1] said: 552 
<content_filter=@mail.systemlogistik.dpd.de> Error ! (in reply to end of 
DATA command))
Mar  1 12:53:10 mail postfix/lmtp[6986]: A6C8380B: 
to=<oliver.rau~systemlogistik.dpd.de at mail.systemlogistik.dpd.de>, 
relay=127.0.0.1[127.0.0.1], delay=0, status=bounced (host 
127.0.0.1[127.0.0.1] said: 552 
<oliver.rau~systemlogistik.dpd.de at mail.systemlogistik.dpd.de> Error ! 
(in reply to end of DATA command))
Mar  1 12:53:10 mail postfix/lmtp[6986]: A6C8380B: 
to=<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de>, 
relay=127.0.0.1[127.0.0.1], delay=0, status=bounced (host 
127.0.0.1[127.0.0.1] said: 552 
<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de> Error ! (in 
reply to end of DATA command))
Mar  1 12:53:10 mail postfix/lmtp[6986]: A6C8380B: 
to=<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de>, 
orig_to=<pickup_service_name=pickup2>, relay=127.0.0.1[127.0.0.1], 
delay=0, status=bounced (host 127.0.0.1[127.0.0.1] said: 552 
<pickup_service_name=pickup2 at mail.systemlogistik.dpd.de> Error ! (in 
reply to end of DATA command))
Mar  1 12:53:10 mail postfix/cleanup[6985]: DEDDC7EB: 
message-id=<20070301115310.DEDDC7EB at mail.systemlogistik.dpd.de>
Mar  1 12:53:10 mail postfix/qmgr[6971]: DEDDC7EB: from=<>, size=15027, 
nrcpt=1 (queue active)
Mar  1 12:53:10 mail postfix/qmgr[6971]: A6C8380B: removed

problem/fehler im disclaimer script?

#!/bin/bash

SENDER_DOMAIN1=systemlogistik.dpd.de
SENDER_DOMAIN2=depot180.dpd.de
COPYRIGHT_HEADER="X-Copyrighted-Material: Please visit 
http://www.whatever.de"
INSPECT_DIR=/var/spool/discl
SENDMAIL=/usr/sbin/sendmail
ALTERMIME=/usr/local/bin/altermime

EX_TEMPFAIL=75
EX_UNAVAILABLE=69

# clean up ...
trap "rm -f in.$$" 0 1 2 3 15

cd $INSPECT_DIR || { echo $INSPECT_DIR existiert nicht; exit $EX_TEMPFAIL; }

cat >in.$$ || { echo Kann eMail nicht speichern; exit $EX_TEMPFAIL; }

# domain aus uebergebenem Absender filtern:
DOMAIN=${1##*@}

if [ $DOMAIN == $SENDER_DOMAIN1 -o $DOMAIN == $SENDER_DOMAIN2 ];
then
$ALTERMIME --input=in.$$ \
            --input=in.$$ >> /tmp/altermime.log \
            --disclaimer=/etc/postfix/disclaimer.txt \
            --disclaimer-html=/etc/postfix/disclaimer.html \
	       --debug \
            --xheader="X-Copyrighted-Material: $COPYRIGHT_HEADER" || \
            { echo Message content rejected; exit $EX_UNAVAILABLE; }
else
$ALTERMIME --input=in.$$ \
            --xheader="X-Copyrighted-Material: $COPYRIGHT_HEADER" || \
            { echo Message content rejected; exit $EX_UNAVAILABLE; }
fi

$SENDMAIL -i "$@" <in.$$

exit $?


> 
> 
>>... nein, ich will mich damit eigentlich gar nicht so genau auskennen
>>... :-)
ich schon und es muss laufen... ;-)

gruesse
oliver
> 
> 
> :-)
> 
> 
>>Best Regards / Mit freundlichen Grüßen
>>Rainer Wiesenfarth
> 
> 
> Jetzt hätte ich gerne auch ein "Pickup" :-)
> 
> Kai



Mehr Informationen über die Mailingliste Postfixbuch-users