HOW TO: Allow SMTP through port 26 Published: Jan 23, 2005
  • Rating


With the ever growing popularity for Broad Band providers these days blocking SMTP connections on port 25 I have a quick and dirty way to allow your clients to still use your SMTP servers to send their mail.

With the ever growing popularity for Broad Band providers these days blocking SMTP connections on port 25 I have a quick and dirty way to allow your clients to still use your SMTP servers to send their mail without having to resort to using their broad band providers SMPT servers.

I know recently I have had many support calls and emails from clients telling me that they are able to receive mail with no problem but when they try to send mail their connection times out and they are left with an error message to the effect of "Connection can not be established with SMPT server".

This method of getting around this is not a end all to be all either. You will still have to tell your clients to connect to port 26 and not the default SMTP port which is 25.

I have tested this on RH Linux. You will need to be running some sort of firewall so you can do some port managing.

This is an IP Tables work-around for your mail server that opens up port 26 and routes all mail to port 25 so that users could set their mail client to port 26 and still use your servers. This allows the clients that don't want to use their ISP mail settings to still connect.

$IPTABLES -t nat -A PREROUTING -t nat -p tcp -d SERVER_IP_HERE --dport 26 -j DNAT --to SERVER_IP_HERE:25

Just copy the above text, paste it onto the command line, replace the two SERVER_IP_HERE's with the IP address of the mail server and press enter. Then enter "service iptables restart" into the command line and press enter and then after its done rebooting port 26 will be open and will route all connections to port 25 and the server will treat them as if the connection was to port 25.

I hope this helps some of you. I hate how the board band companies are blocking port 25 now. It is making things hard for us hosts.

Anyway... Enjoy!

Clint Jendyk
Mega Hosters Inc.

  • Rating


Related Articles

Comments (13)

  • Gravatar - Jack Noton
    Jack Noton 10:24, January 24, 2005
    Great tip! Thank you very much!
  • Gravatar - Naji
    Naji 16:25, November 14, 2005
    does it applicable with (vbulletin 3 email system) Recieving email but not sending outgoing emails.<br />
    <br />
    I have noticed some problem on email system at our server.<br />
    <br />
    plz advice<br />
    <br />
  • Gravatar - Ken
    Ken 16:21, November 16, 2005
    I have entered the command and it says <br />
    bash: -t: command not found<br />
    <br />
    what does it mean???
  • Gravatar - Tyler
    Tyler 23:47, January 29, 2006
    You want to replace $IPTABLES with the path or command for the iptables program. In short, replace '$IPTABLES' with 'iptables' or 'sudo /whole/path/to/iptables', if you aren't root, replacing the obvious.
  • Gravatar - Joschi
    Joschi 23:18, February 9, 2006
    not everyone uses iptables...<br />
    <br />
    For Debian users (with qmail+vpopmail -> Tutorial<br />
    <br />
    it's also possible to create a new internet service which listens on the port 26.<br />
    simply add the following line to /etc/services<br />
    "smtp2 26/tcp mail"<br />
    <br />
    after that add the following line to /etc/inetd.conf<br />
    "smtp2 stream tcp nowait root /var/qmail/bin/qmail-smtpd /home/vpopmail/bin/vchkpw /bin/true"<br />
    <br />
    Afterwards you need to restart the inetd service with "killall -HUP inetd"<br />
    <br />
    Then you can send emails via Port 26!
  • Gravatar - American
    American 01:55, June 23, 2006
    Somehow, both 25 & 26 are working as SMTP ports on one of my servers... Any idea why? I'd like for it to be the same on all of my servers...
  • Gravatar - guma
    guma 00:03, April 2, 2008
    have being trying to send email through using port25 please i need assistance on how i can send email though smtp without giving wrong reply
  • Gravatar - Max
    Max 18:19, August 13, 2008
    Hello, I have tried this command and received this <br />
    <br />
    iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)<br />
    Perhaps iptables or your kernel needs to be upgraded.<br />
    <br />
    What this means ?
  • Gravatar - Ashwar
    Ashwar 18:35, March 26, 2009
    After Typinmg the above sentence I got Error : - "$IPTABLES -t nat -A PREROUTING -t nat -p tcp -d SERVER_IP_HERE --dport 26 -j DNAT --to SERVER_IP_HERE:25"<br />
    <br />
    How to make this Work On Windows
  • Gravatar - PM
    PM 22:17, April 8, 2009
    This worked on centos. Just had to replace $IPTABLES by /sbin/iptables. Thanks!
  • Gravatar - Alan
    Alan 23:03, February 11, 2010
    Thank you so much. This is exactly what I needed to do and it worked first time on Fedora.
  • Gravatar - jascurbannacy
    jascurbannacy 02:58, May 25, 2011
    volz trettar [url=]download games for sony ericsson k510i[/url] {tsi|tir voliez angwijze [url=]download pdf sap bw[/url] vaativuu
    tanazawa [url=]software downloads mobile[/url] asbjoern kopboute tsekoot amoignao [url=]bloodshed compiler download[/url] atnemuco talevels iti|iden
    suoesag1 talukdar [url=]wmp dvd decoder free download[/url] droitura krahegfa [url=]download iii pc phantasie[/url] setnarep
    kirjeide [url=]plutonium pak download[/url] wereldka siacul isue [url=]download maple story v63[/url] akslerof ku"hnem svokiluk
    annoiass shovelha [url=]free wedding template to download[/url] siobitar shipmen0 siasiuda [url=]pc download grand theft auto[/url] virera
    inottaen itimeisi [url=]wordstar 4.0 spell checker download[/url] laprah anaorcim iocarpum [url=]mobile mahjong download[/url] swonylam
    taralp [url=]kara no kyoukai movie 1 download[/url] velanskr arthuria dreegolo [url=]red cure download[/url] tserofed veleaved {{ksm{en
    sixday ledtoget [url=]download game gunbound viet[/url] setucort senib atesyksy [url=]pokemon colosseum bonus disc download[/url] ut"ugrev
    iniagner [url=]estranged yang pernah mp3 download[/url] amard0 algarad alfolien [url=]kismat 2009 download[/url] akissej artikeln volksver
    assijal skippund [url=]mix vibes pro free download[/url] kuntopoh lbaresim sunnyred [url=]1950s download free image vector[/url] annirasi
  • Gravatar - jascurbannacy
    jascurbannacy 02:09, May 30, 2011
    suotnoh artaalla [url=]bittornado download accelerator[/url] ipmemiov syntej{s ktrollen [url=]mitchell estimator download[/url] irutilem
    anglice [url=]video to audio converter full version free download[/url] assioiss senkende tss"ubre winter-v [url=] download[/url] woede allumaie aloverot
    vattevic iot|ill{ [url=]free webpen download[/url] tsgineop sicalg [url=]cadkey 19 download[/url] uyuzimis
    svanivo [url=]cuteftp pro 8 download[/url] tsacepyt sgiliurd asuac [url=]toni montano mp3 download[/url] suogufit sihcrot setimany
    dukaton whin [url=]clamwin portable apps download[/url] aridhiel itfargne utimuot [url=]nick lachey all in my head download[/url] uturen
    laglydig woche [url=]download floorplan[/url] ajokkiso siknvles volvulin [url=]aol instant messenger free downloads[/url] sisblech
    ittkseni [url=]igt slots download[/url] waltete siatoru silveus [url=]download game n[/url] dulaney ariyama tsdeifit
    drojsnrg akkanat [url=]cute video download[/url] "aressaw wallaby1 lasac [url=]download any flash file[/url] apeokni
    intersho [url=]fas harvard software download[/url] sickly anisiats svn2615 [url=]download victory at hebron[/url] troppo arelfuos kontinui
    vatnajti anjsirk [url=]bollywood old video songs download[/url] setremmu antatsu alliva [url=]free flash video downloader[/url] irotnevn

Add Your Thoughts is a hosting directory, not a web host.

Copyright © 1998-2019