LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-24-2009, 02:27 PM   #1
trekgirl
Member
 
Registered: Feb 2009
Location: Bremerton, WA, USA
Distribution: Red Hat
Posts: 60

Rep: Reputation: 26
Email server running Postfix will not accept email...


I have an email server that I have built with Fedora Core 5. I went with Postfix since rumor had it that it was easier to configure than Sendmail. MX and A records were put on the DNS server, and I did basic configuration. I can send an email internally to it and get one back as well. The problem comes when our ISP tries to send a message to it. It is getting through our firewall (I checked the logs) but my machine is rejecting it. I don't see anything in the logs on my server about a rejection. When I try to telnet to it, I get the message "Could not open connection to host on port 25, connect failed." I've got to be missing something...it should be receiving mail on port 25 since it does get mail that I send to it from here. Internally the mail is being sent from mail.domain1.com to spam.domain2.com. Two seperate servers... and it works. Just not from outside. Is this a trust issue? If so...beings as how I can email to it from within our network, why can't I telnet to it? And the biggest question, why can't our ISP send mail to it (it rejects it...but why?)
THANKS!!!!
 
Old 02-24-2009, 08:58 PM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
a lot of ISP now is blocking port 25 after that they assigned different port for that purpose , you need to visit ISP website they mightbe states
there what the port need to change, this is for DSL or home user

for data center email server dont have this kind of problem
 
Old 02-25-2009, 10:57 AM   #3
trekgirl
Member
 
Registered: Feb 2009
Location: Bremerton, WA, USA
Distribution: Red Hat
Posts: 60

Original Poster
Rep: Reputation: 26
This is for a business, we are not using a simple cable/DSL connection. We have an MS Exchange server using port 25 so that can't be the issue. As I stated before email from internal (inside of our two domains) can get to it just fine just not external mail. That would be using port 25 also. I suspect a configuration issue on my end. Anybody have any ideas?
 
Old 02-25-2009, 08:48 PM   #4
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
Do u mean when u are inside the office you can send and receive email but if you go
outside office and use that mail then it give problem

if this satuation before sending email from outside, u must use your
internet provider smtp server, not your email smtp server
 
Old 02-25-2009, 09:11 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Th logs would help a lot here, but is the message you are trying to accept destined for this machine or are you relaying to another? If the latter, it is most likely as "trust" issue as you say, but otherwise probably not.

Start by posting " netstat -nalp | grep :25" and "postconf -n", plus the log entries around the relevant time.
 
Old 03-02-2009, 11:40 AM   #6
trekgirl
Member
 
Registered: Feb 2009
Location: Bremerton, WA, USA
Distribution: Red Hat
Posts: 60

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by billymayday View Post
Th logs would help a lot here, but is the message you are trying to accept destined for this machine or are you relaying to another? If the latter, it is most likely as "trust" issue as you say, but otherwise probably not.

Start by posting " netstat -nalp | grep :25" and "postconf -n", plus the log entries around the relevant time.
I'm sorry its taken me so long to get back to you. I did something that messed it up and couldn't figure out how to fix it so I tried to restore it only to find that the backup was bad so I had to rebuild the server from scratch.
Our internet is down right now so the I will have to wait to get the postconf results to you. Since it has confidential info in it, could I possibly email it to you?
Here is the result of netstat:
tcp 0 0 0.0.0.0:25 0.0.0.0:* LIST
EN 3086/master
Hope this at least begins to help.
Thanks for your time on this!!
 
Old 03-02-2009, 01:24 PM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
At least postfix is listening on port 25 (the process is master, as in master.cf).

The only confidential stuff in postconf -n should probably be you domain name and public IPs, and you'd be better off posting with those changed to example.com and 12.34.56.78 or similar so more eyes can look for a solution. It seems to work for everyone else OK.

Also, make sure you post relevant logs for a connection attempt.

What happens when you try and connect via telnet from the server to itself (ie telnet localhost 25)?
 
Old 03-02-2009, 04:00 PM   #8
trekgirl
Member
 
Registered: Feb 2009
Location: Bremerton, WA, USA
Distribution: Red Hat
Posts: 60

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by billymayday View Post
At least postfix is listening on port 25 (the process is master, as in master.cf).

The only confidential stuff in postconf -n should probably be you domain name and public IPs, and you'd be better off posting with those changed to example.com and 12.34.56.78 or similar so more eyes can look for a solution. It seems to work for everyone else OK.

Also, make sure you post relevant logs for a connection attempt.

What happens when you try and connect via telnet from the server to itself (ie telnet localhost 25)?
When I telnet in this is what I get:
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 domain1.com ESMTP Postfix

When I ran postconf this is what I got:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = /usr/share/doc/postfix-2.4.1-documentation/html
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, domain2.com
mydomain = domain1.com
myhostname = domain1.com
myorigin = domain1.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.4.1-documentation/readme
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

Hope this is what you need. Let me know if you need more. Thanks!!
 
Old 03-03-2009, 01:34 PM   #9
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Where are the logs?
 
Old 03-03-2009, 02:36 PM   #10
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
I am guessing above is the out put of 'postconf -n' command.

If so, please change your 'myhostname = domain1.com' to fqdn which is to include the Postfix mail servers hostname as so:

'myhostname = mail.domain1.com'

Also - I don't see a home_mailbox = Maildir/ parameter if that is what you're trying to do. Normally you set your Postfix mail server to have a mbox or Maildir style mailbox. Or you could be doing something fancy with MySQL so that is what I ask.

Always reload postfix after every single change so you know what made or broke your system:

Code:
/etc/init.d/postfix reload
 
Old 03-03-2009, 06:09 PM   #11
trekgirl
Member
 
Registered: Feb 2009
Location: Bremerton, WA, USA
Distribution: Red Hat
Posts: 60

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by Carlwill View Post
I am guessing above is the out put of 'postconf -n' command.

If so, please change your 'myhostname = domain1.com' to fqdn which is to include the Postfix mail servers hostname as so:

'myhostname = mail.domain1.com'

Also - I don't see a home_mailbox = Maildir/ parameter if that is what you're trying to do. Normally you set your Postfix mail server to have a mbox or Maildir style mailbox. Or you could be doing something fancy with MySQL so that is what I ask.

Always reload postfix after every single change so you know what made or broke your system:

Code:
/etc/init.d/postfix reload
myhostname was changed purposefully to keep the addresses confidential but I appreciate your help.
 
Old 03-03-2009, 06:13 PM   #12
trekgirl
Member
 
Registered: Feb 2009
Location: Bremerton, WA, USA
Distribution: Red Hat
Posts: 60

Original Poster
Rep: Reputation: 26
So my server is now up and running. I spoke with the gentleman at our ISP, who happens to love Linux. There were two issues. The first was that my coworker put the wrong IP into the firewall. Once that issue had been resolved, I had to put the IP address for the ISP into the mynetworks line in the main.cf file. And boom...my baby had its first viagra ad. It was built to take the spam load off of the Microsoft Exchange Server box.
Thank you so much everybody for your help. I'm sure that I'll be on here all the time...learning as much as I can. I was thinking of setting up a linux box at home.
 
Old 03-04-2009, 01:43 AM   #13
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You shouldn't need the ISP's IP in mynetworks (in fact you may make yourself an open relay that way).

Can you explain why you think that is necessary, and if you aren't sure, try without it. mydestination determines what senders your server will relay for. Accepting mail for end users isn't relaying.

@Carlwill, "postconf -n" only shows changes from defaults btw.
Rgds

BM

Last edited by billymayday; 03-04-2009 at 01:44 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Email Can't Receive External Email rkibui Linux - Newbie 5 02-22-2009 05:45 AM
how to configure dovecot&sendmail&postfix to accept other domain email? hocheetiong Linux - Server 3 12-24-2007 03:55 AM
POSTFIX Email Can't Receive External Email carlosinfl Linux - Server 2 10-15-2007 06:00 AM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 04:43 AM
Is Postfix an Email Server? Gib Sandwich Linux - Software 6 08-24-2004 02:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:16 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