LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2016, 08:26 AM   #1
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Rep: Reputation: Disabled
postfix instance


Hello
I was configured the posfix on two ip address
postfix status
postfix/postfix-script: the Postfix mail system is running: PID: 19218
postfix-second/postfix-script: the Postfix mail system is running: PID: 19287

but when i run the netstat command
like this
netstat -nlp | grep 2525
tcp 0 0 xx:xx:xx:xx:2525 0.0.0.0:* LISTEN 19218/master

but my second ip address listen port not shown
plese help me how can i resolve this issues
 
Old 09-16-2016, 04:59 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You have 2 nic cards?

Edit, ok forget this question
http://www.postfix.org/MULTI_INSTANCE_README.html

Last edited by keefaz; 09-16-2016 at 05:07 PM.
 
Old 09-17-2016, 03:11 AM   #3
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
Thanks for your reply

i followed step which u mentioned this link
http://www.postfix.org/MULTI_INSTANCE_README.html

still my second postfix instance not working

telnet info.thinknote.in 2525
Trying xx.xx.xx.12...
telnet: connect to address xx.xx.xx.12: Connection refused

can you please resolve this issues

Last edited by harish-mn; 09-17-2016 at 01:37 PM.
 
Old 09-17-2016, 03:29 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by harish-mn View Post
Thanks for your reply

i followed step which u mentioned this link
http://www.postfix.org/MULTI_INSTANCE_README.html

still my second postfix instance not working

telnet info.thinknote.in 2525
Trying 46.166.162.12...
telnet: connect to address 46.166.162.12: Connection refused

can you please resolve this issues
A firewall blocking port 2525?
 
Old 09-17-2016, 04:02 AM   #5
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Maybe strace -p ..... (on the 2nd PID); also lsof!
Post diff of the 2 config files
Does -second work *IF run ALONE*? data_direcotry *MUST* be different!
*maybe* experiment with using port 225 (instead of 2525 [ms-v-worlds])
(telnet localhost 2525? ifconfig -a to check both ip's...)

Last edited by Jjanel; 09-17-2016 at 05:20 AM.
 
Old 09-17-2016, 06:06 AM   #6
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
I assigned the port 2525 in master.cf file on both postfix instance
there is two ip address
xx.xx.xx.96
xx.xx.xx.12

first postfix instance (xx.xx.xx.96) working fine
telnet xxxxxxxx.in 25
Trying xx.xx.xx.96...
telnet: connect to address xx.xx.xx.96: Connection refused
[root@QVM730 ~]# telnet xxxxxxxx.in 2525
Trying xx.xx.xx.96...
Connected to xxxxxxxx.in.
Escape character is '^]'.
220 host.xxxxxxxx.in ESMTP Postfix (2.10.1)
ehlo xxxxxxxx.in
250-host.xxxxxxxx.in
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:conatct@xxxxxxxx.in
250 2.1.0 Ok
rcpt to:harshml26@gmail.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
hjasbdsajd
.
250 2.0.0 Ok: queued as 0C7FD2006179CF
quit
221 2.0.0 Bye
Connection closed by foreign host.

second postfix instance xx.xx.xx.12 not working
telnet info.xxxxxxxx.in 2525
Trying xx.xx.xx.12...
telnet: connect to address xx.xx.xx.12: Connection refused

here is config file of the both postfix
first one is xx.xx.xx.96
In main.cf file
queue_directory = /var/spool/postfix
myhostname = host.xxxxxxxx.in
mydomain = xxxxxxxx.in
myorigin = $mydomain
inet_interfaces = xxxxxxxx.in
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = xx.xx.xx.96/28, 127.0.0.0/8

In master.cf file
xx.xx.xx.96:2525 inet n - n - - smtpd

second postfix
queue_directory = /var/spool/postfix-xx.xx.xx.12
myhostname = info.xxxxxxxx.in
mydomain = info.xxxxxxxx.in
myorigin = $mydomain
inet_interfaces = info.xxxxxxxx.in
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = xx.xx.xx.12/28, 127.0.0.0/8

In master.cf file
xx.xx.xx.12:2525 inet n - n - - smtpd

postfix status
postfix/postfix-script: the Postfix mail system is running: PID: 958
postfix-xx.xx.xx.12/postfix-script: the Postfix mail system is running: PID: 1027

Last edited by harish-mn; 09-17-2016 at 01:39 PM.
 
Old 09-17-2016, 07:43 AM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
For inet_interfaces setting, did you try using IP instead of hostname?
mydomain should be domain part of hostname (eg: thinkxxxx.xx)

Last edited by keefaz; 09-17-2016 at 05:28 PM.
 
Old 09-17-2016, 08:33 AM   #8
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
i done which u mentioned still facing the same issues
in inet_interfaces setting
inet_interfaces = xx.xx.xx.12
mydomain = xxxxxxxx.in


telnet info.xxxxxxxx.in 2525
Trying xx.xx.xx.12...
telnet: connect to address xx.xx.xx.12: Connection refused

Last edited by harish-mn; 09-17-2016 at 01:40 PM.
 
Old 09-17-2016, 09:17 AM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
could you post output with
Code:
ifconfig -a
And with:
Code:
iptables -L -v -n
 
Old 09-17-2016, 10:15 AM   #10
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
[root@QVM730 ~]# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xx.xx.96 netmask 255.255.255.0 broadcast xx.xx.xx.255
inet6 fe80::5052:4ff:fe00:1103 prefixlen 64 scopeid 0x20<link>
ether 52:52:04:00:11:03 txqueuelen 1000 (Ethernet)
RX packets 29517 bytes 3096759 (2.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18001 bytes 2803988 (2.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xx.xx.12 netmask 255.255.255.0 broadcast xx.xx.xx.255
ether 52:52:04:00:11:03 txqueuelen 1000 (Ethernet)

eth0:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xx.xx.84 netmask 255.255.255.0 broadcast xx.xx.xx.255
ether 52:52:04:00:11:03 txqueuelen 1000 (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 35 bytes 2900 (2.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 35 bytes 2900 (2.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


....................................
[root@QVM730 ~]# iptables -L -v -n
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
14544 1826K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
2 300 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
419 33859 INPUT_direct all -- * * 0.0.0.0/0 0.0.0.0/0
419 33859 INPUT_ZONES_SOURCE all -- * * 0.0.0.0/0 0.0.0.0/0
419 33859 INPUT_ZONES all -- * * 0.0.0.0/0 0.0.0.0/0
43 3919 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
183 10720 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_direct all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_IN_ZONES_SOURCE all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_IN_ZONES all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_OUT_ZONES_SOURCE all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_OUT_ZONES all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT 18165 packets, 2581K bytes)
pkts bytes target prot opt in out source destination
18165 2581K OUTPUT_direct all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FORWARD_IN_ZONES (1 references)
pkts bytes target prot opt in out source destination
0 0 FWDI_home all -- eth0 * 0.0.0.0/0 0.0.0.0/0 [goto]
0 0 FWDI_home all -- + * 0.0.0.0/0 0.0.0.0/0 [goto]

Chain FORWARD_IN_ZONES_SOURCE (1 references)
pkts bytes target prot opt in out source destination

Chain FORWARD_OUT_ZONES (1 references)
pkts bytes target prot opt in out source destination
0 0 FWDO_home all -- * eth0 0.0.0.0/0 0.0.0.0/0 [goto]
0 0 FWDO_home all -- * + 0.0.0.0/0 0.0.0.0/0 [goto]

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
pkts bytes target prot opt in out source destination

Chain FORWARD_direct (1 references)
pkts bytes target prot opt in out source destination

Chain FWDI_home (2 references)
pkts bytes target prot opt in out source destination
0 0 FWDI_home_log all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FWDI_home_deny all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FWDI_home_allow all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FWDI_home_allow (1 references)
pkts bytes target prot opt in out source destination

Chain FWDI_home_deny (1 references)
pkts bytes target prot opt in out source destination

Chain FWDI_home_log (1 references)
pkts bytes target prot opt in out source destination

Chain FWDO_home (2 references)
pkts bytes target prot opt in out source destination
0 0 FWDO_home_log all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FWDO_home_deny all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 FWDO_home_allow all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FWDO_home_allow (1 references)
pkts bytes target prot opt in out source destination

Chain FWDO_home_deny (1 references)
pkts bytes target prot opt in out source destination

Chain FWDO_home_log (1 references)
pkts bytes target prot opt in out source destination

Chain INPUT_ZONES (1 references)
pkts bytes target prot opt in out source destination
419 33859 IN_home all -- eth0 * 0.0.0.0/0 0.0.0.0/0 [goto]
0 0 IN_home all -- + * 0.0.0.0/0 0.0.0.0/0 [goto]

Chain INPUT_ZONES_SOURCE (1 references)
pkts bytes target prot opt in out source destination

Chain INPUT_direct (1 references)
pkts bytes target prot opt in out source destination

Chain IN_home (2 references)
pkts bytes target prot opt in out source destination
419 33859 IN_home_log all -- * * 0.0.0.0/0 0.0.0.0/0
419 33859 IN_home_deny all -- * * 0.0.0.0/0 0.0.0.0/0
419 33859 IN_home_allow all -- * * 0.0.0.0/0 0.0.0.0/0

Chain IN_home_allow (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:631 ctstate NEW
0 0 ACCEPT udp -- * * 0.0.0.0/0 224.0.0.251 udp dpt:5353 ctstate NEW
156 12168 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:137 ctstate NEW
28 6552 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:138 ctstate NEW
8 xx0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ctstate NEW
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 ctstate NEW
1 40 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ctstate NEW

Chain IN_home_deny (1 references)
pkts bytes target prot opt in out source destination

Chain IN_home_log (1 references)
pkts bytes target prot opt in out source destination

Chain OUTPUT_direct (1 references)
pkts bytes target prot opt in out source destination

Last edited by harish-mn; 09-17-2016 at 01:40 PM.
 
Old 09-17-2016, 11:13 AM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Any error in /var/log/mail.log (or /var/log/maillog)?
 
Old 09-17-2016, 11:18 AM   #12
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
i think no error in mail log

here is mail log

Sep 17 14:23:42 QVM730 postfix/smtpd[2660]: disconnect from xxxxxxxx.in[xx.xx.xx.96]
Sep 17 16:13:45 QVM730 postfix/postfix-script[2880]: the Postfix mail system is running: PID: 2488
Sep 17 16:13:45 QVM730 postfix-xx.xx.xx.12/postfix-script[2888]: the Postfix mail system is running: PID: 2558
Sep 17 16:14:03 QVM730 postfix/smtpd[2892]: connect from xxxxxxxx.in[xx.xx.xx.96]
Sep 17 16:14:58 QVM730 postfix/smtpd[2892]: 808EF2006179BA: client=xxxxxxxx.in[xx.xx.xx.96]
Sep 17 16:15:05 QVM730 postfix/cleanup[2895]: 808EF2006179BA: message-id=<20160917161458.808EF2006179BA@host.xxxxxxxx.in>
Sep 17 16:15:05 QVM730 postfix/qmgr[2490]: 808EF2006179BA: from=<contact@xxxxxxxx.in>, size=337, nrcpt=1 (queue active)
Sep 17 16:15:07 QVM730 postfix/smtp[2896]: 808EF2006179BA: to=<harshmn023@gmail.com>, relay=gmail-smtp-in.l.google.com[64.233.xx.27]:25, delay=47, delays=xx/0.04/0.35/0.84, dsn=2.0.0, status=sent (250 2.0.0 OK 1474128907 o71si4050160lfi.210 - gsmtp)
Sep 17 16:15:07 QVM730 postfix/qmgr[2490]: 808EF2006179BA: removed
Sep 17 16:15:07 QVM730 postfix/smtpd[2892]: disconnect from xxxxxxxx.in[xx.xx.xx.96]

Last edited by harish-mn; 09-17-2016 at 01:41 PM.
 
Old 09-17-2016, 11:29 AM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
When you start the second postfix instance, you use: postfix -c /path/to/2nd_config_directory?
Permissions for the 2nd_config_directory are ok?
 
Old 09-17-2016, 11:50 AM   #14
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
sorry am not getting

i gave the permissions to the both postfix instance

can you please explain briefly
 
Old 09-17-2016, 12:08 PM   #15
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You have set a directory for the second postfix where you put its configuration files?

Also just wondering, xx.xxx.162.96 and xx.xxx.162.12 are public IPs, no? You own both?

Last edited by keefaz; 09-17-2016 at 05:29 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix 2.6.6 postfix/cleanup and postfix/master errors Pummelmuffin Linux - Server 2 11-22-2020 12:50 PM
postfix instance saurabhkumar Linux - Server 1 04-13-2014 06:25 PM
[SOLVED] Switch to instance instead of creating a new instance of a program javascriptninja Linux - Newbie 8 01-28-2012 03:39 PM
Postfix: postfix: fatal: chdir(/usr/libexec/postfix) Micro420 Ubuntu 2 07-13-2008 12:21 PM
Second postfix instance divingdave Linux - Software 0 07-16-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration