Email server running Postfix will not accept email...
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!!!!
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
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?
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.
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!!
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)?
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
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:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.