[pfx] [OT] converting seconds since epoch (was: Maildir filename format)

2023-07-31 Thread Markus Schönhaber via Postfix-users

31.07.23, 17:39 +0200, Bill Cole via Postfix-users:

1690633510 is the timestamp in "Unix Epoch Seconds." "date -j -f %s 
1690633510" will do the conversion.


You're probably using a BSD-provided date command.

With the date version from the GNU coreutils, one can decode the epoch 
timestamp like this:

date --date='@1690633510'

--
Regards
  mks

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Bill Cole via Postfix-users

On 2023-07-31 at 09:34:47 UTC-0400 (Mon, 31 Jul 2023 15:34:47 +0200)
Fourhundred Thecat via Postfix-users <400the...@gmx.ch>
is rumored to have said:


On 2023-07-31 15:09, Bill Cole via Postfix-users wrote:
On 2023-07-31 at 02:43:28 UTC-0400 (Mon, 31 Jul 2023 08:43:28 +0200)


    1690633510.M94611123819.mail,S=11706,W=12202:2,S


That message was delivered at Sat Jul 29 12:25:10 2023 UTC. It is 
11706 bytes on disk and the "RFC822Size" (a.k.a. "wire size") is 
12202 bytes, implying that it has 496 lines of text. It has been
marked as seen by an IMAP client, and has no other IMAP flags set. 
The delivery agent believes that its hostname is simply "mail".


how did you decode it ?


1690633510 is the timestamp in "Unix Epoch Seconds." "date -j -f %s 
1690633510" will do the conversion.


M94611123819 is a locally unique token chosen by the delivery agent. I 
believe that for Dovecot on most platforms there's an inode number 
hidden in there.


mail is the hostname

S= and W= fields are (compatible) Dovecot extensions to the naming 
format that spares reading the file or even stat()ing it to get the raw 
size.


: is the delimiter between the base name and the flags

2 is the version number for the format.

S is an indicator that the IMAP "\Seen" flag is set for the message.




--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Jaroslaw Rafa via Postfix-users
Dnia 31.07.2023 o godz. 16:56:04 Eugene R via Postfix-users pisze:
> But what is wrong with simply moving the message from one folder to
> another in the mail client?

Nothing, except the name (and sometimes the modification time) of the
original file on the server is changed (at least that's my experience), and
I simply don't like it.

> You can also use sieve scripts to automate retraining whatever mail
> filter you use.

It is my own filter (spamassassin with customized rules, plus a set of custom
procmail rules(!) as a last stage), and prefer to manage it manually :)
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Eugene R via Postfix-users

Magic )))
seriously, check the specs in the links I sent recently.

On 31.07.2023 16:34, Fourhundred Thecat via Postfix-users wrote:

> On 2023-07-31 15:09, Bill Cole via Postfix-users wrote:

On 2023-07-31 at 02:43:28 UTC-0400 (Mon, 31 Jul 2023 08:43:28 +0200)


    1690633510.M94611123819.mail,S=11706,W=12202:2,S


That message was delivered at Sat Jul 29 12:25:10 2023 UTC. It is 
11706 bytes on disk and the "RFC822Size" (a.k.a. "wire size") is 
12202 bytes, implying that it has 496 lines of text. It has been
marked as seen by an IMAP client, and has no other IMAP flags set. 
The delivery agent believes that its hostname is simply "mail".


how did you decode it ?

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Eugene R via Postfix-users
But what is wrong with simply moving the message from one folder to 
another in the mail client?
You can also use sieve scripts to automate retraining whatever mail 
filter you use.


On 31.07.2023 16:52, Jaroslaw Rafa via Postfix-users wrote:

Dnia 31.07.2023 o godz. 15:38:01 Fourhundred Thecat via Postfix-users pisze:

for me, being able to manipulate individual emails as files is the main
advantage of using Maildir format. It's not meant for day-to-day
operation, but for troubleshooting or backups of individual emails if
necessary

Listing the files in Maildir directory in modification time order (newest
first) may help a bit. If you sort your emails in the mail client also
newest first, you may approximately know that the message you are
interested in is probably eg. a third or fifth file in that order. Of course
you always need to check it by actually viewing the file.

I use that approach when pulling false positives out of my spam folder and
moving to main inbox, after I have adjusted my filters to not catch this
type of messages.

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Jaroslaw Rafa via Postfix-users
Dnia 31.07.2023 o godz. 15:38:01 Fourhundred Thecat via Postfix-users pisze:
> 
> for me, being able to manipulate individual emails as files is the main
> advantage of using Maildir format. It's not meant for day-to-day
> operation, but for troubleshooting or backups of individual emails if
> necessary

Listing the files in Maildir directory in modification time order (newest
first) may help a bit. If you sort your emails in the mail client also
newest first, you may approximately know that the message you are
interested in is probably eg. a third or fifth file in that order. Of course
you always need to check it by actually viewing the file.

I use that approach when pulling false positives out of my spam folder and
moving to main inbox, after I have adjusted my filters to not catch this
type of messages.
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Eugene R via Postfix-users
And Unix tools such as find, tar, or less have absolutely no trouble 
working with these names (Dovecot even maintains the correct file 
times). When accessing specific files, do remember about the new vs cur 
subdir issues, however.


On 31.07.2023 16:38, Fourhundred Thecat via Postfix-users wrote:

> On 2023-07-31 15:24, Eugene R via Postfix-users wrote:


Those "ugly characters" are there for a reason: they are specified by 
the Maildir standard (and the Dovecot's extensions to it) to encode 
various metadata such as message ID, size, flags, etc


https://en.wikipedia.org/wiki/Maildir
https://cr.yp.to/proto/maildir.html
https://doc.dovecot.org/admin_manual/mailbox_formats/maildir/

Also, why the "filename esthetics" even matters? The maildir 
directory is not supposed to be viewed (let alone directly accessed 
or modified) by a user. Mail clients and Dovecot provide useful (as
well as format-independent and universal) human-oriented interfaces 
and admin tools.


for me, being able to manipulate individual emails as files is the 
main advantage of using Maildir format.
It's not meant for day-to-day operation, but for troubleshooting or 
backups of individual emails if necessary

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Fourhundred Thecat via Postfix-users

> On 2023-07-31 15:24, Eugene R via Postfix-users wrote:


Those "ugly characters" are there for a reason: they are specified by the 
Maildir standard (and the Dovecot's extensions to it) to encode various metadata such as 
message ID, size, flags, etc

https://en.wikipedia.org/wiki/Maildir
https://cr.yp.to/proto/maildir.html
https://doc.dovecot.org/admin_manual/mailbox_formats/maildir/

Also, why the "filename esthetics" even matters? The maildir directory is not 
supposed to be viewed (let alone directly accessed or modified) by a user. Mail clients 
and Dovecot provide useful (as
well as format-independent and universal) human-oriented interfaces and admin 
tools.


for me, being able to manipulate individual emails as files is the main 
advantage of using Maildir format.
It's not meant for day-to-day operation, but for troubleshooting or backups of 
individual emails if necessary
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Fourhundred Thecat via Postfix-users

> On 2023-07-31 15:09, Bill Cole via Postfix-users wrote:

On 2023-07-31 at 02:43:28 UTC-0400 (Mon, 31 Jul 2023 08:43:28 +0200)


    1690633510.M94611123819.mail,S=11706,W=12202:2,S


That message was delivered at Sat Jul 29 12:25:10 2023 UTC. It is 11706 bytes on disk and the 
"RFC822Size" (a.k.a. "wire size") is 12202 bytes, implying that it has 496 
lines of text. It has been
marked as seen by an IMAP client, and has no other IMAP flags set. The delivery agent 
believes that its hostname is simply "mail".


how did you decode it ?

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Eugene R via Postfix-users

Hello,

Those "ugly characters" are there for a reason: they are specified by 
the Maildir standard (and the Dovecot's extensions to it) to encode 
various metadata such as message ID, size, flags, etc


https://en.wikipedia.org/wiki/Maildir
https://cr.yp.to/proto/maildir.html
https://doc.dovecot.org/admin_manual/mailbox_formats/maildir/

Also, why the "filename esthetics" even matters? The maildir directory 
is not supposed to be viewed (let alone directly accessed or modified) 
by a user. Mail clients and Dovecot provide useful (as well as 
format-independent and universal) human-oriented interfaces and admin tools.


Best wishes,
Eugene

On 31.07.2023 09:43, Fourhundred Thecat via Postfix-users wrote:

Hello,

I am using Maildir format on my server (Postfix + Dovecot).

The individual filenames have this format:

    1690633510.M94611123819.mail,S=11706,W=12202:2,S

Now, I have another, unrelated email account (not my mail server), and I
have set up Thunderbird with local Maildir support. When I look inside
the folder, the emails have this nice and clear format:

for received:

  ----x...@sender.com.eml

for sent:

  ----x...@recipient.com.eml

how could I have such nice filenames on my server, with useful
information in the filename, instead of those ugly containing special
characters like '=' and ':' ?

Do the nioe filenames come from Thunderbird, or from the mailserver ?

thanks,
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Bill Cole via Postfix-users

On 2023-07-31 at 02:43:28 UTC-0400 (Mon, 31 Jul 2023 08:43:28 +0200)
Fourhundred Thecat via Postfix-users <400the...@gmx.ch>
is rumored to have said:


Hello,

I am using Maildir format on my server (Postfix + Dovecot).

The individual filenames have this format:

1690633510.M94611123819.mail,S=11706,W=12202:2,S


That message was delivered at Sat Jul 29 12:25:10 2023 UTC. It is 11706 
bytes on disk and the "RFC822Size" (a.k.a. "wire size") is 12202 bytes, 
implying that it has 496 lines of text. It has been marked as seen by an 
IMAP client, and has no other IMAP flags set. The delivery agent 
believes that its hostname is simply "mail".



Now, I have another, unrelated email account (not my mail server), and 
I

have set up Thunderbird with local Maildir support.


Which is not compliant with any Maildir spec that I am aware of.


When I look inside
the folder, the emails have this nice and clear format:

for received:

  ----x...@sender.com.eml

for sent:

  ----x...@recipient.com.eml

how could I have such nice filenames on my server, with useful
information in the filename, instead of those ugly containing special
characters like '=' and ':' ?


You cannot. The names on the server are structured as defined in the 
Maildir spec and specifically constructed by the delivery agents 
(Postfix and/or Dovecot.) They include extended semantics specific to 
Dovecot that embeds metadata in the names.




Do the nioe filenames come from Thunderbird, or from the mailserver ?


TBird.

--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Maildir filename format

2023-07-31 Thread Jaroslaw Rafa via Postfix-users
Dnia 31.07.2023 o godz. 08:43:28 Fourhundred Thecat via Postfix-users pisze:
> Hello,
> 
> I am using Maildir format on my server (Postfix + Dovecot).
> 
> The individual filenames have this format:
> 
> 1690633510.M94611123819.mail,S=11706,W=12202:2,S

This is how Dovecot names them. Files delivered directly by Postfix have a
bit different names, like

1690675359.10129_0.hostname:2,S

where "hostname" is the hostname of your mail server (same as "mail" in your
example).

> Now, I have another, unrelated email account (not my mail server), and I
> have set up Thunderbird with local Maildir support. When I look inside
> the folder, the emails have this nice and clear format:
> 
> for received:
> 
>   ----x...@sender.com.eml
> 
> for sent:
> 
>   ----x...@recipient.com.eml
> 
> how could I have such nice filenames on my server, with useful
> information in the filename, instead of those ugly containing special
> characters like '=' and ':' ?
> 
> Do the nioe filenames come from Thunderbird, or from the mailserver ?

Definitely they come from Thunderbird. When a mail client retrieves mail
from the server, it has no idea of how the mail files are actually named on
the server. It names them by its own.
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Maildir filename format

2023-07-31 Thread Fourhundred Thecat via Postfix-users

Hello,

I am using Maildir format on my server (Postfix + Dovecot).

The individual filenames have this format:

1690633510.M94611123819.mail,S=11706,W=12202:2,S

Now, I have another, unrelated email account (not my mail server), and I
have set up Thunderbird with local Maildir support. When I look inside
the folder, the emails have this nice and clear format:

for received:

  ----x...@sender.com.eml

for sent:

  ----x...@recipient.com.eml

how could I have such nice filenames on my server, with useful
information in the filename, instead of those ugly containing special
characters like '=' and ':' ?

Do the nioe filenames come from Thunderbird, or from the mailserver ?

thanks,
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org