postfix multi-instances use the same port 25

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

postfix multi-instances use the same port 25

feier8097
I have two instances on one postfix server, The two instances have its own IP
and domain setting. The default instance is "postfix",The second instance is
"postfix1" created by using command "postmulti -I post1 -G outgoing -e
create". I've also set the smtp on the two instances both.and I also
installed dovecot too.

The default postfix main.cf:
+++++++++++++++++
myhostname = mail.example1.com
mydomain = example1.com
myorigin = $mydomain
mynetworks = 127.0.0.0/8, 10.0.0.0/24
home_mailbox = Maildir/
smtpd_banner = $myhostname ESMTP
smtpd_sasl_type = dovecot
message_size_limit = 10485760
mailbox_size_limit = 1073741824
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination, permit
broken_sasl_auth_clients = yes
multi_instance_directories = /etc/postfix1
++++++++++++++++++++

The postfix1 instance main.cf:
++++++++++++++++++++
inet_protocols = ipv4
multi_instance_group = outgoing
multi_instance_name = postfix1
myhostname = mail.example2.com
mydomain = example2.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8, 10.0.0.0/24
home_mailbox = Maildir/
smtpd_banner = $myhostname ESMTP
smtpd_sasl_type = dovecot
message_size_limit = 10485760
mailbox_size_limit = 1073741824
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination, permit
broken_sasl_auth_clients = yes
+++++++++++++++++++++++++++++++

then I  add a user "admin" to the system

The default postfix instance runs well when I use "admin" to login the third
smtp client, and the user "admin" send mail according to the default
instance.

but when I use the command "telnet mail.exampl2.com 25" to connect to the
postfix2 instance, the server returns "220 mail.example1.com ESMTP".
how to connect to the postfix2 instance by using smtp?thanks.

I also installed the MUTT to send email on the server When use the "telnet
mail.example1.com"



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: postfix multi-instances use the same port 25

Wietse Venema
feier8097:

> I have two instances on one postfix server, The two instances have its own IP
> and domain setting. The default instance is "postfix",The second instance is
> "postfix1" created by using command "postmulti -I post1 -G outgoing -e
> create". I've also set the smtp on the two instances both.and I also
> installed dovecot too.
>
> The default postfix main.cf:
> +++++++++++++++++
> myhostname = mail.example1.com
> mydomain = example1.com
> myorigin = $mydomain
> mynetworks = 127.0.0.0/8, 10.0.0.0/24
> home_mailbox = Maildir/
> smtpd_banner = $myhostname ESMTP
> smtpd_sasl_type = dovecot
> message_size_limit = 10485760
> mailbox_size_limit = 1073741824
> smtpd_sasl_path = private/auth
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_security_options = noanonymous
> smtpd_sasl_local_domain = $myhostname
> smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
> reject_unauth_destination, permit
> broken_sasl_auth_clients = yes
> multi_instance_directories = /etc/postfix1

This needs an inet_interfaces setting that DOES NOT CONTAIN 'all'
and that DOES NOT INCLUDE the IP address of the postfix1 instance.

After changing inet_interfaces, do "postfix stop".

> ++++++++++++++++++++
>
> The postfix1 instance main.cf:
> ++++++++++++++++++++
> inet_protocols = ipv4
> multi_instance_group = outgoing
> multi_instance_name = postfix1
> myhostname = mail.example2.com
> mydomain = example2.com
> myorigin = $mydomain
> inet_interfaces = all

This needs an inet_interfaces setting that ONLY CONTAINS
the IP address of the postfix1 instance.

After changing inet_interfaces, do "postfix reload".

> mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
> mynetworks = 127.0.0.0/8, 10.0.0.0/24
> home_mailbox = Maildir/
> smtpd_banner = $myhostname ESMTP
> smtpd_sasl_type = dovecot
> message_size_limit = 10485760
> mailbox_size_limit = 1073741824
> smtpd_sasl_path = private/auth
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_security_options = noanonymous
> smtpd_sasl_local_domain = $myhostname
> smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
> reject_unauth_destination, permit
> broken_sasl_auth_clients = yes
> +++++++++++++++++++++++++++++++
>
> then I  add a user "admin" to the system
>
> The default postfix instance runs well when I use "admin" to login the third
> smtp client, and the user "admin" send mail according to the default
> instance.
>
> but when I use the command "telnet mail.exampl2.com 25" to connect to the
> postfix2 instance, the server returns "220 mail.example1.com ESMTP".
> how to connect to the postfix2 instance by using smtp?thanks.
>
> I also installed the MUTT to send email on the server When use the "telnet
> mail.example1.com"
>
>
>
> --
> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
>
Reply | Threaded
Open this post in threaded view
|

Re: postfix multi-instances use the same port 25

feier8097
I change the postfix instance "inet_interfaces = postfix'ip "  and change the
postfix1 instance "inet_interfaces = postfix1'ip"
when telnet mail.example2.com 25, it returns "telnet: connect to address
x.x.x.x[postfix1'ip]: Connection refused".



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: postfix multi-instances use the same port 25

Wietse Venema
feier8097:
> I change the postfix instance "inet_interfaces = postfix'ip "  and change the
> postfix1 instance "inet_interfaces = postfix1'ip"
> when telnet mail.example2.com 25, it returns "telnet: connect to address
> x.x.x.x[postfix1'ip]: Connection refused".

Look in Postfix LOGS. If the second instance is not up, then fix that.
http://www.postfix.org/DEBUG_README.html#logging

Look at your TCP ports. If the second smtp port is not open, fix that.
# lsof -i

Look at your firewall rules. If it does not allow access to the
second instance, fix that.

And so on.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: postfix multi-instances use the same port 25

feier8097
I solved the problem, I forgot to start the postfix2. thanks a lot.



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html