Alex Baule
2011-Jun-10 12:19 UTC
[Dovecot] Explain about (mail_get_first_header(mail, "From", &header)
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 dma_3783 at envios.socomdescontos.com.br Tue Jun 07 15:43:04 2011Return-path: <dma_3783 at envios.socomdescontos.com.br> Envelope-to: sugestao at brc.com.br 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 <dma_3783 at envios.socomdescontos.com.br>) id 1QU1Ex-0006II-5o for sugestao at brc.com.br; 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 GU957biBsg3B6ryU5KsReceived: by vt-0007-119.virtualtarget.com.br id htpoj60sh70i for <sugestao at brc.com.br>; Tue, 7 Jun 2011 15:42:59 -0300 (envelope-from <dma_3783 at envios.socomdescontos.com.br>) From: "CompraFacil.com.br" <mkt at socomdescontos.com.br> To: "sugestao" <sugestao at brc.com.br> 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" <res at socomdescontos.com.br> 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: <0.0.1E.8DF.1CC2542B91E3284.8E34 at vt-0007-119.virtualtarget.com.br> Date: Tue, 7 Jun 2011 15:42:59 -0300 ############################## HEADER ########################################################
Timo Sirainen
2011-Jun-13 13:09 UTC
[Dovecot] Explain about (mail_get_first_header(mail, "From", &header)
On Fri, 2011-06-10 at 09:19 -0300, Alex Baule wrote:> 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.Do you mean these?>From dma_3783 at envios.socomdescontos.com.br Tue Jun 07 15:43:04 2011From: "CompraFacil.com.br" <mkt at socomdescontos.com.br>> 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 ?The first line isn't a From: header. It's the "envelope sender". That line typically exists only with mbox format, not with other mailbox formats.. If you deliver a mail via dovecot-lda it removes this From line if it sees it. Typically you'd get this info from Return-Path: header.
Possibly Parallel Threads
- smbd/service.c:make_connection_snum - Access denied
- Dos pequeños códigos casi idénticos y sólo funciona el primero
- Rewrite the ostream output method, to save messages in another directory.
- [PATCH v2 0/4] virtio: Clean up scatterlists and use the DMA API
- [PATCH v2 0/4] virtio: Clean up scatterlists and use the DMA API