LinuxQuestions.org
Help answer threads with 0 replies.
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-17-2016, 12:27 PM   #16
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled

first and second both postfix directory is located in /etc/

[root@QVM730 etc]# cd /etc/
[root@QVM730 etc]# ls
acpi dhcp gss magic pear.conf rc.local sudoers
adjtime DIR_COLORS host.conf mailcap php.d rdma sudoers.d
aliases DIR_COLORS.256color hostname mail.rc php.ini redhat-release sudo-ldap.conf
aliases.db DIR_COLORS.lightbgcolor hosts makedumpfile.conf.sample phpMyAdmin resolv.conf sysconfig
alternatives dnsmasq.conf hosts.allow man_db.conf php-tcpdf rpc sysctl.conf
anacrontab dnsmasq.d hosts.deny mime.types pkcs11 rpm sysctl.d
audisp dovecot httpd mke2fs.conf pki rsyslog.conf systemd
audit dracut.conf init.d modprobe.d plymouth rsyslog.d system-release
avahi dracut.conf.d inittab modules-load.d pm rwtab system-release-cpe
bash_completion.d e2fsck.conf inputrc motd polkit-1 rwtab.d tcsd.conf
bashrc environment iproute2 mtab popt.d sasl2 terminfo
binfmt.d ethertypes issue my.cnf postfix screenrc tmpfiles.d
centos-release exports issue.net my.cnf.d postfix-xx.xx.xx.12 securetty tuned
centos-release-upstream favicon.png kdump.conf nanorc ppp security udev
chkconfig.d filesystems kernel NetworkManager prelink.conf.d selinux vconsole.conf
cron.d firewalld krb5.conf networks printcap sensu vimrc
cron.daily fonts ld.so.cache nsswitch.conf profile services virc
cron.deny fstab ld.so.conf nsswitch.conf.bak profile.d sestatus.conf wgetrc
cron.hourly gcrypt ld.so.conf.d ntp protocols shadow wpa_supplicant
cron.monthly gnupg libaudit.conf ntp.conf python shadow- X11
crontab GREP_COLORS libnl odbcinst.ini rc0.d shells xdg
cron.weekly groff libuser.conf openldap rc1.d skel xinetd.conf
crypttab group locale.conf opt rc2.d snmp xinetd.d
csh.cshrc group- localtime os-release rc3.d ssh yum
csh.login grub2.cfg login.defs pam.d rc4.d ssl yum.conf
dbus-1 grub.d logrotate.conf passwd rc5.d statetab yum.repos.d
default gshadow logrotate.d passwd- rc6.d statetab.d
depmod.d gshadow- machine-id pear rc.d sudo.conf



this ip address my own ...this ip address configured in my network

[root@QVM730 ~]# hostname -I
xx.xx.xx.96 xx.xx.xx.12 xx.xx.xx.84

[root@QVM730 ~]# /sbin/ifconfig
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 259273 bytes 19961183 (19.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 59893 bytes 9729447 (9.2 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 79 bytes 5573 (5.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 79 bytes 5573 (5.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Maybe you should hide/mask your public ips (and mail addresses) on a forum, especially if running mail servers, we never know

So the postfix configuration directory for the 2nd server is /etc/postfix-xx.xxx.162.12
How did you start the 2nd server, like this?
postfix -c /etc/postfix-xx.xxx.162.12
 
Old 09-17-2016, 01:17 PM   #18
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
Thanks for your suggestions keefaz

when i install the postfix by using yum install postfix

then its automatically postfix directory created in /etc/postfix and next i changed the some information in main.cf and master.cf
like this
myhostname = host.xxxxxxx.com
mydomain = xxxxx.com
myorigin = $mydomain
inet_interfaces = xxxxxx.com
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = xx.xx.xx.96/28, 127.0.0.0/8

in master.cf
xx.xx.xx.96:2525 inet n - n - - smtpd

after that

cp -rp /etc/postfix /etc/postfix-xx.xx.xx.12

then another one folder(postfix-xx.xx.xx.12) are created in /etc

then i changed information in main.cf and master.cf


postfix -c /etc/postfix2 reload
 
Old 09-17-2016, 02:59 PM   #19
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
But /etc/postfix2 exists?
Did you try: postfix -c /etc/postfix-xx.xx.xx.12
Also did you try disabling the firewall just the time to test telnet info.x.x 2525
 
Old 09-17-2016, 07:07 PM   #20
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
EDIT: sorry, I [Newbie] didn't see all the new posts when I wrote this,
so this may ALL be irrelevant.

Quote:
postfix/postfix-script: the Postfix mail system is running: PID: 19218
tcp 0 0 xx:xx:xx:xx:2525 0.0.0.0:* LISTEN 19218/master

In master.cf file
xx.xx.xx.96:2525 inet n - n - - smtpd
Why is the first (...96) 'using' port 2525? Mistake?
(yet it responds to port 25) (try telnet ...12 25)

**I don't know postfix, so I don't know how master.cf works.

There also MIGHT be a basic netmask issue: (again, I'm not sure)
ifconfig says 255.255.255.0 which is not /28 (in postfix configS)
Post netstat -rn; netstat -nlp | grep 25

In addition to the [extreme] debugging technique of strace,
I'm wondering if there is a way to 'trace' the relevant net pkts...
(I assume all the telnet cmds are being run on the [postfix server] host itself...)

Last edited by Jjanel; 09-17-2016 at 07:23 PM.
 
Old 09-18-2016, 01:45 AM   #21
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
netstat -nlp | grep 25
tcp 0 0 xx.xx.xx.96:25 0.0.0.0:* LISTEN 6557/master
unix 2 [ ACC ] STREAM LISTENING 12562 1/systemd /var/run/dbus/system_bus_socket


[root@I ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 xx.xx.xx.1 0.0.0.0 UG 0 0 0 eth0
xx.xx.xx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 
Old 09-18-2016, 02:29 AM   #22
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Now, nothing appears to be listening on 2525!
Check ( with ps -ax) to see that the second is running.
Then use strace -p ... to see what it's doing.

Can you try running *only* the second one (without the 1st running) & telnet to it
(both 25 and 2525)...

(I'm not sure how to tell if the netmask might be a problem; hopefully another LQ'er can comment on this. i.e., is the mynetworks.../28 ok?
Also, shouldn't the 1st's master.cf have 25, not 2525?)

By any chance, did you actually want/need all three eth0 to be /28?

Last edited by Jjanel; 09-18-2016 at 02:44 AM.
 
Old 09-18-2016, 06:20 AM   #23
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
@Jjanel, you're right on network mask, xx.xx.xx.96/28 excludes xx.xx.xx.96 from the IPs range, but next setting 127.0.0.0/8 allows it from local
 
Old 09-18-2016, 07:05 AM   #24
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
@Jjanel

i was run the second instance with port 25 and 2525
still in telnet its shows connection refused

in second instance(main.cf)
my entry is
mynetworks = xx.xx.xx.12/28, 127.0.0.0/8


is this correct?
 
Old 09-18-2016, 08:33 AM   #25
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
guys

both postfix instance working fine

here is the status
postfix/postfix-script: the Postfix mail system is running: PID: 10860
postfix-xx.xx.xx.12/postfix-script: the Postfix mail system is running: PID: 10943


i think this is port issues because in netstat -nlp| grep 25 its showing only one ip address port
i.e first ip address
second one is not showing

can you please tell me how to enable the port on selective ip address
 
Old 09-18-2016, 09:07 AM   #26
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
It's in master.cf file in /etc/postfix-xx.xx.xx.12
<IP>:<Port Number>

Could you change mynetworks in main.cf in /etc/postfix-xx.xx.xx.12
and keep only local subnet, just to test

mynetworks = 127.0.0.0/8
 
Old 09-18-2016, 09:28 AM   #27
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
i assigned the mynetworks = 127.0.0.0/8 in main.cf in /etc/postfix-xx.xx.xx.12

but still its doent showing anything


[root@I ~]# netstat -nlp | grep 25
tcp 0 0 xx.xx.xx.96:25 0.0.0.0:* LISTEN 11923/master
unix 2 [ ACC ] STREAM LISTENING 12562 1/systemd /var/run/dbus/system_bus_socket


[root@I ~]# telnet info.xxxxx.in 25
Trying xx.xx.xx.12...
telnet: connect to address xx.xx.xx.12: Connection refused


how to restart the second postfix instance?
service postfix restart ..it will applied for only default postfix
 
Old 09-18-2016, 09:49 AM   #28
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
you can always start it manually (without service command)
# postfix -c /etc/postfix-xx.xx.xx.12
 
Old 09-18-2016, 09:55 AM   #29
harish-mn
Member
 
Registered: Sep 2016
Posts: 37

Original Poster
Rep: Reputation: Disabled
postfix -c /etc/postfix-xx.xx.xx.12


postfix-xx.xx.xx.12/postfix-script: error: unknown command: ''
postfix-xx.xx.xx.12/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)
 
Old 09-18-2016, 11:33 AM   #30
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
mmh, maybe: postfix -c /etc/postfix-xx.xx.xx.12 start
 
  


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 07:41 AM.

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