Hi Timo... Inside my plugin, i use the (mail_get_first_header(mail, "From", &header) function, to get the email From to put in some Blacklist.
Looking in the header under this mail, we have 2 "From" fields. Using the function above, i get the Second "From", but my MTA (exim) look in to The First From, in the First Line, in that way, my blacklist don't work, because the sender to be blocked is different from the From looked by dovecot. There is a way to get the "From" from First line ? ############################## HEADER ######################################################## >From [email protected] Tue Jun 07 15:43:04 2011 Return-path: <[email protected]> Envelope-to: [email protected] Delivery-date: Tue, 07 Jun 2011 15:43:04 -0300 Received: from [187.61.43.119] (helo=vt-0007-119.virtualtarget.com.br) by mail.brc.com.br with esmtp (Exim 4.76) (envelope-from <[email protected]>) id 1QU1Ex-0006II-5o for [email protected]; Tue, 07 Jun 2011 15:43:01 -0300 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=k1; d=dkim.vttrack.com.br; h=From:To:Subject:MIME-Version:Content-Type:Reply-To:List-Unsubscribe:Message-ID:Date; bh=Q5G3TQPrYgogLS7aDg1DLYJpLKI=; b=XC+MHH79L6VHTI2OayuFHZGeSRAvNstNz8sHEp+xE5i71GznnYfCVsw7fuq2dIST6bTYY7tto/Rd aIZjc2YfEyqgUi0KKKesnMLSI61Ij/FlmE5ftRgIy9Ra59O9R03S62wAt6WPjkx1f4xCZ9ZAIaox GU957biBsg3B6ryU5Ks= Received: by vt-0007-119.virtualtarget.com.br id htpoj60sh70i for <[email protected]>; Tue, 7 Jun 2011 15:42:59 -0300 (envelope-from <[email protected]>) From: "CompraFacil.com.br" <[email protected]> To: "sugestao" <[email protected]> Subject: SUPER OFERTA: TV LCD 32” Full HD apenas 10x 129,99 reais com FRETE ZERO. Aproveite. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b928815d46126f887c344b7d725aceb1" Reply-To: "CompraFacil.com.br" <[email protected]> List-Unsubscribe: <http://relacionamento.socomdescontos.com.br/index.dma/DmaOptOut?3783,3351,267267,2b2f71c44b9d3430447f15f43ed2aed6,force,2> X-DMA: 8448122 X-UID: 8448122-74473 X-CID: 3783 X-TYP: MAIL Message-ID: <[email protected]> Date: Tue, 7 Jun 2011 15:42:59 -0300 ############################## HEADER ########################################################
