Re: [exim] Additional line in body when submitting?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Kamil Jońca
日付:  
To: exim-users
題目: Re: [exim] Additional line in body when submitting?
Jeremy Harris via Exim-users <exim-users@???> writes:

> On 01/06/2022 04:42, Kamil Jońca via Exim-users wrote:
>> - "mail" command is the same in both cases.
>
> Obviously since one case runs exim and the other postfix, they cannot be.


--8<---------------cut here---------------start------------->8---
%which mail                
/usr/bin/mail
%ll /usr/bin/mail
lrwxrwxrwx 1 root root 22 May  8  2012 /usr/bin/mail -> /etc/alternatives/mail
%ll /etc/alternatives/mail
lrwxrwxrwx 1 root root 18 May  8  2012 /etc/alternatives/mail -> /usr/bin/bsd-mailx
%dpkg -S /usr/bin/bsd-mailx
bsd-mailx: /usr/bin/bsd-mailx
--8<---------------cut here---------------end--------------->8---



>
> But given this:
>
>> But there is another thing:
>> Normally, when message is delivered I use pipe transport:
>> --8<---------------cut here---------------start------------->8---
>> dovecot_pipe:
>>          debug_print = "T: dovecot_pipe for $local_part@$domain ${reduce{ $sender_address : 'kjonca+fake@localhost' }{}{ ${if def:value {$value} {$item} }}}"
>>          driver = pipe
>>          path = "/usr/lib/dovecot/:/bin:/usr/bin:/usr/local/bin"
>>          command = /usr/lib/dovecot/dovecot-lda -f "${reduce{$sender_address:kjonca+fake@localhost}{}{${if def:value {$value}{$item}}}}"
>>          return_path_add
>>          delivery_date_add
>>          envelope_to_add
>>          temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78
>> --8<---------------cut here---------------end--------------->8---
>> And these messages have additional line.
>> But when I turned it off and use appendfile to maildir - messages in
>> maildir have no additional lines.


Created wrapper script:
--8<---------------cut here---------------start------------->8---
%cat /etc/exim4/lda     
#!/bin/sh
TS=$(date +%s)
cat - > /tmp/exim-$TS
cat  /tmp/exim-$TS | /usr/lib/dovecot/dovecot-lda "$@"
--8<---------------cut here---------------end--------------->8---


and used it in dovecot_pipe transport as "command"

--8<---------------cut here---------------start------------->8---
%cat /tmp/exim-1654092090
>From postmaster@??? Wed Jun 01 16:01:30 2022

Return-path: <postmaster@???>
Envelope-to: root@???
Delivery-date: Wed, 01 Jun 2022 16:01:30 +0200
Received: from kjonca by alfa.kjonca with local (Exim 4.95)
        (envelope-from <kjonca@???>)
        id 1nwOug-004fOw-Ki
        for root@???;
        Wed, 01 Jun 2022 16:01:30 +0200
To: root@???
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <E1nwOug-004fOw-Ki@???>
From: Kamil Jonca <kjonca@???>
Date: Wed, 01 Jun 2022 16:01:30 +0200


bla

--8<---------------cut here---------------end--------------->8---

Message saved into maildir has no such additional line at end.

KJ


--
http://wolnelektury.pl/wesprzyj/teraz/