[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Postfix und crm114



Ich glaube meine Mail von vorhin ist nicht angekommen. Daher nochmal der
Thread!

Am Donnerstag, den 25.01.2007, 11:56 +0100 schrieb Martin Steigerwald:
Hallo Martin!

> Ich habe CRM114 selbst noch nicht mit Postfix integriert, mich jedoch
mal 
> ein wenig umgehört:
> 
>
http://sourceforge.net/mailarchive/forum.php?thread_id=31500832&forum_id=32320
> 
> Von Dirk Datzert erhielt ich via privater Mail noch einen Hinweis auf
ein 
> HOWTO, das er in 2004 mal gepostet hat. Mit Hilfe eines
Shell-Skriptes 
> lässt sich CRM114 wohl direkt via master.cf als Content Filter
einbinden:
> 
>
http://sourceforge.net/mailarchive/forum.php?thread_id=11893943&forum_id=32320
>
http://sourceforge.net/mailarchive/forum.php?thread_id=11893941&forum_id=32320

Trotz Handball-WM habe ich jetzt mal ein bischen Zeit gefunden, das
crmfilter-Script von Dirk einzubinden.  ;-)
Jetzt bin ich soweit, dass postfix ohne Fehler startet (ich hatte in der
master.cf noch einen Fehler gehabt) und auch die Mail von postfix durch
das Script gepipet werden soll. Folgendes gibt das syslog her:
--------------------------------------------------
Feb  1 20:56:27 localhost fetchmail[1614]: Nachricht
twegner@mail.teleos-web.de:27 von 29 wird gelesen (4025 Bytes) 
Feb  1 20:56:28 localhost postfix/smtpd[1618]: 007778580:
client=localhost[127.0.0.1]
Feb  1 20:56:28 localhost postfix/cleanup[1621]: 007778580:
message-id=<45C242E3.2020304@gmx.de>
Feb  1 20:56:28 localhost postfix/qmgr[370]: 007778580:
from=<mapbender_users-bounces@lists.osgeo.org>, size=4246, nrcpt=1
(queue active)
Feb  1 20:56:28 localhost fetchmail[1614]:  nicht geflusht 
Feb  1 20:56:28 localhost postfix/pipe[1622]: 007778580:
to=<tommi@localhost>, relay=crm114, delay=0.05, delays=0.04/0/0/0.01,
dsn=4.3.0, status=deferred (temporary failure)
----------------------------------------------------
Da tappe ich jetzt im Dunkeln, woher der Fehler kommen kann.
Vielleicht hat ja von Euch Shell- oder Postfix-Gurus eine Idee.

Hier die Ausschnitte aus der master.cf:

-----------------------

# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
#
==========================================================================

#Eintraguer crm114
localhost:smtp inet n -         n       -       -       smtpd -o
smtpd_sender_restrictions= -o content_filter=crm114


# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
##incoming traffic with crm114 spamfilter
crm114  unix    -       n       n       -       -       pipe
  flags=Rq user=filter argv=/etc/postfix/crmfilter.sh -i -f ${sender}
--${recipient}

-----------------------------------------------------------------------

Hier die crmfilter.sh
--------------------------------------------

#!/bin/sh
#crmfilter by Dirk Datzert
#erstellt von tommi am 01.02.2007
#noch nicht getestet fï¿œr Ubuntu 06.10
#Localize these.
INSPECT_DIR=/var/spool/filter
SENDMAIL=/usr/sbin/sendmail
CRM=/usr/bin/crm
FILEPREFIX=/var/spool/crm/
MAILFILTER=/usr/share/crm114/mailfilter.crm

#Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69

#Clean up when done or when aborting
trap "rm -f in.$$ out.$$" 0 1 2 3 15

#Start processing
cd $INSPECT_DIR || {echo $INSPECT_DIR does not exist; exit
$EX_TEMPFAIL;}

(grep -iv ^X-CRM114 | cat >in.$$) {echo Cannot save mail to file; exit
$EX_TEMPFAIL;}

#If CRM114 has a problem set output=input
#$SENDMAIL "$@" <in.$$
#exit $?
out=in.$$

#Only mail under 1MB thru CRM114 (size in 512 byte-blocks)!!
for crm in 'find . -name in.$$ -size -2048 -type f'; do $CRM
--fileprefix=$FILEPREFIX $MAILFILTER <in.$$ >out.$$ || {echo CRM114
failed; exit $EX_TEMPFAIL;}

out=out.$$
done

$SENDMAIL "$@" <$out

exit $?
----------------------------------------------------------


-- 
Gruß

Thomas Wegner


Key fingerprint = DA5C B5F7 DB88 6CF4 9FA2  92DC 99D0 65D6 4B14 5FC0





-- 
Gruß

Thomas Wegner


Key fingerprint = DA5C B5F7 DB88 6CF4 9FA2  92DC 99D0 65D6 4B14 5FC0







Reply to: