Re: [gentoo-user] Email clients

2023-07-29 Thread Wols Lists

On 29/07/2023 15:50, Arsen Arsenović wrote:

But I DO have to care about postfix/main.cf. This makes the fundamental blunder
of mixing distro defaults and local config in the SAME FILE. So yes it does
offer me etc-update. But if I MISS THAT, I've just trashed my local config and
have to rebuild it.

If portage trashes the local file, something went wrong.  That is the
only thing that I'm trying to get to the bottom of in this thread.
Application design is irrelevant to that.

You say that the opportunity to etc-update is offered?  If so, portage
worked as it should and I'm satisfied, but I'm still confused about how
the contents got trashed.

Because - with dovecot - I initially made the mistake of editing the 
global file. etc-update over-wrote it.


With postfix, I cannot see any way of NOT editing the global file.

If you go back to what started all this, it was me advising the OP to 
make sure he edited the dovecot local file, not the global one.


And yes, portage is working as it should, but it is working to mitigate 
breakage in the upstream application, namely postfix. Stuff it should 
not need to do.


Cheers,
Wol



Re: [gentoo-user] Email clients

2023-07-29 Thread Arsen Arsenović

Wols Lists  writes:

> On 29/07/2023 14:54, Arsen Arsenović wrote:
>> Again, it shouldn't be able to do that.  Please check CONFIG_PROTECT
>> using: portageq envvar CONFIG_PROTECT
>> It should, normally, contain /etc, set by profiles/base/make.defaults.
>
> And here is the root of the mis-understanding between us. And also why Dovecot
> does it right, and Postfix does it wrong.
>
> WHY SHOULD I HAVE TO USE DISPATCH-CONF? (Or in my case, etc-update.)
>
> The point is I don't (have to) care whether dovecot.conf is updated or not. I
> never change it from the distro defaults, so it never offers me etc-update, 
> and
> it never does any damage.
>
> But I DO have to care about postfix/main.cf. This makes the fundamental 
> blunder
> of mixing distro defaults and local config in the SAME FILE. So yes it does
> offer me etc-update. But if I MISS THAT, I've just trashed my local config and
> have to rebuild it.

If portage trashes the local file, something went wrong.  That is the
only thing that I'm trying to get to the bottom of in this thread.
Application design is irrelevant to that.

You say that the opportunity to etc-update is offered?  If so, portage
worked as it should and I'm satisfied, but I'm still confused about how
the contents got trashed.

> At the end of the day, if you can't keep distro and local config separate,
> that's a fault of the upstream application. etc-update and dispatch-conf are
> gentoo's way of working round the breakage. IFF you use dovecot/local.conf,
> it's a sign of good design by the upstream application, and etc-update or
> dispatch-conf are completely UNNECESSARY.
>
> Cheers,
> Wol


-- 
Arsen Arsenović


signature.asc
Description: PGP signature


Re: [gentoo-user] Email clients

2023-07-29 Thread Wols Lists

On 29/07/2023 14:54, Arsen Arsenović wrote:

Again, it shouldn't be able to do that.  Please check CONFIG_PROTECT
using: portageq envvar CONFIG_PROTECT

It should, normally, contain /etc, set by profiles/base/make.defaults.


And here is the root of the mis-understanding between us. And also why 
Dovecot does it right, and Postfix does it wrong.


WHY SHOULD I HAVE TO USE DISPATCH-CONF? (Or in my case, etc-update.)

The point is I don't (have to) care whether dovecot.conf is updated or 
not. I never change it from the distro defaults, so it never offers me 
etc-update, and it never does any damage.


But I DO have to care about postfix/main.cf. This makes the fundamental 
blunder of mixing distro defaults and local config in the SAME FILE. So 
yes it does offer me etc-update. But if I MISS THAT, I've just trashed 
my local config and have to rebuild it.


At the end of the day, if you can't keep distro and local config 
separate, that's a fault of the upstream application. etc-update and 
dispatch-conf are gentoo's way of working round the breakage. IFF you 
use dovecot/local.conf, it's a sign of good design by the upstream 
application, and etc-update or dispatch-conf are completely UNNECESSARY.


Cheers,
Wol



Re: [gentoo-user] Email clients

2023-07-29 Thread Arsen Arsenović

Wols Lists  writes:

> On 29/07/2023 11:13, Arsen Arsenović wrote:
>> Wols Lists  writes:
>> 
>>> On 29/07/2023 03:37, Bryan Gardiner wrote:
 User of Claws with a local maildir here.  One mail per file always
 felt safer to me.  If you do want to keep using maildir,
 net-mail/dovecot provides IMAP access to ~/.maildir out of the box,
 and I've found this combination to be reliable.
>>> Just a tip which bit me when I first installed dovecot ...
>>>
>>> The master config file actually chain-loads a local config file, make sure 
>>> you
>>> use it. I edited the master file directly, so of course the first update
>>> overwrote and trashed it ...
>
>> That should not happen.  Where's the master config file?  Is it under a
>> directory masked by CONFIG_PROTECT?
>
> And then the dovecot maintainers update things, update the config file, and it
> breaks for all users because the config version no longer matches the program
> version ...

I don't recall Dovecot configs being version sensitive.

> The master config file is in the obvious place -
> /etc/dovecot/dovecot.conf. Just like postfix breaks exactly the same way -
> /etc/postfix/main.cf.

Then that should not have been overwritten.

> Imho dovecot has got this (almost) exactly right. Just like systemd. You have
> your master file that is updated by the distro, and you have your local file
> that is updated by the sys admin.
> 
> dovecot.conf points to a file local.conf, which does not error if it doesn't
> exist, but over-rides dovecot.conf if it does. The proper way to do it!

I agree, but this is still suspicious.  CONFIG_PROTECT should've
prevented that, and offered dispatch-conf instead.

> Unlike postfix - where I can't find a place to split my local config away from
> the default config - so every time postfix is updated I have to make sure it
> doesn't try to update main.cf !!!

Again, it shouldn't be able to do that.  Please check CONFIG_PROTECT
using: portageq envvar CONFIG_PROTECT

It should, normally, contain /etc, set by profiles/base/make.defaults.

Have a lovely day.
-- 
Arsen Arsenović


signature.asc
Description: PGP signature


Re: [gentoo-user] Simple installation on BTRFS

2023-07-29 Thread Neil Bothwick
On Sat, 29 Jul 2023 10:47:53 +0100, Michael wrote:

> > I take snapshots every 15 minutes, keeping 5. Then hourly snapshots,
> > keeping 25, daily snapshots keeping 8, weekly keeping 6 and monthly
> > snapshots that I clean manually as space requires.  
> 
> I doubt I will need anything so frequent, these days my data does not
> change often enough.  Daily snapshots should do the trick and I could
> keep more of them.

Snapshots don't take up any space if the data does not change, so
frequent snapshots don't hurt. The biggest impact on snapshot sizes on a
Gentoo system is kernel source package updates.


-- 
Neil Bothwick

Never underestimate the bandwidth of a station wagon full of tapes!


pgpyCuTKqpVdZ.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Email clients

2023-07-29 Thread Wols Lists

On 29/07/2023 12:01, Peter Humphrey wrote:

Hm. I already have Dovecot on my LAN server, because KMail is horribly buggy
with POP3, which is what my ISP offers. So fetchmail -> postfix -> dovecot
became necessary before I could use IMAP4 in KMail.

All incoming emails are transferred to my workstation because I like to have
everything in one place and one backup.

Maybe I'll stick with KMail a bit longer...


Well then, install Claws and try it - just point it at Dovecot. Okay, I 
use Thunderbird, but there's no reason I have to - I run about 4 
different instances of TB, all pointing at my Dovecot server, and all 
mail is visible on all my computers - the server/workstation, my old 
laptop, my new laptop, my wife's laptop when I borrow it, ...


Cheers,
Wol



Re: [gentoo-user] Email clients

2023-07-29 Thread Wols Lists

On 29/07/2023 11:13, Arsen Arsenović wrote:

Wols Lists  writes:


On 29/07/2023 03:37, Bryan Gardiner wrote:

User of Claws with a local maildir here.  One mail per file always
felt safer to me.  If you do want to keep using maildir,
net-mail/dovecot provides IMAP access to ~/.maildir out of the box,
and I've found this combination to be reliable.

Just a tip which bit me when I first installed dovecot ...

The master config file actually chain-loads a local config file, make sure you
use it. I edited the master file directly, so of course the first update
overwrote and trashed it ...



That should not happen.  Where's the master config file?  Is it under a
directory masked by CONFIG_PROTECT?


And then the dovecot maintainers update things, update the config file, 
and it breaks for all users because the config version no longer matches 
the program version ...


The master config file is in the obvious place - 
/etc/dovecot/dovecot.conf. Just like postfix breaks exactly the same way 
- /etc/postfix/main.cf.


Imho dovecot has got this (almost) exactly right. Just like systemd. You 
have your master file that is updated by the distro, and you have your 
local file that is updated by the sys admin.


dovecot.conf points to a file local.conf, which does not error if it 
doesn't exist, but over-rides dovecot.conf if it does. The proper way to 
do it!


Unlike postfix - where I can't find a place to split my local config 
away from the default config - so every time postfix is updated I have 
to make sure it doesn't try to update main.cf !!!


Cheers,
Wol



Re: [gentoo-user] Email clients

2023-07-29 Thread Peter Humphrey
On Saturday, 29 July 2023 07:56:21 BST Neil Bothwick wrote:
> On Sat, 29 Jul 2023 01:29:59 +0100, Peter Humphrey wrote:
> > Claws mail is often mentioned hereabouts, and I'd like to try it, but
> > first I'd need to export KMail's 20-odd-year maildir history to mbox
> > format. Is it enough to run KMail's Import/Export Data tool to do this?
> > It should be, on the face of it, but I'm suspicious (consider me
> > paranoid if you like).
> 
> Claws works with maildir. However, I'd also recommend setting up Dovecot
> locally, then you can try as many mail clients as you want without having
> to worry about where the mails are sotred or in what format.

Hm. I already have Dovecot on my LAN server, because KMail is horribly buggy 
with POP3, which is what my ISP offers. So fetchmail -> postfix -> dovecot 
became necessary before I could use IMAP4 in KMail.

All incoming emails are transferred to my workstation because I like to have 
everything in one place and one backup.

Maybe I'll stick with KMail a bit longer...

-- 
Regards,
Peter.






Re: [gentoo-user] Email clients

2023-07-29 Thread Arsen Arsenović

Wols Lists  writes:

> On 29/07/2023 03:37, Bryan Gardiner wrote:
>> User of Claws with a local maildir here.  One mail per file always
>> felt safer to me.  If you do want to keep using maildir,
>> net-mail/dovecot provides IMAP access to ~/.maildir out of the box,
>> and I've found this combination to be reliable.
>
> Just a tip which bit me when I first installed dovecot ...
>
> The master config file actually chain-loads a local config file, make sure you
> use it. I edited the master file directly, so of course the first update
> overwrote and trashed it ...

That should not happen.  Where's the master config file?  Is it under a
directory masked by CONFIG_PROTECT?

  ~$ portageq envvar CONFIG_PROTECT
  /etc /usr/share/config

... on my machine (re-run on yours to check)

> Cheers,
> Wol

-- 
Arsen Arsenović


signature.asc
Description: PGP signature


Re: [gentoo-user] Simple installation on BTRFS

2023-07-29 Thread Michael
On Saturday, 29 July 2023 08:06:40 BST Neil Bothwick wrote:

> I take snapshots every 15 minutes, keeping 5. Then hourly snapshots,
> keeping 25, daily snapshots keeping 8, weekly keeping 6 and monthly
> snapshots that I clean manually as space requires.

I doubt I will need anything so frequent, these days my data does not change 
often enough.  Daily snapshots should do the trick and I could keep more of 
them.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Email clients

2023-07-29 Thread Michael
On Saturday, 29 July 2023 01:29:59 BST Peter Humphrey wrote:
> Hello list,
> 
> I've been a loyal user of KMail for many years. (Loyal? Masochistic might be
> a better word.) It suits me exactly - or it would if it were reliable. It
> isn't, though, which drives me to consider alternatives.

I've been using Kmail since the good ol' KDE3 days.  Back then it worked at 
least as good if not better than any other mail client I had tried.  With the 
move to KDE4, Kmail became the worse mail client I have ever used.  I mean, 
*catastrophically* worse!  Both for the messages involved and for my nerves.  
Initially I blamed sqlite, which I was using as its back end for a season, but 
things were not much better with mysql.  At some point I tried postgresql, 
which was more robust.  Over the years the code matured.  For some years now, 
Kmail is quite stable.  There are still a couple of glitches with its GUI, 
e.g. the columns width has a mind of its own and recently its Korganizer 
sister application notifications cannot be snoozed for a short period of time, 
but overall it works without any drama.


> Claws mail is often mentioned hereabouts, and I'd like to try it, but first
> I'd need to export KMail's 20-odd-year maildir history to mbox format.

Among many other email applications, I gave Claws a spin.  A couple of months 
later I abandoned it, because I ended up spending more time trying to bend it 
out of shape to behave like Kmail (from keybindings, to layout, to 
attachments, etc.) than I was spending using it.  Soon, my attempts to change 
its behaviour hit a wall of non-adjustable hardcoded features.  I don't blame 
Claws for this, rather my brain which had been accustomed to work with Kmail.

The mbox single file format is something I tried to move away from since the 
90s, because as it grows in size it becomes more prone to corruption.  Losing 
one message may be tolerable, but losing the lot less so.  Sure, backups exist 
for a reason, but why accept architectural weaknesses if there is the more 
modern alternative of maildir?


> Is
> it enough to run KMail's Import/Export Data tool to do this? It should be,
> on the face of it, but I'm suspicious (consider me paranoid if you like).

I'll echo the recommendation for dovecot, plus backup(s).  If things go 
sideways during your experiment, you can rinse and repeat.  This is just good 
practice.

That said, I have used the Kmail Import/Export data tool in the past to move 
messages between Kmail and Thunderbird.  It worked, but can't recall the 
details.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Email clients

2023-07-29 Thread Wols Lists

On 29/07/2023 03:37, Bryan Gardiner wrote:

User of Claws with a local maildir here.  One mail per file always
felt safer to me.  If you do want to keep using maildir,
net-mail/dovecot provides IMAP access to ~/.maildir out of the box,
and I've found this combination to be reliable.


Just a tip which bit me when I first installed dovecot ...

The master config file actually chain-loads a local config file, make 
sure you use it. I edited the master file directly, so of course the 
first update overwrote and trashed it ...


Cheers,
Wol



Re: [gentoo-user] Simple installation on BTRFS

2023-07-29 Thread Neil Bothwick
On Fri, 28 Jul 2023 14:57:25 +0100, Michael wrote:

> > I too put everything on subvolumes, and set the one containing / to be
> > the default when mounted without a subvolid.  
> 
> When you say "everything", do you include temporary and virtual
> filesystems too (e.g. /sys, /proc/ /tmp, /run), or do you place these
> in hierarchically lower subvolumes so they are not backed up?

Everything but virtual filesystems, they are still virtual.

> Also, how do you treat /var/db and /var/cache/distfiles?

/var/db is just a directory on /var. I have $DISTDIR on an NFS mount, so
I can share it with all clients.

> How much space do you allocate for snapshots and at what point you
> start moving/deleting older snapshots?

You don't allocate space for them, at least I don't. 

I take snapshots every 15 minutes, keeping 5. Then hourly snapshots,
keeping 25, daily snapshots keeping 8, weekly keeping 6 and monthly
snapshots that I clean manually as space requires.

> I have one SSD and a larger spinning disk. I have a separate partition
> on the SSD for /home, so I could put dm-crypt on this partition alone
> and afford some basic security for personal data against opportunistic
> theft.  No RAID on this box, unless you suggest to create a RAID 1 with
> two partitions, in case the SSD cells go wrong on one of them?
> 
> Without RAID things should be simpler with block device level
> encryption for / home.  But, ... will this work without an initrd?  The
> unencrypted rootfs will be mounted before /home.

You should only need an initrd if / is encrypted. I encrypt everything
except /boot and dracut handles decrypting via an initrd easily.

> I am also not clear on steps I would need to follow in recovery
> operation scenarios and what I must have available to achieve this.  It
> is not as simple as booting with any ol' liveUSB to try to access an
> unecrypted drive/ partition.  I'll need dm-crypt and cryptsetup, or
> ecryptfs-utils and some familiarity with these tools, if I'm not
> reading off my exceptionally well structured notes I had the
> premonition to put together BEFORE the drive went south.  ;-)

systemrescue has all those tools, plus a web browser so you can work out
how to use them :)


-- 
Neil Bothwick

"There are two ways of constructing a software design: One way is to make
it so simple that there are obviously no deficiencies, and the other way
is to make it so complicated that there are no obvious deficiencies.
The first method is far more difficult" -C.A.R. Hoare


pgp9vlqOHQRqM.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Email clients

2023-07-29 Thread Neil Bothwick
On Sat, 29 Jul 2023 01:29:59 +0100, Peter Humphrey wrote:

> Claws mail is often mentioned hereabouts, and I'd like to try it, but
> first I'd need to export KMail's 20-odd-year maildir history to mbox
> format. Is it enough to run KMail's Import/Export Data tool to do this?
> It should be, on the face of it, but I'm suspicious (consider me
> paranoid if you like).

Claws works with maildir. However, I'd also recommend setting up Dovecot
locally, then you can try as many mail clients as you want without having
to worry about where the mails are sotred or in what format.


-- 
Neil Bothwick

If nothing sticks to Teflon, how do they stick teflon on the pan?


pgpZ5hUmLwj83.pgp
Description: OpenPGP digital signature