In /etc/postfix/main.cf I have [relayhost = smtp.someisp.no] and everything works fine. I have to use this relayhost since my ISP has closed port 25. My ISP tells me that if I dont want to use their relayhost I have to configure my mailserver to use a ssl port like port 465. Then I can remove the relayhost option. Do anyone know where I do this like which files to edit and is this possible if I dont set up my server as a DNS Server?
1 Answers
It sounds like you're talking about two different things.
If you need to configure a relayhost
, it is because outgoing access to port 25 has been blocked by your ISP. Given that the mail servers listen on port 25 by convention, you will almost certainly have to use a relay host of some variety.
My guess as to what the person at the help desk was suggesting was that if you wanted to contact a particular mail server outside the ISP's firewalls, then that mail server should be configured to listen on a second port. Some reasons you might want to do this is if your company required that all mail be sent via their servers, or you'd set up restrictive SPF rules such that mail sent via your ISP would be rejected. One thing to keep in mind here though, is that this would just be trading one relay host for another.
If you don't have such an external mail server in mind, then the suggestion about changing the port doesn't really apply. In that case, relaying via your ISP's mail server is probably the best option.

- 41,136
mail.mypublicdomain.no
pointing at the same machine you're running Postfix? If it is, then you'd be configuring your mail server to deliver mail to itself in a loop, since the relay host is the server all mail is sent to that can't be handled locally. If it is a separate host outside of your ISP I'll update the question, but it isn't clear that would help you. – James Henstridge Feb 14 '12 at 00:50They block port 25. I have registered mypublicdomain.no through ANOTHER company (WEB
Server Company) that has nothing to do with my ISP company. On the WEB Server
Company I have this configuration:
MX-Entry: Priority=0 Destination=mail.mypublicdomain.no
Note: Email routing is configured as a remote mail exchanger in cPanel. That
configures the server to NOT accept mail locally and sends mail to the lowest MX
record.
– Bob Feb 14 '12 at 08:08Note: The RECORD IP Address above is modified here by me and substituted with a
fictive IP Address. The RECORD IP Address above points directly to my Public Static
IP.<br>
All the information above is set up in cPanel located at my WEB Server Company.
– Bob Feb 14 '12 at 08:10MX
records are there to tell other people how to send mail to you (i.e. your incoming mail). Therelayhost
setting is used to direct outgoing mail. If your ISP has blocked outgoing port 25 connections, then you will need to relay via a host that hasn't been blocked (such as your ISP's mail server), irrespective of yourMX
record settings. – James Henstridge Feb 15 '12 at 08:09