frage zu bcc und header
Klaus Tachtler
klaus at tachtler.net
Di Jul 30 15:30:13 CEST 2019
Hallo Hajo,
ich habe mal die /etc/postfix/virtual gefüllt und noch einmal getestet.
In der E-Mail an klaus at localhost wird nun die /etc/postfix/virtual
berücksichtigt:
X-Original-To: klaus at localhost
Delivered-To: fwbuilder at localhost
/etc/postfix/main.cf:
=====================
# postmulti -i - -x postconf | egrep virtual_alias_maps\.=
virtual_alias_maps = hash:/etc/postfix/virtual
# postmulti -i - -x postconf | grep message_drop_headers
message_drop_headers = bcc, content-length, resent-bcc, return-path
# postmulti -i - -x postconf | grep enable_original_recipient
enable_original_recipient = yes
/etc/postfix/virtual:
====================
klaus at localhost fwbuilder at localhost
/var/log/maillog:
=================
Jul 30 15:22:51 pml125 postfix/pickup[11869]: 039FF10C6E59: uid=0
from=<sender at localhost>
Jul 30 15:22:51 pml125 postfix/cleanup[11951]: 039FF10C6E59:
message-id=<5d4044aa.kFesrPkbn72FT1Hu%sender at localhost>
Jul 30 15:22:51 pml125 postfix/qmgr[11870]: 039FF10C6E59:
from=<sender at localhost>, size=431, nrcpt=2 (queue active)
Jul 30 15:22:51 pml125 postfix/local[11953]: 039FF10C6E59:
to=<fwbuilder at localhost>, orig_to=<klaus at localhost>, relay=local,
delay=0.1, delays=0.06/0.01/0/0.02, dsn=2.0.0, status=sent (delivered
to mailbox)
Jul 30 15:22:51 pml125 postfix/local[11954]: 039FF10C6E59:
to=<root at localhost>, relay=local, delay=0.11, delays=0.06/0.03/0/0.02,
dsn=2.0.0, status=sent (delivered to mailbox)
Jul 30 15:22:51 pml125 postfix/qmgr[11870]: 039FF10C6E59: removed
/var/spool/mail/root und /var/spool/mail/fwbuilder:
===================================================
# cat root fwbuilder
From sender at localhost Tue Jul 30 15:22:51 2019
Return-Path: <sender at localhost>
X-Original-To: root at localhost
Delivered-To: root at localhost
Received: by pml125.home.tachtler.net (Postfix, from userid 0)
id 039FF10C6E59; Tue, 30 Jul 2019 15:22:50 +0200 (CEST)
Date: Tue, 30 Jul 2019 15:22:50 +0200
From: sender at localhost
To: root at localhost
Subject: Test
Message-ID: <5d4044aa.kFesrPkbn72FT1Hu%sender at localhost>
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
=
From sender at localhost Tue Jul 30 15:22:51 2019
Return-Path: <sender at localhost>
X-Original-To: klaus at localhost
Delivered-To: fwbuilder at localhost
Received: by pml125.home.tachtler.net (Postfix, from userid 0)
id 039FF10C6E59; Tue, 30 Jul 2019 15:22:50 +0200 (CEST)
Date: Tue, 30 Jul 2019 15:22:50 +0200
From: sender at localhost
To: root at localhost
Subject: Test
Message-ID: <5d4044aa.kFesrPkbn72FT1Hu%sender at localhost>
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
=
Grüße
Klaus.
> Hallo,
>
> Am 30.07.2019 um 13:44 schrieb Klaus Tachtler:
>> Hallo,
>>
>> Es soll als Beispiel eine E-Mail TO: root at localhost und an BCC:
>> klaus at localhost versendet werden:
>>
>> # mail -s "Test" -r sender at loclahost -b klaus at localhost root at localhost
>> .
>> EOT
>> Null message body; hope that's ok
>>
>> -s = Subject
>> -r from
>> -b bcc
>>
>> Im /var/log/maillog sieht das ganze dann so aus:
>> ================================================
>>
>> # cat /var/log/maillog | grep 0B74610C6E59
>> Jul 30 13:31:48 pml125 postfix/pickup[4708]: 0B74610C6E59: uid=0
>> from=<sender at loclahost>
>> Jul 30 13:31:48 pml125 postfix/cleanup[7084]: 0B74610C6E59:
>> message-id=<5d402aa4.NzO5B78bqjSA/c+a%sender at loclahost>
>> Jul 30 13:31:48 pml125 postfix/qmgr[1586]: 0B74610C6E59:
>> from=<sender at loclahost>, size=431, nrcpt=2 (queue active)
>> Jul 30 13:31:48 pml125 postfix/local[7085]: 0B74610C6E59:
>> to=<klaus at localhost>, relay=local, delay=0.06, delays=0.04/0/0/0.02,
>> dsn=2.0.0, status=sent (delivered to mailbox)
>> Jul 30 13:31:48 pml125 postfix/local[7268]: 0B74610C6E59:
>> to=<root at localhost>, relay=local, delay=0.07, delays=0.04/0/0/0.03,
>> dsn=2.0.0, status=sent (delivered to mailbox)
>> Jul 30 13:31:48 pml125 postfix/qmgr[1586]: 0B74610C6E59: removed
>>
>> Die eingegangenen E-Mails unter /var/spool/mail/root und
>> /var/spool/mail/klaus sehen so aus:
>> ============================================================================================
>>
>>
>> # cat /var/spool/mail/root /var/spool/mail/klaus
>> From sender at loclahost Tue Jul 30 13:31:48 2019
>> Return-Path: <sender at loclahost>
>> X-Original-To: root at localhost
>> Delivered-To: root at localhost
>> Received: by pml125.home.tachtler.net (Postfix, from userid 0)
>> id 0B74610C6E59; Tue, 30 Jul 2019 13:31:48
>> +0200 (CEST)
>> Date: Tue, 30 Jul 2019 13:31:48 +0200
>> From: sender at loclahost
>> To: root at localhost
>> Subject: Test
>> Message-ID: <5d402aa4.NzO5B78bqjSA/c+a%sender at loclahost>
>> User-Agent: Heirloom mailx 12.5 7/5/10
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=us-ascii
>> Content-Transfer-Encoding: quoted-printable
>>
>> =
>>
>> From sender at loclahost Tue Jul 30 13:31:48 2019
>> Return-Path: <sender at loclahost>
>> X-Original-To: klaus at localhost
>> Delivered-To: klaus at localhost
>> Received: by pml125.home.tachtler.net (Postfix, from userid 0)
>> id 0B74610C6E59; Tue, 30 Jul 2019 13:31:48
>> +0200 (CEST)
>> Date: Tue, 30 Jul 2019 13:31:48 +0200
>> From: sender at loclahost
>> To: root at localhost
>> Subject: Test
>> Message-ID: <5d402aa4.NzO5B78bqjSA/c+a%sender at loclahost>
>> User-Agent: Heirloom mailx 12.5 7/5/10
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=us-ascii
>> Content-Transfer-Encoding: quoted-printable
>>
>> =
>>
>>
>> Der Unterschied beider E-Mail sieht wie folgt aus:
>> ==================================================
>>
>> # diff /var/spool/mail/root /var/spool/mail/klaus
>> 3,4c3,4
>> < X-Original-To: root at localhost
>> < Delivered-To: root at localhost
>> ---
>>> X-Original-To: klaus at localhost
>>> Delivered-To: klaus at localhost
>>
>>
>> Das bedeutet, dass der der (MUA), hier mail(x) im ENVELOP immer RCPT
>> TO: verwendet und nur im X-Original-To: zu erkennen ist, wer der
>> ursprüngliche Empfänger war.
>>
>> Voraussetzung: enable_original_recipient = yes
> enable_original_recipient haben wir auch auf yes. Was sagt bei dir
> message_drop_headers ?
> Im Log sieht das bei mir auch so aus, aber nicht im Header.
> Postfix Version ist 3.1.0
> Bei mir verweist die virtual auf die lokalen User:
>
> b at example.com a at example.com
> a at example.com myusername
>
> Daher ist in den beiden Mails delivered-to username at servername und keine
> original Mailadresse mehr.
> X-Original-To änderte sich erst, nachdem ich bcc aus der Liste für
> message_drop_headers entfernt habe.
> Ich nehme an bei uns herrscht ein etwas ungünstiges virtual-setup...
>>
>> Siehe auch:
>> http://www.postfix.org/postconf.5.html#enable_original_recipient
>>
> Hajo
--
--------------------------------------------
e-Mail : klaus at tachtler.net
Homepage: https://www.tachtler.net
DokuWiki: https://dokuwiki.tachtler.net
--------------------------------------------
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-keys
Dateigröße : 3121 bytes
Beschreibung: Öffentlicher PGP-Schlüssel
URL : <https://listi.jpberlin.de/pipermail/postfixbuch-users/attachments/20190730/43d1a247/attachment-0001.skr>
Mehr Informationen über die Mailingliste Postfixbuch-users