Hope this is the right way to form this question...
Linux - NewbieThis 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
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.
Hope this is the right way to form this question...
netstat -tna gives the following output (concat)
Code:
tcp 0 0 127.0.0.1:4011 0.0.0.0:* LISTEN
So I think that is saying that interface 127.0.0.1 is listening on port 4011..which is almost, i think, what I need to be happening.
I am trying to set up an email server for my website, so that oscommerce is able to send out it's emails etc, etc. My isp (comcast) blocks smtp port so to work around that I'm using a different port. Yesterday when I did a port scan of my external IP address and scanned port 4011 i got that it was open and responding, today that is not the case. So I did a netstat and the preceding output is what I got.
so i'm assuming that I cannot get to that port because my internal ip address mapped to my external ip via my router is not connect with this port 4011, so I cannot telnet to it and consequently it cannot send messages to the outside world.
Is there a way to have this port listening on a different interface (192.168.1.2 exactly)
Thank you for any help and sorry if this question is ridiculous, I'm not sure how to even form it or if this is the way to go about getting done what I need done. I'm not entirely a linux newbie but I am fairly inexperienced in this type of stuff.
By the way I'm using Postfix for email service if that is relevant.
Add a p to your netstat parameters. That will show you the program that is using the socket.
This shows that the cupsd daemon is listening on port 631. Be sure to use the root account or sudo to issue the command.
I know what program is listening on that port. I guess this is a Postfix question. How do I change postfix listening on that port at 127.0.0.1 to listening at 192.168.1.2 on the port?
I've never set up an MTA so I don't know how to configure one. Maybe someone who knows how to configure Postfix can jump in here, or you could read the user manual.
By default, Postfix tries to deliver mail directly to the Internet. Depending on your local conditions this may not be possible or desirable. For example, your system may be turned off outside office hours, it may be behind a firewall, or it may be connected via a provider who does not allow direct mail to the Internet. In those cases you need to configure Postfix to deliver mail indirectly via a relay host.
Examples (specify only one of the following):
Code:
/etc/postfix/main.cf:
relayhost = (default: direct delivery to Internet)
relayhost = $mydomain (deliver via local mailhub)
relayhost = [mail.$mydomain] (deliver via local mailhub)
relayhost = [mail.isp.tld] (deliver via provider mailhub)
I realize that relaying via your ISP is easier but it's also not without conditions, of which I am not willing to live with. They put a very strict and very low limit on the amount of emails you can send, a limit I do not even come close to approaching on a day to day basis but exceed on a quarterly basis when I do my contact list emails for my business. In the past I have had to spread them out over several days or pay another company to do them for me and this is my attempt to do them myself and save some money.
So my netstat says postfix is running and it's listening on all interfaced on port 4011. That being the case why do I continue to receive cannot connect port 25 errors when sending emails to myself?
You keep saying you get the error can't connect to port 25 but you never state where this error appears..
What you are doing to when the error shows up?
Does it appear on the Screen ?
Is it in some log file ?
you need to provide more info.
For all I know your Mail Client is trying to connect to to the mail server via the standard port (25)..
I used evolution to send the internal message and I've used Webmin to send emails using the Postfix module. The error shows up in the Postfix Mail Queue screen of webmin.
Code:
Mail ID Sent From To Size Status
6778011B60BF 2009/03/30 15:10 owner@*********.com *******@yahoo.com 435 bytes connect to mail.*******.com[x.x.x.x]:25: Connection refused
B851B11B60C4 2009/03/30 15:11 owner@*********.com root@*********.com 434 bytes connect to mail.*********.com[x.x.x.x]:25: Connection refused
Here is the exact error message. The same thing happens whether sending to an internal user (owner@*********.com) or external email address (*********@yahoo.com). I get the same connection refused error. Is there a way to test sending emails from commandline in postfix?
Quote:
I would get a new ISP.. Yours sounds horrendous for a business, blocking ports limiting email. not very conducive to business needs.
I'm locked into my contract with them for another year so that unfortunatley isn't an option. Hopefully I can get this to work.
I sent an email from commandline by telneting to my mail.domain.com 4011.
Here is the maillog output for that session. Hopefully this may shed some light on something.
Code:
Mar 30 15:37:10 domain postfix/smtpd[6131]: connect from localhost.localdomain[127.0.0.1]
Mar 30 15:38:35 domain postfix/smtpd[6131]: 78AD111B60C6: client=localhost.localdomain[127.0.0.1]
Mar 30 15:39:15 domain postfix/cleanup[6152]: 78AD111B60C6: message-id=<20090330223835.78AD111B60C6@mail.domain.com>
Mar 30 15:39:15 domain postfix/qmgr[4049]: 78AD111B60C6: from=<Owner@domain.com>, size=394, nrcpt=1 (queue active)
Mar 30 15:39:15 domain postfix/smtp[6162]: warning: numeric domain name in resource data of MX record for domain.com: x.x.x.x
Mar 30 15:39:15 domain postfix/smtp[6162]: connect to x.x.x.x[x.x.x.x]:25: Connection refused
Mar 30 15:39:15 domain postfix/smtp[6162]: connect to mail.domain.com[x.x.x.x]:25: Connection refused
Mar 30 15:39:15 domain postfix/smtp[6162]: 78AD111B60C6: to=<root@domain.com>, relay=none, delay=61, delays=61/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to mail.domain.com[x.x.x.x]:25: Connection refused)
Mar 30 15:39:54 domain postfix/smtpd[6131]: disconnect from localhost.localdomain[127.0.0.1]
So to recap, this is me sending an email from Owner@domain.com to root@domain.com from the mail server after telneting into localhost on port 4011. There were no errors given during the telnet session, this is all from the log file.
Since you are obscuring the domain and IP info it's hard to tell exactly what is going on..
My best guess is that your ISP only allows connections on Port 25 (SMTP) to it's own Email server, and will not allow you to send from your mail server directly to any other mail server. The reason that is done is to prevent spamming and SPAM worms on Windows boxes from inundating the internet with Junk.
If that's the case then using the relay host as I suggested earlier may be your only option.
Alternately a Mail server is going to try and deliver mail to Port 25, so by running your mail server on port 4011, no-one can deliver to you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.