LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 08-29-2003, 07:26 PM   #1
newtolinux83
LQ Newbie
 
Registered: Jun 2003
Location: Edmond, OK
Distribution: Red Hat 9
Posts: 3

Rep: Reputation: 0
Using postfix on a port other than 25


I am trying to set up postfix on my linux server to allow messages to be sent througn a port other than port 25. My ISP has blocked port 25 and I am trying to find a way around it. I looked at the /etc/services file and tryed changing the smtp port number to 30 and that worked so long as I was sending an e-mail to someone else on my server. However, any messages sent to another server were rejected. An error message like below was posted:

The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'something@msn.com'. Subject 'test', Account: 'mail.myserver.com', Server: 'mail.myserver.com', Protocol: SMTP, Server Response: '554 <something@msn.com>: Recipient address rejected: Relay access denied', Port: 30, Secure(SSL): No, Server Error: 554, Error Number: 0x800CCC79

I'm not sure why the message won't make it through the server. I would guess that some setting needs to be changed in the postfix configuration file. Any suggestions would be great!

Thanks
 
Old 08-30-2003, 02:55 AM   #2
joseph_1970
Member
 
Registered: Jan 2003
Posts: 62

Rep: Reputation: 15
Surely not a postfix expert here, but most mail servers will try to contact to you initially through port 25, so if postfix services listening on another port, then another mail server won't be able to handshake with yours.

In regard to your message, it could be something related to another issue. I have seen that particular message (slight variance) for different issues while working with Postfix.


Again, not an expert in postfix, but the networking seems to fail in regard to logical service/port communications.

Monitor your packets with something like 'ethereal' (type that on the command line) and see how the handshake takes place with other severs. You will quickly see the different handshake attempts and the associated ports.

I just tried it and I would say that you might be able to send to another mail server, because it will listen on 25, shake with your src port (high port number), and the mail should be sent, which doesn't seem to be the case with the above error. I would only think that if someone replies or sends mail to you through another server you would have troubles.

When are you getting that message? Are you sending mail from the server or sending non-locally through an MUA?


Overall though, you should be fine in regard to local users to get e-mail and send e-mail non-locally to each other by changing settings in the MUA (ie. outlook express). Interacting with other servers will be the problem though, in particular initial contact from a different mail server.


I look forward to seeing what others say.

I noticed nobody answered yet, so thought I would throw something out there for you.

-joseph
 
Old 08-30-2003, 10:28 PM   #3
ckmehta
LQ Newbie
 
Registered: Aug 2003
Location: Near Phila, PA
Distribution: RedHat 9
Posts: 8

Rep: Reputation: 0
Hi,

I have the same problem and am looking at www.dyndns.org's Mailhop package where they are the mx server of record (with port 25 open) for all your mail and then they redirect all your email traffic to your non-standard port.

My only concern was if I should simply run my Postfix on a non-standard port or should I have should some port redirect utility/script from 2525 (my non-standard port for mail) to 25 (the std port).

Any experience with this?

Cyrus
 
Old 08-31-2003, 04:55 PM   #4
joseph_1970
Member
 
Registered: Jan 2003
Posts: 62

Rep: Reputation: 15
Seems you have choices...

Maybe remember that if possilbe KISS is the best policy, not to say that you are stupid at all. But, "keep is simple silly" is the best practice. If you have to add unncessary things, then the point of failure will in most cases increase. It won't be a big deal either way methinks. I wouldn't spend much time thinking about that one. Of course, that's my pespective with that one.

-joseph

Ps. Don't know if that helps much though...
 
Old 08-31-2003, 06:33 PM   #5
ckmehta
LQ Newbie
 
Registered: Aug 2003
Location: Near Phila, PA
Distribution: RedHat 9
Posts: 8

Rep: Reputation: 0
Just found a method that is fairly simple and robust, in my opinion. I found a method for my NAT/IP-Masquerading/firewall setup (iptables) to redirect port 2525 to port 25 for any incoming smtp traffic.

This method has the benefit of having two available ports for smtp. Port 25 for everyone behind the NAT/IP-Masquerading/firewall box and Port 2525 for all those on the outside. This way ALL other services and clients (behind the firewall) use the std port 25 for their smtp traffic and you dont have to change any Postfix configurations.

By adding these two lines to my /etc/rc.d/rc.firewall-2.4 iptables script, it creates the port redirection.

echo " Creating SMTP(Mail) Port Redirect from port 2525 to port 25"
iptables -t nat -A PREROUTING -p tcp --dport 2525 -j DNAT --to 192.168.0.1:25

Also be advised that Postfix/RH9 comes with the config file locked down to receive only smtp traffic from localhost. You need to change the following settings to something a little less restrictive (but hopefully not too permissive as to become an open realy)

/etc/postfix/main.cf
inet_interfaces = all
mynetworks_style = subnet
 
Old 09-01-2003, 02:44 AM   #6
joseph_1970
Member
 
Registered: Jan 2003
Posts: 62

Rep: Reputation: 15
Kewl.

Looks like we are both new to this forum and starting out just fine, imo.

Good to meet you and thanks for letting me/us know what you found. Never know when that will come in handy!

-joseph
 
Old 09-03-2003, 02:09 AM   #7
ckmehta
LQ Newbie
 
Registered: Aug 2003
Location: Near Phila, PA
Distribution: RedHat 9
Posts: 8

Rep: Reputation: 0
Wrapping up:
Previously I mentioned possibly using DynDNS.org mailhop package. Well a half-hour later after requesting/paying for it, I now receive email on port 2525.

To be fair, I already started pointing my purchased-elsewhere-domain at their DNS servers last Sat, and DNS properly propagated last nite. So perhaps its much simpler if you let them manage both domain and mailer-relay.

Total Cost = $60 (25/Custom DNS + 40/Mailhop Package - 5/Discount for both packages)

After another DNS nightmare with another hosting company & domainname company, its nice to see a simple process that works.
 
Old 09-03-2003, 12:43 PM   #8
joseph_1970
Member
 
Registered: Jan 2003
Posts: 62

Rep: Reputation: 15
Hey, kewl. Sounds like a happy end for this thread then. Nothing like bringing something to a close.

Thanks,

joseph
 
  


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
Telnet no response to port 25 running Postfix shyee Fedora 2 01-09-2005 10:13 PM
Gentoo Postfix Isp blocks port 25 sleepyhead Linux - Networking 4 10-08-2004 03:21 AM
Configuring Postfix to recieve on a different port?? tamakizu Linux - Networking 4 04-30-2004 02:33 PM
port 25 issue wiht postfix-email Robin01 Linux - Newbie 6 01-11-2004 07:45 PM
Postfix Mail server on blocked port 25 IcemanF-22 Linux - Networking 7 08-31-2003 07:25 PM


All times are GMT -5. The time now is 11:10 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration