Konfiguration der Quarantined BLACKLIST message

Dieses Forum ist für alle Copfilter v2 support Anfragen in Deutsch. (IPCop version 2)
Post Reply
zahu
Posts: 11
Joined: 13 Feb 2014 21:59

Konfiguration der Quarantined BLACKLIST message

Post by zahu » 14 Oct 2014 15:52

Hallo zusammen
Ich habe da eine Frage zu den blacklistet senders welche in der BLACKLIST stehen.
Wenn eine Mail von einem Sender rein kommt, welcher in der BLACKLIST steht, wird die Mail zwar schön brav zurückgehalten, jedoch bekomme ich gleichzeitig auch eine message zugestellt, dass eine blacklistmail geblockt wurde. Wenn ich nun aber auch diese Message nicht haben möchte, da ich ja sonst die Spammail direkt auch ohne BLACKLIST im Posteingang löschen könnte, muss man sicher irgendwo einstellen können, ob eine message versendet werden soll oder nicht. - Oder habe ich was übersehen?

Kann mir da jemand sagen, wo ich diese Benachrichtigung über Quarantined BLACKLIST ausschalten kann?
LG, zahu

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: Konfiguration der Quarantined BLACKLIST message

Post by ShelbyGT500 » 14 Oct 2014 20:50

Hi,

Have a try with P3san GUI: disable "Sende Quarantaene-Hinweis"

Image

Regards.

ShelbyGT500

zahu
Posts: 11
Joined: 13 Feb 2014 21:59

Re: Konfiguration der Quarantined BLACKLIST message

Post by zahu » 15 Oct 2014 08:41

Hi Shelby
I hav disabled this option yet.

on on
16 7
off bluewin.ch,and-other.Domain,and-other.domain

I think the Quarantine message is not the same as the BLACKLIST message.
Perhaps i have to disable it anywhere in a config file..??

regards

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: Konfiguration der Quarantined BLACKLIST message

Post by ShelbyGT500 » 15 Oct 2014 22:45

Hi Zahu,

Ich weiß nicht Deutsch gut sprechen ! :D

Sorry, i didn't undestand that you want not receive only blacklist notification.

You need to edit and modify (with vi) the /var/log/copfilter/default/opt/tools/bin/mailscanner.sh file.
1. first, make a back up of this file, to prevent issue.(higly recommended)
2. edit the /var/log/copfilter/default/opt/tools/bin/mailscanner.sh file., and modify the part :

Code: Select all

if [ "x${IN_BLACK_LIST}" = "x1" -a $CURRENT_SCAN = "POP3" ];then
    echo "Blacklist email discarding: This is a POP3 Scan, modifying subject to recognize mail as spam"
    SUBJ='*** SPAM *** [Blacklisted] '
    #SUBJECT=$(grep "^Subject:" $EMAIL |sed -e 's/Subject: //; s/
//'  |  cut -c 1-68 | perl -MEncode -ne 'use lib "/var/log/copfilter/default/opt/perl_modules/lib"; print encode("utf8",decode("MIME-Header",$_));')
    SUBJECT=$(sed '/^Subject: */!d; s///;q' $EMAIL | perl -MEncode -ne 'use lib "/var/log/copfilter/default/opt/perl_modules/lib"; print encode("utf8",decode("MIME-Header",$_));')
    SUBJECT="${SUBJ}${SUBJECT}"
    TMPFILE=`mktemp ${EMAIL}_${CURRENT_SCAN}.XXXXXX`
    cat $EMAIL | sed -e 's/^Subject:.*$/Subject: '"$SUBJECT"'/' > $TMPFILE
    mv -f $TMPFILE $EMAIL
    echo "X-Copfilter: Sender is in blacklist, skipped SpamAssassin" > $TMPFILE
    cat $EMAIL >> $TMPFILE
    mv -f $TMPFILE $EMAIL
    echo `date +%a" "%b" "%d" "%X" "%Y` `/bin/hostname -s` "Copfilter_Blacklist identified spam (100.0/${SPAM_SCAN_SCORE_LEVEL}.0) B B B 0" >>$BASEDIR/opt/mail-spamassassin/var/log/spamd.log

   #'Neu Anfang
   SPAM_SCORE=100
   echo "quarantining pop3 email"
   cp -p $EMAIL $BASEDIR/opt/p3scan/quarantine/${EMAILID}.spam
   chmod a+r $BASEDIR/opt/p3scan/quarantine/${EMAILID}.spam &>/dev/null
   echo "sending pop3 blacklist quarantine notification instead of tagged spam email"
   #MAILSUBJECT=$(grep "^Subject:" $EMAIL |sed -e 's/Subject: //; s/
//' | cut -c 1-68 | perl -MEncode -ne 'use lib "/var/log/copfilter/default/opt/perl_modules/lib"; print encode("iso8859-1",decode("utf8",$_));')
   #MAILSUBJECT=$(grep "^Subject:" $EMAIL |sed -e 's/Subject: //; s/
//' | cut -c 1-68 | perl -MEncode -ne 'use lib "/var/log/copfilter/default/opt/perl_modules/lib"; my $enc = find_encoding("utf8"); print $enc->decode($_);')
   MAILSUBJECT=$(sed '/^Subject: */!d; s///;q' $EMAIL | perl -MEncode -ne 'use lib "/var/log/copfilter/default/opt/perl_modules/lib"; my $enc = find_encoding("utf8"); print $enc->decode($_);')
   MAILDATE=`grep "^Date:" $EMAIL |sed -e 's/Date: //; s/
//' | cut -c 1-68`
   RECIPIENTS=`cat $EMAIL |sed -n '1,/^$/p' | $BASEDIR/opt/tools/bin/formail -c | /usr/bin/awk -f $BASEDIR/opt/tools/bin/extract_email_adresses_to.awk`
   RECIPIENTS2=`echo $RECIPIENTS |cut -c 1-68`

   echo "From: $SENDER" > $EMAIL
   echo "To: $RECIPIENTS" >> $EMAIL
   echo "Subject: [Copfilter] Quarantined BLACKLIST message" >> $EMAIL
   echo "Date: $MAILDATE" >> $EMAIL
   echo >> $EMAIL
   echo >> $EMAIL
   echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-BLACKLISTED-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $EMAIL
   echo >> $EMAIL
   echo "$CP_spam_qua" >> $EMAIL
   echo >> $EMAIL
   echo >> $EMAIL
   echo "$CP_spam_qua2" >> $EMAIL
   echo "$CP_spam_qua3" >> $EMAIL

   echo >> $EMAIL
   echo "$CP_virusnotif_sender $SENDER" >> $EMAIL
   echo "$CP_virusnotif_reci $RECIPIENTS2" >> $EMAIL
   echo "$CP_virusnotif_subj $MAILSUBJECT" >> $EMAIL
   echo "$CP_virusnotif_date $MAILDATE" >> $EMAIL
   echo "$CP_virusnotif_file ${EMAILID}.spam" >> $EMAIL
   echo "$CP_virusnotif_host $HOSTNAME" >> $EMAIL
   echo "$CP_virusnotif_score [$SPAM_SCORE.0/${POP3_SPAM_SCAN_QUARANTINE_SCORE_LEVEL}.0] [BLACKLIST-Message]" >> $EMAIL
   echo >> $EMAIL

   echo $CP_spam_qua4>> $EMAIL
   echo >> $EMAIL
   echo "." >> $EMAIL
   POP3_SANITIZE_SCAN=off
#Neu Ende
fi
I see two possibilities to obtain the result you want (sorry , i've no time to test them to be sure, for now)
i will have a deeper look this week end.

Regards.

Shelby GT500

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: Konfiguration der Quarantined BLACKLIST message

Post by ShelbyGT500 » 19 Oct 2014 16:18

Hi Zahu,

Here is the Fix! ;)

With it, you will receive notification for blacklist only if it is enabled on Pop3 GUI:

Image

Download Fix for Blacklist Notification
md5: 27e379e8dc812bbafcb3b685632369be

Copy to /tmp. Then type:

Code: Select all

tar xzvf Notif_blacklist_fix.tar.gz
cd Notif_blacklist_fix
./install
The uninstall will restore all your original files.

Regards.

ShelbyGT500

Post Reply