LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Thread Tools
Old 11-03-2009, 12:44 AM   #1
saifurab
LQ Newbie
 
Registered: Mar 2007
Posts: 24
Thanked: 0
postfix mail server


[Log in to get rid of this advertisement]
Dear Experts,

I have installed postfix which has public ip address 174.x.x.x and I want to use that smtp to send email from 124.109.34.3 but I can't. I can send emails locally using this smtp but cannot even telnet from
this IP 124.109.34.3.

# nmap 174.x.x.x doesn't show that 25 port is open but
#namp localhost shows that 25 port is opened.

I have disabled selinux and firewall. my configuration files are below.

My main.cf is

# grep -v ^# /etc/postfix/main.cf | grep -v ^$
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = mailserv.domainname.com
mydomain = domainname.com
inet_interfaces = all
inet_interfaces = $myhostname
inet_interfaces = $myhostname, localhost
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks = 10.0.0.0/8, 127.0.0.0/8, 124.109.34.3/32
relay_domains=
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

and master.cf


# grep -v ^# /etc/postfix/master.cf | grep -v ^$
smtp inet n - n - - smtpd -v
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
windows_vista saifurab is offline     Reply With Quote
Old 11-03-2009, 05:00 AM   #2
Guttorm
Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 604
Thanked: 33
Hi

It looks like you have inet_interfaces many times in the config file. And then only the last one is used. I would try to remove them all, since the default value is "all".

If the server has many networks, and it should only listen to some of them, you have need to specify which it should listen on. Here is some info:

http://www.postfix.org/postconf.5.html
windows_xp_2003 Guttorm is offline     Reply With Quote
Old 11-03-2009, 05:22 AM   #3
saifurab
LQ Newbie
 
Registered: Mar 2007
Posts: 24
Thanked: 0

Original Poster
noaw my main.cf but still same problem

# grep -v ^# /etc/postfix/main.cf | grep -v ^$
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = mailserv.domainname.com
mydomain = domainname.com
inet_interfaces = all
unknown_local_recipient_reject_code = 550
mynetworks = 10.0.0.0/8, 127.0.0.0/8, 124.109.34.3/32
relay_domains=
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
windows_vista saifurab is offline     Reply With Quote
Old 11-03-2009, 07:58 AM   #4
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 73
Thanked: 0
Quote:
have installed postfix which has public ip address 174.x.x.x and I want to use that smtp to send email from 124.109.34.3 but I can't. I can send emails locally using this smtp but cannot even telnet from
this IP 124.109.34.3.
So your public IP is 172.x.x.x.
Is postfix installed on the machine that has the public IP, or are you behind a router with NAT?
linuxfedora ptemmerman is offline     Reply With Quote
Old 11-03-2009, 11:10 AM   #5
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 73
Thanked: 0
Might help as well:

http://www.linuxquestions.org/questi...ywhere-335981/
linuxfedora ptemmerman is offline     Reply With Quote
Old 11-03-2009, 11:24 AM   #6
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 246
Thanked: 3
Too much guesswork.
Code:
 netstat -lnt |grep 25
will show you where postfix is listening.
Then you'll know if you have to look at postfix config or at your firewall.
windows_xp_2003 rupertwh is offline     Reply With Quote
Old 11-04-2009, 02:01 AM   #7
saifurab
LQ Newbie
 
Registered: Mar 2007
Posts: 24
Thanked: 0

Original Poster
Quote:
# netstat -lnt |grep 25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
the public ip starts from 174...no firewall running at the moment
windows_vista saifurab is offline     Reply With Quote
Old 11-04-2009, 04:02 AM   #8
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 73
Thanked: 0
Quote:
Originally Posted by saifurab View Post
the public ip starts from 174...no firewall running at the moment
My guess is that you are behind NAT..
linuxfedora ptemmerman is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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,Open web mail Mail Server Hostname /FQDN Porblem farrukhndm Linux - Server 7 02-18-2009 07:35 PM
Ubuntu server with postfix. My mail goes to Spam in Gmail and Yahoo Mail. Ideeas? bob808 Linux - Server 4 02-07-2009 05:11 PM
LXer: Debian Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail LXer Syndicated Linux News 0 03-12-2008 11:50 PM
problem receiving pop3 mail from postfix mail server GEN_Electric Linux - Software 2 02-14-2005 03:43 PM
Postfix mail server not accepting incoming mail from the external interface rexmundi Linux - Networking 7 12-22-2003 04:41 PM


All times are GMT -5. The time now is 09:58 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration