Re: Debian switchable MTA mechanism

2021-02-16 Thread David Wright
On Wed 17 Feb 2021 at 07:49:57 (+0800), Kevin Shell wrote:
> On Wed, Feb 17, 2021 at 07:47:51AM +0800, Kevin Shell wrote:
> > On Wed, Feb 17, 2021 at 07:39:15AM +0800, Kevin Shell wrote:
> > > On Tue, Feb 16, 2021 at 04:38:06PM -0600, David Wright wrote:
> > > > On Tue 16 Feb 2021 at 17:48:25 (+0800), Kevin Shell wrote:
> > > > 
> > > [...]
> > > > > Isn't Debian already has a /etc/alternatives/ mechanism?
> > > > 
> > > > AIUI all the targets of /etc/alternatives are all installed at the
> > > > same time, and can be simultaneously run without conflicting with
> > > > each other. The links merely select which target is run (and
> > > > documented) by invoking a name, like "www-browser" (→ lynx for me),
> > > > "awk" (gawk) or "rename" (the Perl one). I might be running firefox,
> > > > mawk and rename.ul (by their specific name) at the same time as the
> > > > "default" versions.
> > > > 
> > > I asked this question because on my laptop there's an alternatives system
> > > that can keep several programs providing the same or similar functions
> > > at the same time.
> > > Debian also has an alternatives system but doesn't allowed to install
> > > multiple MTAs. 
> > > 
> > > https://github.com/fedora-sysv/chkconfig/blob/master/alternatives.c
> > > $ dnf info alternatives
> > > Name : alternatives
> > > Summary  : A tool to maintain symbolic links determining default 
> > > commands
> > > URL  : https://github.com/fedora-sysv/chkconfig
> > > License  : GPLv2
> > > Description  : alternatives creates, removes, maintains and displays 
> > > information about
> > >  : the symbolic links comprising the alternatives system. It 
> > > is possible
> > >  : for several programs fulfilling the same or similar 
> > > functions to be
> > >  : installed on a single system at the same time.
> > > 
> > besides BSD systems also have a similar system call mailwrapper
>  called
> > http://man.openbsd.org/mailwrapper.8

AIUI (and I'm not one to be playing these tricks), it doesn't seem to
do more than using, say,

. Debian's alternatives to create a dummy package that satisfies apt's
  dependencies, and
. installing your favoured foreign replacement in, say, /opt.

Again, I'll pass on looking for documentation on switching MTAs
using mailwrapper.

Cheers,
David.



Re: Debian switchable MTA mechanism

2021-02-16 Thread David Wright
On Wed 17 Feb 2021 at 07:39:15 (+0800), Kevin Shell wrote:
> On Tue, Feb 16, 2021 at 04:38:06PM -0600, David Wright wrote:
> > On Tue 16 Feb 2021 at 17:48:25 (+0800), Kevin Shell wrote:
> > 
> [...]
> > > Isn't Debian already has a /etc/alternatives/ mechanism?
> > 
> > AIUI all the targets of /etc/alternatives are all installed at the
> > same time, and can be simultaneously run without conflicting with
> > each other. The links merely select which target is run (and
> > documented) by invoking a name, like "www-browser" (→ lynx for me),
> > "awk" (gawk) or "rename" (the Perl one). I might be running firefox,
> > mawk and rename.ul (by their specific name) at the same time as the
> > "default" versions.
> 
> I asked this question because on my laptop there's an alternatives system
> that can keep several programs providing the same or similar functions
> at the same time.
> Debian also has an alternatives system but doesn't allowed to install
> multiple MTAs. 
> 
> https://github.com/fedora-sysv/chkconfig/blob/master/alternatives.c
> $ dnf info alternatives
> Name : alternatives
> Summary  : A tool to maintain symbolic links determining default commands
> URL  : https://github.com/fedora-sysv/chkconfig
> License  : GPLv2
> Description  : alternatives creates, removes, maintains and displays 
> information about
>  : the symbolic links comprising the alternatives system. It is 
> possible
>  : for several programs fulfilling the same or similar functions 
> to be
>  : installed on a single system at the same time.

I hope you won't mind if I pass on finding the difference between the
above and Debian's alternatives, ie switching MTAs. I only found
https://github.com/fedora-sysv/chkconfig/commit/c3adb7f8cd06aaf274a0b2140fffe7be75a767f9

Cheers,
David.



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Wed, Feb 17, 2021 at 07:47:51AM +0800, Kevin Shell wrote:
> On Wed, Feb 17, 2021 at 07:39:15AM +0800, Kevin Shell wrote:
> > On Tue, Feb 16, 2021 at 04:38:06PM -0600, David Wright wrote:
> > > On Tue 16 Feb 2021 at 17:48:25 (+0800), Kevin Shell wrote:
> > > 
> > [...]
> > > > Isn't Debian already has a /etc/alternatives/ mechanism?
> > > 
> > > AIUI all the targets of /etc/alternatives are all installed at the
> > > same time, and can be simultaneously run without conflicting with
> > > each other. The links merely select which target is run (and
> > > documented) by invoking a name, like "www-browser" (→ lynx for me),
> > > "awk" (gawk) or "rename" (the Perl one). I might be running firefox,
> > > mawk and rename.ul (by their specific name) at the same time as the
> > > "default" versions.
> > > 
> > 
> > I asked this question because on my laptop there's an alternatives system
> > that can keep several programs providing the same or similar functions
> > at the same time.
> > Debian also has an alternatives system but doesn't allowed to install
> > multiple MTAs. 
> > 
> > https://github.com/fedora-sysv/chkconfig/blob/master/alternatives.c
> > $ dnf info alternatives
> > Name : alternatives
> > Summary  : A tool to maintain symbolic links determining default 
> > commands
> > URL  : https://github.com/fedora-sysv/chkconfig
> > License  : GPLv2
> > Description  : alternatives creates, removes, maintains and displays 
> > information about
> >  : the symbolic links comprising the alternatives system. It is 
> > possible
> >  : for several programs fulfilling the same or similar 
> > functions to be
> >  : installed on a single system at the same time.
> > 
> > 
> > 
> besides BSD systems also have a similar system call mailwrapper
 called
> http://man.openbsd.org/mailwrapper.8
> 

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Wed, Feb 17, 2021 at 07:39:15AM +0800, Kevin Shell wrote:
> On Tue, Feb 16, 2021 at 04:38:06PM -0600, David Wright wrote:
> > On Tue 16 Feb 2021 at 17:48:25 (+0800), Kevin Shell wrote:
> > 
> [...]
> > > Isn't Debian already has a /etc/alternatives/ mechanism?
> > 
> > AIUI all the targets of /etc/alternatives are all installed at the
> > same time, and can be simultaneously run without conflicting with
> > each other. The links merely select which target is run (and
> > documented) by invoking a name, like "www-browser" (→ lynx for me),
> > "awk" (gawk) or "rename" (the Perl one). I might be running firefox,
> > mawk and rename.ul (by their specific name) at the same time as the
> > "default" versions.
> > 
> 
> I asked this question because on my laptop there's an alternatives system
> that can keep several programs providing the same or similar functions
> at the same time.
> Debian also has an alternatives system but doesn't allowed to install
> multiple MTAs. 
> 
> https://github.com/fedora-sysv/chkconfig/blob/master/alternatives.c
> $ dnf info alternatives
> Name : alternatives
> Summary  : A tool to maintain symbolic links determining default commands
> URL  : https://github.com/fedora-sysv/chkconfig
> License  : GPLv2
> Description  : alternatives creates, removes, maintains and displays 
> information about
>  : the symbolic links comprising the alternatives system. It is 
> possible
>  : for several programs fulfilling the same or similar functions 
> to be
>  : installed on a single system at the same time.
> 
> 
> 
besides BSD systems also have a similar system call mailwrapper
http://man.openbsd.org/mailwrapper.8

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Tue, Feb 16, 2021 at 04:38:06PM -0600, David Wright wrote:
> On Tue 16 Feb 2021 at 17:48:25 (+0800), Kevin Shell wrote:
> 
[...]
> > Isn't Debian already has a /etc/alternatives/ mechanism?
> 
> AIUI all the targets of /etc/alternatives are all installed at the
> same time, and can be simultaneously run without conflicting with
> each other. The links merely select which target is run (and
> documented) by invoking a name, like "www-browser" (→ lynx for me),
> "awk" (gawk) or "rename" (the Perl one). I might be running firefox,
> mawk and rename.ul (by their specific name) at the same time as the
> "default" versions.
> 

I asked this question because on my laptop there's an alternatives system
that can keep several programs providing the same or similar functions
at the same time.
Debian also has an alternatives system but doesn't allowed to install
multiple MTAs. 

https://github.com/fedora-sysv/chkconfig/blob/master/alternatives.c
$ dnf info alternatives
Name : alternatives
Summary  : A tool to maintain symbolic links determining default commands
URL  : https://github.com/fedora-sysv/chkconfig
License  : GPLv2
Description  : alternatives creates, removes, maintains and displays 
information about
 : the symbolic links comprising the alternatives system. It is 
possible
 : for several programs fulfilling the same or similar functions to 
be
 : installed on a single system at the same time.


-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread David Wright
On Tue 16 Feb 2021 at 17:48:25 (+0800), Kevin Shell wrote:
> On Tue, Feb 16, 2021 at 11:29:54AM +0200, Andrei POPESCU wrote:
> > On Ma, 16 feb 21, 16:37:20, Kevin Shell wrote:
> > > Why Debian does't have a switchable MTA mechanism
> > > to allow install multiple MTAs at the same time?
> > 
> > Why do you need this?
> 
> For convenience when one evaluating or learning
> between multiple MTAs etc.

I don't see the sense in that. It would seem far more sensible to
install one MTA on one host, another on another, and try
interoperating them. After all, that's how they'll ultimately
be used.

> > > Fedora, Centos etc. allow users to install multiple MTAs at the same 
> > > multiple MTAs at the same time.
> > > There's a "alternatives --config mta" command
> > > to allow to choose between alternative MTA.
> > 
> > Installing and removing/purging packages has traditionally been very 
> > easy in Debian, 
> 
> removing/purging one MTA & reinstalling another MTA in the above 
> situation is unnecessary and inconvenient.

I can't see that it's very inconvenient if you save your configuration
files before you change over.

> >such a mechanism would have limited benefits for 
> > significant added complexity.
> > 
> Is this a difficult task?

The "benefits" you have given seem trivial compared with the work in
making software, with the functionality of exim, sendmail etc, coexist.

> Isn't Debian already has a /etc/alternatives/ mechanism?

AIUI all the targets of /etc/alternatives are all installed at the
same time, and can be simultaneously run without conflicting with
each other. The links merely select which target is run (and
documented) by invoking a name, like "www-browser" (→ lynx for me),
"awk" (gawk) or "rename" (the Perl one). I might be running firefox,
mawk and rename.ul (by their specific name) at the same time as the
"default" versions.

Cheers,
David.



Re: Conflicting alternatives (was: Debian switchable MTA mechanism)

2021-02-16 Thread Celejar
On Tue, 16 Feb 2021 17:22:21 +0100
 wrote:

...

> Exactly. This is user-y stuff: imagine two X servers running on behalf
> of two users (some time ago, those were a separate hardware: remember
> those shiny HP thingies with a whopping 6 MB of RAM and a huge monitor?
> 
> This was before HP specialised on building inkjets of [CENSORED]
> quality.

Hey, I have a Z440 (purchased cheaply on eBay). It's a very nice, high
quality machine, and it runs linux beautifully ;)

Celejar



Re: Conflicting alternatives (was: Debian switchable MTA mechanism)

2021-02-16 Thread didar
On Tue, Feb 16, 2021 at 11:03:14AM -0500, Dan Ritter wrote:
> Stefan Monnier wrote: 
> > Still, there is to me no good reason not to allow installing both exim
> > and postfix at the same time.  I think it's just a tradeoff between how
> > often this could be useful and how much work it takes to tweak the
> > packages.
> 
> An MTA has to provide certain things, or else it is not an MTA.
> 
> One of those is a daemon listening on port 25.
> 
> Another is a /usr/sbin/sendmail command that accepts new mail.
> 
> There is no requirement that the sendmail command use
> localhost:25 to get the mail in; it's perfectly acceptable for
> it to:
> 
> 1. Do all the work itself, or
> 2. Use a socket to hand it off to the rest of the MTA, or
> 3. Send it off to another machine somewhere, even if it's
>destiny is to come back to this box
> 
> among other things.
> 
> So one package has to control both the port 25 daemon and the
> sendmail command.
> 
> Debian policy is that, whenever possible, a package providing a
> daemon should start that daemon at install time. This is,
> perhaps, one of the more controversial policies, but it is in
> effect and has been for many years.
> 
> Therefore, installing an MTA will get you both a port 25 daemon
> and a sendmail command, and remove any previous installed
> services.
> 
> If you keep the config directories in place, you can switch
> between MTAs and feel reasonably confident that when you do
> that, via apt install, it will be started with the configuration
> that you already set up for it last time round. The exception
> are some shared files like /etc/aliases, where you should not
> expect a restored MTA to restore that config as well. Hence my
> suggestion of etckeeper.
> 
> If one is trying to learn different MTAs, a few days or weeks
> with each is not out of the question, and the 10-45 seconds of
> apt install to change between them is reasonable.

Talking about learning multiple MTAs - using a virtualization environment +
configuration management (ansible/chef) + apt-cache-ng works excellently.

I have been using VirtualBox VMs (under Win10) with NAT network and ansible +
subversion to learn and get dma, exim, opensmtpd as well as postfix to work for
my production requirement.

My probably inconsequential contribution to this discussion.

Didar

> 
> -dsr-
> 

-- 
Them as has, gets.



Re: Conflicting alternatives (was: Debian switchable MTA mechanism)

2021-02-16 Thread tomas
On Tue, Feb 16, 2021 at 09:17:13AM -0500, Stefan Monnier wrote:
> > Therefore, you'll find apretty advanced alternatives system
> > for client-y stuff in Debian (editor, MUA, what not) but
> > not for server-y stuff.
> 
> Hmm... so that's your take on it?
> Maybe you're right.  I was thinking of the display manager as
> a counter-example (you can install lxdm, gdm, and others simultaneously
> even though you can only use one at a the same time), but you might
> argue that it's not "server-y stuff".

Exactly. This is user-y stuff: imagine two X servers running on behalf
of two users (some time ago, those were a separate hardware: remember
those shiny HP thingies with a whopping 6 MB of RAM and a huge monitor?

This was before HP specialised on building inkjets of [CENSORED]
quality.

> Still, there is to me no good reason not to allow installing both exim
> and postfix at the same time.  I think it's just a tradeoff between how
> often this could be useful and how much work it takes to tweak the
> packages.

Absolutely. I think the "alternatives" system isn't the right approach
to this. Rather make things co-installable and co-runnable (as PostgreSQL
does with its different versions)

The start (@Kevin: still listening?) would be to unpackage a package,
hack the Conflicts: (& friends) fields, try to install both and watch
the fireworks. Then fix the issues one by one.

I don't expect a huge amount of them (server ports, common directories,
those could be even found out by package inspection).

> Also, as someone who happens to prefer Postfix to Exim (no particular
> reason: I'm just familiar with Postfix and not with Exim), I'm actually
> happy that `apt install postfix` gets me rid of Exim instead of having
> it linger uselessly.

Yep. In the normal case, this is what the overstressed admin wants :)

> But I do think Debian's packaging system should be improved to
> accommodate such needs: it should be possible and easy to override
> conflicts so as to force-install both Postfix and Exim (for instance).
> [ and I don't mean it just when you install the second package, but
>   also during the rest of the lifetime of the system, until you remove
>   the override.  ]

ISTR there was an apt option ("force") to override such things.
Of course you end with a package database in a "strange" state;
perhaps the database isn't prepared to contain a package set
which has dependency conflicts. I don't even know what a dependency
resolver will do in such cases. But there was at least one
--force-depends option (which isn't mentioned in the man page
these days).

Cheers
 - t


signature.asc
Description: Digital signature


Re: Conflicting alternatives (was: Debian switchable MTA mechanism)

2021-02-16 Thread Dan Ritter
Stefan Monnier wrote: 
> Still, there is to me no good reason not to allow installing both exim
> and postfix at the same time.  I think it's just a tradeoff between how
> often this could be useful and how much work it takes to tweak the
> packages.

An MTA has to provide certain things, or else it is not an MTA.

One of those is a daemon listening on port 25.

Another is a /usr/sbin/sendmail command that accepts new mail.

There is no requirement that the sendmail command use
localhost:25 to get the mail in; it's perfectly acceptable for
it to:

1. Do all the work itself, or
2. Use a socket to hand it off to the rest of the MTA, or
3. Send it off to another machine somewhere, even if it's
   destiny is to come back to this box

among other things.

So one package has to control both the port 25 daemon and the
sendmail command.

Debian policy is that, whenever possible, a package providing a
daemon should start that daemon at install time. This is,
perhaps, one of the more controversial policies, but it is in
effect and has been for many years.

Therefore, installing an MTA will get you both a port 25 daemon
and a sendmail command, and remove any previous installed
services.

If you keep the config directories in place, you can switch
between MTAs and feel reasonably confident that when you do
that, via apt install, it will be started with the configuration
that you already set up for it last time round. The exception
are some shared files like /etc/aliases, where you should not
expect a restored MTA to restore that config as well. Hence my
suggestion of etckeeper.

If one is trying to learn different MTAs, a few days or weeks
with each is not out of the question, and the 10-45 seconds of
apt install to change between them is reasonable.

-dsr-



Re: Debian switchable MTA mechanism

2021-02-16 Thread Darac Marjal
On 16/02/2021 14:19, Semih Ozlem wrote:

> Just out of curiosity what is MTA short for?

Mail Transfer Agent.

Email has a whole bunch of similar acronyms to describe the various
parts of the flow of email. You compose in an MUA (Mail User Agent),
which hands it so an MSA (Mail Submission Agent - usually quite similar
to an MTA, but configured to accept messages from trusted clients),
which passes it on to the MTA (Mail Transfer Agent - SMTP is built
around the idea of passing a message from hand-to-hand to someone
nearer. A message may pass through several MTAs as it travels, and each
one may hold onto it for an arbitrary duration for scanning, batch
delivery and so on). When the mail arrives at its destination the MTA
passes the message to an MDA (Mail Delivery Agent, which has the job of
filing the message into some sort of storage). Finally, the end users
MUA will pick up the message from the storage.


>
> Kevin Shell mailto:ksh...@gmx.com>>, 16 Şub 2021 Sal,
> 11:57 tarihinde şunu yazdı:
>
> Hello Debian Users.
>
> Why Debian does't have a switchable MTA mechanism
> to allow install multiple MTAs at the same time?
>
> Fedora, Centos etc. allow users to install
> multiple MTAs at the same time.
> There's a "alternatives --config mta" command
> to allow to choose between alternative MTA.
>
> -- 
> kevin
>


OpenPGP_signature
Description: OpenPGP digital signature


Re: Debian switchable MTA mechanism

2021-02-16 Thread IL Ka
>Just out of curiosity what is MTA short for?

Mail Transfer Agent.

This is a server that must be able to:
* get email message from MUA (mail user agent)
* forward/route it to the destination (or to the right direction at least)
* As last step, MTA sends message to the MDA (mail delivery agent) that
puts message directly into the user's mailbox

https://ittrainingday.files.wordpress.com/2013/01/c3ff4-tutorial44.jpg


Re: Debian switchable MTA mechanism

2021-02-16 Thread Semih Ozlem
Just out of curiosity what is MTA short for?

Kevin Shell , 16 Şub 2021 Sal, 11:57 tarihinde şunu yazdı:

> Hello Debian Users.
>
> Why Debian does't have a switchable MTA mechanism
> to allow install multiple MTAs at the same time?
>
> Fedora, Centos etc. allow users to install
> multiple MTAs at the same time.
> There's a "alternatives --config mta" command
> to allow to choose between alternative MTA.
>
> --
> kevin
>
>


Re: Debian switchable MTA mechanism

2021-02-16 Thread rhkramer
On Tuesday, February 16, 2021 08:33:50 AM Dan Ritter wrote:
> Kevin Shell wrote:

> > Looks like stupid to use this command to switch MTA. 邏
> 
> Are you calling me stupid for answering your question?

I'm glad you (dsr) "called him out"!  (I was getting ready to do so, but, I 
hope, your reply has gotten the message across (to be more careful in his 
choice of words -- avoid emotionally loaded words).)

Have a good day!



Conflicting alternatives (was: Debian switchable MTA mechanism)

2021-02-16 Thread Stefan Monnier
> Therefore, you'll find apretty advanced alternatives system
> for client-y stuff in Debian (editor, MUA, what not) but
> not for server-y stuff.

Hmm... so that's your take on it?
Maybe you're right.  I was thinking of the display manager as
a counter-example (you can install lxdm, gdm, and others simultaneously
even though you can only use one at a the same time), but you might
argue that it's not "server-y stuff".

Still, there is to me no good reason not to allow installing both exim
and postfix at the same time.  I think it's just a tradeoff between how
often this could be useful and how much work it takes to tweak the
packages.

Also, as someone who happens to prefer Postfix to Exim (no particular
reason: I'm just familiar with Postfix and not with Exim), I'm actually
happy that `apt install postfix` gets me rid of Exim instead of having
it linger uselessly.

But I do think Debian's packaging system should be improved to
accommodate such needs: it should be possible and easy to override
conflicts so as to force-install both Postfix and Exim (for instance).
[ and I don't mean it just when you install the second package, but
  also during the rest of the lifetime of the system, until you remove
  the override.  ]


Stefan



Re: Debian switchable MTA mechanism

2021-02-16 Thread Dan Ritter
Kevin Shell wrote: 
> On Tue, Feb 16, 2021 at 08:33:50AM -0500, Dan Ritter wrote:
> > Kevin Shell wrote: 
> > > On Tue, Feb 16, 2021 at 06:39:03AM -0500, Dan Ritter wrote:
> > > [...]
> > > > Don't purge them. Just install each of them in turn. Then the
> > > > command to move to the next one is
> > > > 
> > > > apt install MTA-NAME
> > > > 
> > > Looks like stupid to use this command to switch MTA. 邏
> > 
> > Are you calling me stupid for answering your question?
> 
> No, you misunderstand me!
> I mean using the install command is not suitable.

> > 
> > It could be, but it isn't. Do you want to use a method that
> > works and is supported, or a method that isn't currently implemented?

^ still this.

-dsr-



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Tue, Feb 16, 2021 at 08:33:50AM -0500, Dan Ritter wrote:
> Kevin Shell wrote: 
> > On Tue, Feb 16, 2021 at 06:39:03AM -0500, Dan Ritter wrote:
> > [...]
> > > Don't purge them. Just install each of them in turn. Then the
> > > command to move to the next one is
> > > 
> > > apt install MTA-NAME
> > > 
[...]
> 
> > I think the Debian's /etc/alternatives/ method could be applied to MTAs
> > or other similar packages.
> 
> It could be, but it isn't. Do you want to use a method that
> works and is supported, or a method that isn't currently implemented?
> 

Yes, I want a method that natively supported by the Apt packages manager.
> 

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Tue, Feb 16, 2021 at 08:33:50AM -0500, Dan Ritter wrote:
> Kevin Shell wrote: 
> > On Tue, Feb 16, 2021 at 06:39:03AM -0500, Dan Ritter wrote:
> > [...]
> > > Don't purge them. Just install each of them in turn. Then the
> > > command to move to the next one is
> > > 
> > > apt install MTA-NAME
> > > 
> > Looks like stupid to use this command to switch MTA. 邏
> 
> Are you calling me stupid for answering your question?

No, you misunderstand me!
I mean using the install command is not suitable.

> 
> > I think the Debian's /etc/alternatives/ method could be applied to MTAs
> > or other similar packages.
> 
> It could be, but it isn't. Do you want to use a method that
> works and is supported, or a method that isn't currently implemented?
> 
> -dsr-
> 

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Dan Ritter
Kevin Shell wrote: 
> On Tue, Feb 16, 2021 at 06:39:03AM -0500, Dan Ritter wrote:
> [...]
> > Don't purge them. Just install each of them in turn. Then the
> > command to move to the next one is
> > 
> > apt install MTA-NAME
> > 
> Looks like stupid to use this command to switch MTA. 邏

Are you calling me stupid for answering your question?

> I think the Debian's /etc/alternatives/ method could be applied to MTAs
> or other similar packages.

It could be, but it isn't. Do you want to use a method that
works and is supported, or a method that isn't currently implemented?

-dsr-



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Tue, Feb 16, 2021 at 06:39:03AM -0500, Dan Ritter wrote:
> 
> You have an unusual use-case. 
> 
yeah, weird use case. 邏

> > > > Fedora, Centos etc. allow users to install multiple MTAs at the same 
> > > > multiple MTAs at the same time.
> 
[...]
> Don't purge them. Just install each of them in turn. Then the
> command to move to the next one is
> 
> apt install MTA-NAME
> 
Looks like stupid to use this command to switch MTA. 邏

I think the Debian's /etc/alternatives/ method could be applied to MTAs
or other similar packages.

For example, there's symlink /etc/alternatives/editor => /usr/bin/vim.basic,
 /usr/bin/emacs
 ...

Similarly the Debian packager could add
/etc/alternatives/MTA => /usr/sbin/sendmail.sendmail
 /usr/sbin/sendmail.postfix
 /usr/sbin/sendmail.exim
 ...

> which shouldn't even incur any network traffic, since you have
[...]
> > Is this a difficult task?
> > Isn't Debian already has a /etc/alternatives/ mechanism?
> 
> You may be the first person to ever ask for such a thing. That
> doesn't make it difficult, it just makes it not currently a
> feature.
> 

Yeah, I need a weird setting. 
> 
> 

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Dan Ritter
Kevin Shell wrote: 
> On Tue, Feb 16, 2021 at 11:29:54AM +0200, Andrei POPESCU wrote:
> > On Ma, 16 feb 21, 16:37:20, Kevin Shell wrote:
> > > Hello Debian Users.
> > > 
> > > Why Debian does't have a switchable MTA mechanism
> > > to allow install multiple MTAs at the same time?
> > 
> > Why do you need this?
> > 
> 
> For convenience when one evaluating or learning
> between multiple MTAs etc.

You have an unusual use-case. 

> > > Fedora, Centos etc. allow users to install multiple MTAs at the same 
> > > multiple MTAs at the same time.
> > > There's a "alternatives --config mta" command
> > > to allow to choose between alternative MTA.
> > 
> > Installing and removing/purging packages has traditionally been very 
> > easy in Debian, 
> 
> removing/purging one MTA & reinstalling another MTA in the above 
> situation is unnecessary and inconvenient.

Don't purge them. Just install each of them in turn. Then the
command to move to the next one is

apt install MTA-NAME

which shouldn't even incur any network traffic, since you have
them all in /var/cache/apt/archives, and will not overwrite any
config files without reason.

(You should probably install etckeeper or a similar mechanism
for keeping track of config files.)

> >such a mechanism would have limited benefits for 
> > significant added complexity.
> > 
> Is this a difficult task?
> Isn't Debian already has a /etc/alternatives/ mechanism?

You may be the first person to ever ask for such a thing. That
doesn't make it difficult, it just makes it not currently a
feature.

-dsr-



Re: Debian switchable MTA mechanism

2021-02-16 Thread tomas
On Tue, Feb 16, 2021 at 05:48:25PM +0800, Kevin Shell wrote:
> On Tue, Feb 16, 2021 at 11:29:54AM +0200, Andrei POPESCU wrote:
> > On Ma, 16 feb 21, 16:37:20, Kevin Shell wrote:
> > > Hello Debian Users.
> > > 
> > > Why Debian does't have a switchable MTA mechanism
> > > to allow install multiple MTAs at the same time?
> > 
> > Why do you need this?
> > 
> 
> For convenience when one evaluating or learning
> between multiple MTAs etc.

This has been a curious "cultural" experience for me, right now.

As someone deeply immersed in Debian culture (I feel *well* in
there, mind you), my first reaction was also "what for?",
exactly as the other replies in this thread went.

On the other hand, why not?

It is true that it isn't "typical Debian". Debian is deeply
rooted in the tradition of the multi-user operating system:
one sysadmin (which can be a role, or a group of people, but
is tightly coordinated and acts "as one"), and many users,
to whom you want to grant as much freedom as possible, without
giving them the means to compromise the whole system.

Think university environments in the US, some time after
last century's mid-eighties.

Therefore, you'll find apretty advanced alternatives system
for client-y stuff in Debian (editor, MUA, what not) but
not for server-y stuff.

The funny thing is how this perspective can structure an
environment to the point that those whithin don't even "see"
it anymore. This was my "aha" thing, and I thank you all
(esp. Kevin, for setting the initial question).

Kevin: Technically, this wouldn't  be a difficult thing to
do. It's basically packaging, and making sure the different
MTAs don't kill each other over resources (port 25, this
kind of thing).

Actually, where it's needed, it is done: for example, the
PostgreSQL package allows parallel installations of several
server /versions/. Why? Well, in the case of a database,
the data are much more valuable than the software (sometimes
more so than the hardware). Not allowing to gently upgrade
the server version while keeping the data might lead your
users to come to your home at night and kidnap your cat...)

You could have a look at the PostgreSQL packages for some
inspiration.

Cheers
 - t


signature.asc
Description: Digital signature


Re: Debian switchable MTA mechanism

2021-02-16 Thread Kamil Jońca
Georgi Naplatanov  writes:

> On 2/16/21 10:37 AM, Kevin Shell wrote:
>> Hello Debian Users.
>> 
>> Why Debian does't have a switchable MTA mechanism
>> to allow install multiple MTAs at the same time?
>> 
>> Fedora, Centos etc. allow users to install 
>> multiple MTAs at the same time.
>> There's a "alternatives --config mta" command
>> to allow to choose between alternative MTA.
>> 
>
> Hi Kevin.
>
> What is the use-case for multiple MTAs, port 25 is only one.

1. But it is possible to have multiple interfaces.
2. You may want one MTA to listen only on MAS (587) port and second on
25 port, for examples.

KJ


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



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Tue, Feb 16, 2021 at 11:13:36AM +0200, Georgi Naplatanov wrote:
> Hi Kevin.
> 
> What is the use-case for multiple MTAs, port 25 is only one.
> 
I run a VPS, for study purpose to switch between MTAs not having
to remove one to get the other, I want to keep them installed at the
same time. You can stop one and run the other, there's no conflict.

> If you want multiple MTAs then you can use some kind of virtualization
> like Docker for example.
> 

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
On Tue, Feb 16, 2021 at 11:29:54AM +0200, Andrei POPESCU wrote:
> On Ma, 16 feb 21, 16:37:20, Kevin Shell wrote:
> > Hello Debian Users.
> > 
> > Why Debian does't have a switchable MTA mechanism
> > to allow install multiple MTAs at the same time?
> 
> Why do you need this?
> 

For convenience when one evaluating or learning
between multiple MTAs etc.

> > Fedora, Centos etc. allow users to install multiple MTAs at the same 
> > multiple MTAs at the same time.
> > There's a "alternatives --config mta" command
> > to allow to choose between alternative MTA.
> 
> Installing and removing/purging packages has traditionally been very 
> easy in Debian, 

removing/purging one MTA & reinstalling another MTA in the above 
situation is unnecessary and inconvenient.

>such a mechanism would have limited benefits for 
> significant added complexity.
> 
Is this a difficult task?
Isn't Debian already has a /etc/alternatives/ mechanism?

-- 
kevin



Re: Debian switchable MTA mechanism

2021-02-16 Thread Andrei POPESCU
On Ma, 16 feb 21, 16:37:20, Kevin Shell wrote:
> Hello Debian Users.
> 
> Why Debian does't have a switchable MTA mechanism
> to allow install multiple MTAs at the same time?

Why do you need this?

> Fedora, Centos etc. allow users to install multiple MTAs at the same 
> multiple MTAs at the same time.
> There's a "alternatives --config mta" command
> to allow to choose between alternative MTA.

Installing and removing/purging packages has traditionally been very 
easy in Debian, such a mechanism would have limited benefits for 
significant added complexity.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian switchable MTA mechanism

2021-02-16 Thread Georgi Naplatanov
On 2/16/21 10:37 AM, Kevin Shell wrote:
> Hello Debian Users.
> 
> Why Debian does't have a switchable MTA mechanism
> to allow install multiple MTAs at the same time?
> 
> Fedora, Centos etc. allow users to install 
> multiple MTAs at the same time.
> There's a "alternatives --config mta" command
> to allow to choose between alternative MTA.
> 

Hi Kevin.

What is the use-case for multiple MTAs, port 25 is only one.

If you want multiple MTAs then you can use some kind of virtualization
like Docker for example.

Kind regards
Georgi



Debian switchable MTA mechanism

2021-02-16 Thread Kevin Shell
Hello Debian Users.

Why Debian does't have a switchable MTA mechanism
to allow install multiple MTAs at the same time?

Fedora, Centos etc. allow users to install 
multiple MTAs at the same time.
There's a "alternatives --config mta" command
to allow to choose between alternative MTA.

-- 
kevin