Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I want to setup postfix comepletly avoiding port 25 has my ISP have that port blocked (I need a local server for testing purpose) In my master.cf file I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    2

    postfix without port 25


    Hello,

    I want to setup postfix comepletly avoiding port 25 has my ISP have that port blocked (I need a local server for testing purpose)

    In my master.cf file I have the current line to make it listen on port 10025:

    Code:
    10025      inet  n     -     n     -     -     smtpd
    Which should work, and I can connect to the server using that port.

    However when I try to send mails it doesn't work. Looking at the logs I can see it still uses port 25 to connect to the mail servers:

    Code:
    May 21 13:45:42 azarat postfix/error[9077]: 43BB71F012B6: to=<myemail(at)mail-com>,
     relay=none, delay=0.01, delays=0/0/0/0, dsn=4.4.1, status=deferred 
    (delivery temporarily suspended: connect to mail-com[IP]:25: Operation timed out)
    What I can conclude here is that it's still using port 25 to deliver the emails. Is there someway I can avoid that?

    Thanks

    Best Regards
    AzaraT

  2. #2
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    You need to configure the delivery agent(s) to use the non-standard port as well. Unfortunately, I'm a sendmail guy, don't know specifically how to do it in postfix. In sendmail, you can set it up in sendmail.mc with something like:

    define(RELAY_MAILER_ARGS, `TCP $h 2525')
    define(ESMTP_MAILER_ARGS,`TCP $h 2525')
    DAEMON_OPTIONS(`Port=2525, Name=MTA,Address=192.168.0.233')dnl

    That's from my setup, which uses port 2525 to get mail in and out from the mail relay services I use to dodge the ISP. The defines result in mailer definitions in sendmail.cf when you generate that from the mc file.

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,752
    The *receiving* mail server is going to have an SMTP daemon listening on port 25. That is the standard.

    Your mail server listening on a non-standard port will not be receiving mail from the outside world (without an intermediary relay, as mentioned.)

    If you do control the receiving mail server or know that it's listening on a different port:

    Google: how to configure postfix to deliver mail to different port than 25

    Postfix Manual - Transport Table

  4. #4
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Quote Originally Posted by HROAdmin26 View Post
    The *receiving* mail server is going to have an SMTP daemon listening on port 25. That is the standard.
    In the typical setup for bypassing an ISP block of port 25 in/out, _by arrangement_ there is an external "smart host" listening on a non-standard port for SMTP transactions. That host then normally relays over the standard TCP 25 to the next hop in the MX chain, which may or may not be the "receiving" mail server. In the case where you are mailing "To:" someone with a similar setup, the ultimate "receiving" server may also be using something other than port 25, so it's possible for delivery to occur without port 25 being used if you're both on the same service. You can purchase this service from several different sources, including DynDNS.

    Your links appear to provide the techical guidance for OP to accomplish the outbound relay by non-standard port, which is what he needed.

  5. #5
    Just Joined!
    Join Date
    May 2010
    Posts
    2
    Will a smart host send the actual email through the smart host?

    I need to use this for sending a massive amount of emails for testing purposes (i'm developing a newsletter script), so need to avoid my host because I'm only allowed to send a limited amount of emails per day.

  6. #6
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Quote Originally Posted by AzaraT View Post
    Will a smart host send the actual email through the smart host?

    I need to use this for sending a massive amount of emails for testing purposes (i'm developing a newsletter script), so need to avoid my host because I'm only allowed to send a limited amount of emails per day.
    You'd have to contract for an outbound smart host to do that, and the low tiers of service limit the messages per month/day. But it doesn't sound like you want that for testing. It sounds like you need to have the local relay set to contact postfix on your nonstandard port, but don't actually want the mails delivered.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •