Re: Opensmtpd failover

2018-12-05 Thread Mik J
 Thank you everyone for replying to my question.

First I think to work on the backup mx server (without any storage), as it was 
suggested. And see how it goes.


Le mercredi 5 décembre 2018 à 10:31:35 UTC+1, Gilles Chehade 
 a écrit :  
 
 On Wed, Dec 05, 2018 at 10:21:13AM +0100, Aham Brahmasmi wrote:
> Hello Craig,
> 
> > > But why? Just deliver it and be done. Can't see many drawbacks in
> > > that.
> > > 
> > 
> > Backup MX servers don't have any mail storage, nor IMAP/POP daemon.
> > 
> > They are another hop along the delivery path to the primary MX servers.
> > 
> > 
> > 
> > Backup MX machines are not the message's final destination;-
> > 
> > Pretend you are going to the world's biggest party, which is held every
> > New Year's Eve in Edinburgh, so you board an aeroplane to Edinburgh.
> > 
> > But the snow hits Scotland, so your aeroplane lands in London. England
> > is not your final destination. It is a backup airport in a different
> > country. You have not travelled to the party capital. So you wait/spool
> > in London until Edinburgh airport is receiving traffic. Then then you
> > get the next flight to your final destination & Hogmanay for 3 days.
> 
> Thank you for the excellent analogy.
> 
> I will now never forget that Edinburgh is The Party Capital.
> 
> And that Scotland is a different country than England :) .
> 

that has got to be the best analogy I read :-))



-- 
Gilles Chehade                              @poolpOrg

https://www.poolp.org                 tip me: https://paypal.me/poolpOrg

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

  

Re: Opensmtpd failover

2018-12-05 Thread Gilles Chehade
On Wed, Dec 05, 2018 at 10:21:13AM +0100, Aham Brahmasmi wrote:
> Hello Craig,
> 
> > > But why? Just deliver it and be done. Can't see many drawbacks in
> > > that.
> > > 
> > 
> > Backup MX servers don't have any mail storage, nor IMAP/POP daemon.
> > 
> > They are another hop along the delivery path to the primary MX servers.
> > 
> > 
> > 
> > Backup MX machines are not the message's final destination;-
> > 
> > Pretend you are going to the world's biggest party, which is held every
> > New Year's Eve in Edinburgh, so you board an aeroplane to Edinburgh.
> > 
> > But the snow hits Scotland, so your aeroplane lands in London. England
> > is not your final destination. It is a backup airport in a different
> > country. You have not travelled to the party capital. So you wait/spool
> > in London until Edinburgh airport is receiving traffic. Then then you
> > get the next flight to your final destination & Hogmanay for 3 days.
> 
> Thank you for the excellent analogy.
> 
> I will now never forget that Edinburgh is The Party Capital.
> 
> And that Scotland is a different country than England :) .
> 

that has got to be the best analogy I read :-))



-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-12-05 Thread Aham Brahmasmi
Hello Craig,

> > But why? Just deliver it and be done. Can't see many drawbacks in
> > that.
> > 
> 
> Backup MX servers don't have any mail storage, nor IMAP/POP daemon.
> 
> They are another hop along the delivery path to the primary MX servers.
> 
> 
> 
> Backup MX machines are not the message's final destination;-
> 
> Pretend you are going to the world's biggest party, which is held every
> New Year's Eve in Edinburgh, so you board an aeroplane to Edinburgh.
> 
> But the snow hits Scotland, so your aeroplane lands in London. England
> is not your final destination. It is a backup airport in a different
> country. You have not travelled to the party capital. So you wait/spool
> in London until Edinburgh airport is receiving traffic. Then then you
> get the next flight to your final destination & Hogmanay for 3 days.

Thank you for the excellent analogy.

I will now never forget that Edinburgh is The Party Capital.

And that Scotland is a different country than England :) .

Regards,
ab
-|-|-|-|-|-|-|--

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-29 Thread Gilles Chehade
This kind of mail has no place in a list with hundreds of subscribers.

Will only say this once:

I'm more than willing to ban people from sending to the list in order to
avoid the bulk from being spammed with this kind of exchanges.

Discussion closed.


On Thu, Nov 29, 2018 at 11:41:04AM +, Craig Skinner wrote:
> Thomas, you're a stupid, standards breaking, sack of shit.
> 
> STOP EMAILING ME PRIVATELY YOUR FUCKWIT CRAP!!!
> 
> MX records have a purpose. Read what they are for.
> 
> 
> STOP SENDING ME YOUR FUCKWIT PRIVATE IDEAS ABOUT MX RECORDS
> 
> 
> 
> On Wed, 28 Nov 2018 13:06:03 Craig Skinner wrote:
> > On Wed, 28 Nov 2018 02:41:42 +0100 Thomas Bohl wrote:
> > > ... Who cares about the original concept of MX priorities?
> > 
> > You're a fucking stupid arsehole Thomas.
> > 
> > Due to you emailing me off list, you seem to want me to mentor you
> > from being a postmoron into becoming a postmaster.
> > 
> > For private tuition, I charge GB??60/hour. PayPal me GB??3,000 to start.
> > 
> > Pay up.
> > -- 
> > Craig Skinner | http://linkd.in/yGqkv7
> 
> --
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
> 

-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-29 Thread Craig Skinner
Thomas, you're a stupid, standards breaking, sack of shit.

STOP EMAILING ME PRIVATELY YOUR FUCKWIT CRAP!!!

MX records have a purpose. Read what they are for.


STOP SENDING ME YOUR FUCKWIT PRIVATE IDEAS ABOUT MX RECORDS



On Wed, 28 Nov 2018 13:06:03 Craig Skinner wrote:
> On Wed, 28 Nov 2018 02:41:42 +0100 Thomas Bohl wrote:
> > ... Who cares about the original concept of MX priorities?
> 
> You're a fucking stupid arsehole Thomas.
> 
> Due to you emailing me off list, you seem to want me to mentor you
> from being a postmoron into becoming a postmaster.
> 
> For private tuition, I charge GB£60/hour. PayPal me GB£3,000 to start.
> 
> Pay up.
> -- 
> Craig Skinner | http://linkd.in/yGqkv7

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-26 Thread Craig Skinner
Hi Thomas,

On Sun, 25 Nov 2018 04:12:10 +0100 Thomas Bohl wrote:
> > smtp2 doesn't deliver the mail to an IMAP mail storage daemon.
> > 
> > Instead, it spools it and waits
> 
> But why? Just deliver it and be done. Can't see many drawbacks in
> that.
> 

Backup MX servers don't have any mail storage, nor IMAP/POP daemon.

They are another hop along the delivery path to the primary MX servers.



Backup MX machines are not the message's final destination;-

Pretend you are going to the world's biggest party, which is held every
New Year's Eve in Edinburgh, so you board an aeroplane to Edinburgh.

But the snow hits Scotland, so your aeroplane lands in London. England
is not your final destination. It is a backup airport in a different
country. You have not travelled to the party capital. So you wait/spool
in London until Edinburgh airport is receiving traffic. Then then you
get the next flight to your final destination & Hogmanay for 3 days.


Cheers,
-- 
Craig Skinner | http://linkd.in/yGqkv7

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-24 Thread Peter J. Philipp
On Sat, Nov 24, 2018 at 06:52:00PM +, Craig Skinner wrote:
> Hi Peter,
> 
> On Sat, 24 Nov 2018 08:21:46 +0100 "Peter J. Philipp" wrote:
> 
> > ... the MX priority was all the same in DNS ...
> 
> This is a vastly different scenario to Mik's question. Not the same...
> 
> 
> >  backup MX's too I think with a higher priority field in DNS,
> > ... all they did was queue the mail and wait for the main mail hosts
> > to come back from whatever caused them to be down, then they'd
> > deliver the mail there.??It was just a relayer.
> 
> Yes, that is what Mik was asking about;- The MX backup servers spool
> mail while the primary mail servers are down, then relay over SMTP when
> the primary can recieve the spooled mail.
> 
> 
> > ... A solution is to use dot-lock files ...
> 
> Maildirs solve the hideous problems of mboxes... whether on NFS or not.

This is good advice.  I'm gonna try this in the future.  I read about this on
wikipedia and it seems to me every message is in its own file.  Would it be
easy to unison (2 way rsync) mail that's in the new folder to a backup and
thus keep them synced for failover?

Happy Sunday!
-peter

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-24 Thread Thomas Bohl

Hi,


smtp2 doesn't deliver the mail to an IMAP mail storage daemon.

Instead, it spools it and waits


But why? Just deliver it and be done. Can't see many drawbacks in that.

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-24 Thread Craig Skinner
Hi Peter,

On Sat, 24 Nov 2018 08:21:46 +0100 "Peter J. Philipp" wrote:

> ... the MX priority was all the same in DNS ...

This is a vastly different scenario to Mik's question. Not the same...


>  backup MX's too I think with a higher priority field in DNS,
> ... all they did was queue the mail and wait for the main mail hosts
> to come back from whatever caused them to be down, then they'd
> deliver the mail there. It was just a relayer.

Yes, that is what Mik was asking about;- The MX backup servers spool
mail while the primary mail servers are down, then relay over SMTP when
the primary can recieve the spooled mail.


> ... A solution is to use dot-lock files ...

Maildirs solve the hideous problems of mboxes... whether on NFS or not.


Cheers,
-- 
Craig Skinner | http://linkd.in/yGqkv7
--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-24 Thread Craig Skinner
Hi Mik

On Sat, 24 Nov 2018 00:15:33 + Mik J wrote:
> Let's say smtp1 is down, the internet client resolves the other mx
> with a lower priority and the mail goes to smtp2. Now smtp2 writes
> the message on the disk in order to store it.

smtp2 doesn't deliver the mail to an IMAP mail storage daemon.

Instead, it spools it and waits

The MX backup machine can be in a different country.

When the primary MX comes back up, the MX backup machine will relay
spooled mail to it over the Internet via SMTP.

That is a benefit of different priority MX records within a DNS zone.

Cheers,
-- 
Craig Skinner | http://linkd.in/yGqkv7

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-23 Thread Peter J. Philipp
If I only knew what others use when they do this successfully then all 
my problems would be solved.   Just kidding.


However here is a try.  In 1998 I was a sysadmin and our setup was with 
sendmail and postfix not smtpd.  We had 3 Sun Ultra Sparc computers 
connected with a small switch to a Netapp NFS filer, the MX priority was 
all the same in DNS so as to achieve a load-share (probably not a true 
share).  The problems back then were NFS related particularily locking 
meaning the Sun computers ran Solaris because it at the time did this 
best.  Back then it was proper to have backup MX's too I think with a 
higher priority field in DNS, this ran postfix and all they did was 
queue the mail and wait for the main mail hosts to come back from 
whatever caused them to be down, then they'd deliver the mail there.  It 
was just a relayer.


You can try making a NFS solution, but the NFS filer is a single point 
of failure itself, ours had multiple power supplies and I was there too 
short a time to see it work over a few years.  I don't know how well 
CARP'ed NFS servers behave, I don't know if it creates problems, that's 
for you to find out.  I also don't know how well the locking works with 
NFS and OpenBSD these days.  A solution is to use dot-lock files which 
gets its atomicity around an NFS stat operation (if that even exists, if 
not then open operation).


The removal of the single point of failure is the tough part, it isn't 
simple, IMO.  Now that I've tried giving you insights to the holy grail 
of mail, I wish you luck building your own system.


Regards,

-peter


On 11/24/18 1:15 AM, Mik J wrote:

Hello,

I'm wondering how to do a proper mail server failover.

Let's say smtp1 is down, the internet client resolves the other mx 
with a lower priority and the mail goes to smtp2.

Now smtp2 writes the message on the disk in order to store it.
What do you people do in order to have a common storage for both smtp 
which can be correct regardless whether a smtp goes up or down.

How do you manage the failover ?

Thank you


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Opensmtpd failover

2018-11-23 Thread Thomas Bohl

Hello,


Now smtp2 writes the message on the disk in order to store it.
What do you people do in order to have a common storage for both smtp 
which can be correct regardless whether a smtp goes up or down.


I'm afraid my answer has little to do with OpenSMTPD.
The common storage for my emails is managed by Dovecot.
I simply use its replication function between two machines.
https://wiki.dovecot.org/Replication

The replication is instantaneous. It's also super convenient for when 
you have to install a new server. You only setup the config and the live 
mailboxes will be pushed onto the system.

(Of course that doesn't excuse one from doing backups!)

HTH
Interested in what other people do as well.

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org