Re: Sieve: adding Date: header when missing

2014-07-17 Thread Daniele Nicolodi
On 17/07/2014 16:50, Reindl Harald wrote:
> as said:
> fix the application or try to solve that at MTA level

If it were so simple to convince people to fix their applications (I
especially hate applications refusing the "+" character in email address
local part), the world would definitely be a better place :)

Cheers,
Daniele


Re: Sieve: adding Date: header when missing

2014-07-17 Thread Daniele Nicolodi
On 17/07/2014 16:51, Alex JOST wrote:
> Am 17.07.2014 16:13, schrieb Daniele Nicolodi:
>> Hello,
>>
>> there is a way with a sieve rule to add a Date: header when it is
>> missing?  Adding one with the time of reception of the message or using
>> the date from the the first Received: header would be good options.
>>
>> Unfortunately I'm receiving some useful automated messages that lack a
>> Date header and this screws up the sorting in my imap clients.  I have a
>> script to fix those acting on the Maildir storage, but I would prefer to
>> have the thing solved more radically.
>>
>> Thanks. Cheers,
>> Daniele
>>
> 
> http://tools.ietf.org/html/rfc5260#section-5.1
> 
> Finally, currentdate can be used in conjunction with the editheader 
> extension to insert a header-field containing date/time information:
>   require ["variables", "date", "editheader"];
>   if currentdate :matches "std11" "*"
>   {addheader "Processing-date" "${0}";}
> 

Thanks Alex,

I expanded this a bit to use the date from the Received header:

   if not exists "Date" {
 if date :matches "received" "std11" "*" {
   addheader "Date" "${0}";
 }
   }

However I believe the issue is better fixed in the MTA and I instructed
my Postfix to do it.

Cheers,
Daniele


Re: Sieve: adding Date: header when missing

2014-07-17 Thread Daniele Nicolodi
On 17/07/2014 17:34, Jiri Bourek wrote:
> On 17.7.2014 16:40, Jochen Bern wrote:
>> On -10.01.-28163 20:59, Daniele Nicolodi wrote:
>>> Unfortunately I'm receiving some useful automated messages that lack a
>>> Date header and this screws up the sorting in my imap clients.  I have a
>>> script to fix those acting on the Maildir storage, but I would prefer to
>>> have the thing solved more radically.
>>
>> RFC 5322 3.6. (and AFAIK *all* its predecessors) marks the Date: header
>> as mandatory. sendmail used to forcibly add one if missing, I'm not sure
>> about other MTAs (and MSAs). I'ld recommend to try fixing the problem as
>> early and globally as possible, rather than on the last yard into *one
>> specific* mailbox.
>>
>> Regards,
>>  J. Bern
>>
> 
> Postfix is able to add the header, if you configure it do so. According 
> to its documentation "this may break DKIM signatures that cover 
> non-existent headers", so it's off by default.
> 
> (More in man 5 postconf - always_add_missing_headers.)

Thanks Jiri, this is the best solution.

Cheers,
Daniele


Re: Sieve: adding Date: header when missing

2014-07-17 Thread Daniele Nicolodi
Hello Harald,

On 17/07/2014 16:30, Reindl Harald wrote:
> 
> Am 17.07.2014 16:13, schrieb Daniele Nicolodi:
>> there is a way with a sieve rule to add a Date: header when it is
>> missing?  Adding one with the time of reception of the message or using
>> the date from the the first Received: header would be good options.
>>
>> Unfortunately I'm receiving some useful automated messages that lack a
>> Date header and this screws up the sorting in my imap clients.  I have a
>> script to fix those acting on the Maildir storage, but I would prefer to
>> have the thing solved more radically
> 
> in no case that's dovecot related

Indeed. Maybe my question was not clear, what I'm asking is a way to add
the header to the specific messages via a sieve rule.  I can add headers
via sieve but I don't know if there is a way to get the current time or
to set an header with information from another.

> if at all the MTA has to deal with metadata as it does
> with missing message-id's - LDA/LMTP should never change
> anything inside a message and just store "as it is"

The default behavior of the clients I'm using is to use the time at
which the message has been retrieved from the IMAP server, which does
not really make sense to me.

> BTW:
> i guess smokeping
> Fedora has fixed that after a bugreport from me months ago

I don't know what smokeping is.

Cheers,
Daniele


Sieve: adding Date: header when missing

2014-07-17 Thread Daniele Nicolodi
Hello,

there is a way with a sieve rule to add a Date: header when it is
missing?  Adding one with the time of reception of the message or using
the date from the the first Received: header would be good options.

Unfortunately I'm receiving some useful automated messages that lack a
Date header and this screws up the sorting in my imap clients.  I have a
script to fix those acting on the Maildir storage, but I would prefer to
have the thing solved more radically.

Thanks. Cheers,
Daniele


Re: [Dovecot] OT: Large corporate email systems - Exchange vs open source *nix based

2013-12-11 Thread Daniele Nicolodi
On 11/12/2013 11:36, Stan Hoeppner wrote:
>  Management
> should never allow the company to be held hostage, have no options, due
> to being reliant on a single systems administrator and his/er unique
> knowledge of the infrastructure.

Indeed, it is much better to be held hostage of a huge corporation that
does not care the less about your little business and that may change
it's licensing schemes or drop features on which you depend every
moment. :-)

I know I'm simplyfing a lot, but if "competences lock-in" should be
weighted in the choice, I think it is also fair to consider vendor lock-in.

Cheers,
Daniele



Re: [Dovecot] Dovecot MTA

2013-11-10 Thread Daniele Nicolodi
On 08/11/2013 14:07, Timo Sirainen wrote:
> I've never really wanted to create my own MTA, because I like Postfix
> quite a lot. And I always thought it would require a horribly lot of
> time to be able to create something that was anywhere even close to
> having Postfix's features.

Hello Timo,

I don't want to put too much stop energy into this, and I'm not really
in the position to tell you what to do with your time and energies, but
I feel that the world does not need another MTA, and that most of your
design goals can be very well accomplished with existing tools or
minimal extensions to them.

At the same time I see here on the mailing list frequent reports of bugs
in Dovecot that would have been quite easy to catch with more test
coverage. Spending time and energies into extending unit and integration
tests for the current Dovecot would IMHO be very well worth.

Additionally I feel that Dovecot documentation can see some love as
well.  Having the wiki as main source of documentation does not look
very polished, compared, for example to the extremely good written and
maintained Postfix documentation.

I know that designing something from scratch is much more catchy than
polishing a mature project. At the same time realizing a MTA capable of
replacing existing solutions in non trivial cases is probably that much
work that the fun will end quickly :)

Just my two cents.

Best,
Daniele



Re: [Dovecot] Best way from Mbox to Maildir using 2.17?

2013-11-05 Thread Daniele Nicolodi
On 05/11/2013 23:39, Noel Butler wrote:
> On 05/11/2013 22:04, Daniele Nicolodi wrote:
>> On 05/11/2013 12:24, Noel Butler wrote:
>>> On 05/11/2013 20:11, Daniele Nicolodi wrote:
>>>> On 05/11/2013 11:04, Noel Butler wrote:
>>>
>>>>>
>>>>> but using system users, you wouldnt use dovecot's LDA :)
>>>>
>>>> Why not?
>>>>
>>>
>>> pure overkill, your MTA already knows where it goes, it doesnt need to
>>> do any special lookups, would you use postfix virtual, to deliver 
>>> local
>>> user? no, of course you wouldnt :)
>>
>> Using dovecot-lda has nothing to do with postfix virtual users, it is
>> the only way I know to use sieve filtering and have messages indexed at
>> delivery.
>>
>> Cheers,
>> Daniele
> 
> again, overkill, system users means users have full access to system 
> account and can write procmail rules, if you dont allow that access, 
> then you dont trust them, so you should be using virtual users.

You may enjoy writing procmail rules, most people does not :) Anyhow
dovecot indexing at delivery time is the real advantage, and I really
don't see any difference in calling dovecot-lda instead of procmail.

Cheers,
Daniele



Re: [Dovecot] Best way from Mbox to Maildir using 2.17?

2013-11-05 Thread Daniele Nicolodi
On 05/11/2013 12:24, Noel Butler wrote:
> On 05/11/2013 20:11, Daniele Nicolodi wrote:
>> On 05/11/2013 11:04, Noel Butler wrote:
> 
>>>
>>> but using system users, you wouldnt use dovecot's LDA :)
>>
>> Why not?
>>
> 
> pure overkill, your MTA already knows where it goes, it doesnt need to 
> do any special lookups, would you use postfix virtual, to deliver local 
> user? no, of course you wouldnt :)

Using dovecot-lda has nothing to do with postfix virtual users, it is
the only way I know to use sieve filtering and have messages indexed at
delivery.

Cheers,
Daniele



Re: [Dovecot] Best way from Mbox to Maildir using 2.17?

2013-11-05 Thread Daniele Nicolodi
On 05/11/2013 11:04, Noel Butler wrote:
> On 05/11/2013 19:44, Bernd Petrovitsch wrote:
>> On Mon, 2013-11-04 at 19:29 +1000, Noel Butler wrote:
>> [...]
>>> think in postfix   home_mailbox = Maildir/ will do it, with sendmail 
>>> its
>>> much more tricky and your best sticking with mbox, if exim, NFI - dont
>>
>> Or - strategically - you use dovecot's LDA which should know where to
>> throw the mails in.
>>
> 
> but using system users, you wouldnt use dovecot's LDA :)

Why not?

Cheers,
Daniele