multiple email servers with authentication

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple email servers with authentication

AJ Weber
I am attempting to configure multiple (backup) mailserver's. Each has a
unique username and password, and in fact, each has different ports,
protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

Gee Fitz
Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

AJ Weber
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

Gee Fitz
Well. You'll have more luck doing that in postfix or whatever you use to relay email. Did you look at ssmtp?


Can't remember if it supports multiple auth or protocols.

On Tue, May 29, 2018 at 9:51 PM, <[hidden email]> wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

Paul Theodoropoulos
In reply to this post by AJ Weber
The 'howto' page suggests that the username needs to be in quotes as well, in case you haven't tried that structure. It also appears to be version sensitive, which also plays into the problem, since you're using a very old version, but using current options.

https://mmonit.com/wiki/Monit/Gmail

On 5/29/2018 17:51 PM, [hidden email] wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz [hidden email]
To: This is the general mailing list for monit [hidden email]
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



-- 
Paul Theodoropoulos
www.anastrophe.com


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

AJ Weber
In reply to this post by Gee Fitz
I do use postfix. I read the SASL info, but I didn't notice a way to configure multiple defaults. I can look at that again.  (One thing I'm trying to monitor is postfix! ��)

Still, if monit supports multiple mailhosts and it supports smtp auth, it should support multiple mailhosts each with auth.



-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 9:02 PM
Subject: Re: multiple email servers with authentication

Well. You'll have more luck doing that in postfix or whatever you use to relay email. Did you look at ssmtp?


Can't remember if it supports multiple auth or protocols.

On Tue, May 29, 2018 at 9:51 PM, <[hidden email]> wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

AJ Weber
In reply to this post by Paul Theodoropoulos
The username and password all works great with one server at a time (though I'm happy to try quotes as well).

It is the syntax to combine multiple that's causing problems.  The docs aren't clear on that.

I will check if CentOS 7 has a newer package available.



-----Original Message-----
From: Paul Theodoropoulos <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 9:12 PM
Subject: Re: multiple email servers with authentication

The 'howto' page suggests that the username needs to be in quotes as well, in case you haven't tried that structure. It also appears to be version sensitive, which also plays into the problem, since you're using a very old version, but using current options.

https://mmonit.com/wiki/Monit/Gmail

On 5/29/2018 17:51 PM, [hidden email] wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz [hidden email]
To: This is the general mailing list for monit [hidden email]
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



-- 
Paul Theodoropoulos
www.anastrophe.com


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

Gee Fitz
In reply to this post by AJ Weber
Something like this?

set mailserver example.com port 587 username "user" password "password" using tlsv1,
example2.com port 25 username "user2" password "password2" using tlsv1 with timeout 30 seconds,
localhost

On Tue, May 29, 2018 at 10:08 PM, <[hidden email]> wrote:
I do use postfix. I read the SASL info, but I didn't notice a way to configure multiple defaults. I can look at that again.  (One thing I'm trying to monitor is postfix! 🙂)

Still, if monit supports multiple mailhosts and it supports smtp auth, it should support multiple mailhosts each with auth.



-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 9:02 PM
Subject: Re: multiple email servers with authentication

Well. You'll have more luck doing that in postfix or whatever you use to relay email. Did you look at ssmtp?


Can't remember if it supports multiple auth or protocols.

On Tue, May 29, 2018 at 9:51 PM, <[hidden email]> wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

AJ Weber
That did not work for me. Does it work on your version of monit? If so, can you tell me what version you are running?


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 9:27 PM
Subject: Re: multiple email servers with authentication

Something like this?

set mailserver example.com port 587 username "user" password "password" using tlsv1,
example2.com port 25 username "user2" password "password2" using tlsv1 with timeout 30 seconds,
localhost

On Tue, May 29, 2018 at 10:08 PM, <[hidden email]> wrote:
I do use postfix. I read the SASL info, but I didn't notice a way to configure multiple defaults. I can look at that again.  (One thing I'm trying to monitor is postfix! 🙂)

Still, if monit supports multiple mailhosts and it supports smtp auth, it should support multiple mailhosts each with auth.



-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 9:02 PM
Subject: Re: multiple email servers with authentication

Well. You'll have more luck doing that in postfix or whatever you use to relay email. Did you look at ssmtp?


Can't remember if it supports multiple auth or protocols.

On Tue, May 29, 2018 at 9:51 PM, <[hidden email]> wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: multiple email servers with authentication

AJ Weber
In reply to this post by Gee Fitz

I want to thank all who replied and close the loop...

I upgraded the server's monit version to 5.25.1 (latest in the repos at the time) and syntax was deemed OK.  I looked through the release notes and didn't find any mention of this from v5.14 (the version I was originally using) forward, but I guess it was fixed at some point.

I have not tested the backup mailserver yet (maybe I'll purposely change my credentials on the primary to test that).

This pseudo-example is apparently syntactically correct:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxxxxxxxx",
smtp.domain2.com port 465
username admin2 password "yyyyyyyyyyy"
using SSL
with timeout 10 seconds



On 5/29/2018 9:24 PM, Gee Fitz wrote:
Something like this?

set mailserver example.com port 587 username "user" password "password" using tlsv1,
example2.com port 25 username "user2" password "password2" using tlsv1 with timeout 30 seconds,
localhost

On Tue, May 29, 2018 at 10:08 PM, <[hidden email]> wrote:
I do use postfix. I read the SASL info, but I didn't notice a way to configure multiple defaults. I can look at that again.  (One thing I'm trying to monitor is postfix! 🙂)

Still, if monit supports multiple mailhosts and it supports smtp auth, it should support multiple mailhosts each with auth.



-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 9:02 PM
Subject: Re: multiple email servers with authentication

Well. You'll have more luck doing that in postfix or whatever you use to relay email. Did you look at ssmtp?


Can't remember if it supports multiple auth or protocols.

On Tue, May 29, 2018 at 9:51 PM, <[hidden email]> wrote:
I tried something similar (I moved the timeout to the one clause at the end). That didn't work. So it's not only "probably" not that syntax, it's definitely not that syntax.

And I read the docs. As you noticed, it does NOT document how to supply the auth and protocol per server, which is a very common requirement.

I should have commented that I'm currently running v5.14.


-----Original Message-----
From: Gee Fitz <[hidden email]>
To: This is the general mailing list for monit <[hidden email]>
Sent: Tue, 29 May 2018 8:37 PM
Subject: Re: multiple email servers with authentication

Documentation clearly says

-- Example (setting two mail servers for failover):
set mailserver smtp.gmail.com, smtp.other.host

So it's probably

set mailserver smtp.domain1.com port 587, smtp.domain2.com port 465
etcetera


On Tue, May 29, 2018 at 5:55 PM, AJ Weber <[hidden email]> wrote:
I am attempting to configure multiple (backup) mailserver's. Each has a unique username and password, and in fact, each has different ports, protocols, etc.

I have tried this:

set mailserver smtp.domain1.com port 587
username [hidden email] password "xxxxxxxxxx"
with timeout 30 seconds,
smtp.domain2.com port 465
username otheruser password "yyyyyyyyyyyyyyyyyy"
using SSL with timeout 30 seconds

This results in a configuration syntax error.

Can someone help me figure out how to configure my mailservers?

Thanks!

-AJ


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general





--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general