Change Sentora and Postfix SMTP port 25
#1
Change Sentora and Postfix SMTP port 25
Hi...

I has installed sentora on home PC, and CMON DDNS, everything is working fine, but i can send mail to external servers, ex: gmail, hotmail, etc.... I can receive from external servers.

internal to internal works
internal to external no work
externail to internal works

I thing that is something related whit the 25 port please check this pice of mail.log:

Mar 17 21:20:13 dn1 postfix/qmgr[1338]: F3961E01FBA: from=<soporte@ordenazteca.com.mx>, size=1099, nrcpt=1 (queue active)
Mar 17 21:20:43 dn1 postfix/smtp[2901]: connect to mx2.hotmail.com[65.54.188.126]:25: Connection timed out
Mar 17 21:21:13 dn1 postfix/smtp[2901]: connect to mx3.hotmail.com[207.46.8.199]:25: Connection timed out
Mar 17 21:21:43 dn1 postfix/smtp[2901]: connect to mx1.hotmail.com[65.55.92.168]:25: Connection timed out
Mar 17 21:22:13 dn1 postfix/smtp[2901]: connect to mx3.hotmail.com[65.54.188.94]:25: Connection timed out
Mar 17 21:22:43 dn1 postfix/smtp[2901]: connect to mx4.hotmail.com[65.55.92.136]:25: Connection timed out
Mar 17 21:22:43 dn1 postfix/smtp[2901]: F3961E01FBA: to=<ras_jack@live.com.mx>, relay=none, delay=1626, delays=1475/0.06/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.92.136]:25: Connection timed out)

note this:

to mx2.hotmail.com[65.54.188.126]:25: Connection timed out


so, i haven't idea how change the port 25, in the sentora admin i hace another port, in the php.ini i has changed the 25 port (but i think tha tihs only works in windows), so nothing solve my issue.


Please, how i change the out mail.

I'm a dummy on this, is my first try so, don't be rude with me please. xD

Tanks in advances and sorry my bad english.




[UPDATE1]

I forgot say that all the ports are open in my router, this a test, so i have a DMZ config to my little web server...
tanks, i'm still waiting for some help.



[UPDATE2]

My problem aren't solved yet, so i has checked it:

My Sentora receives mail from mys own sentora mails account and from external (gmail, hotmail, etc) accounts
Send mails to mys own Sentora Server accounts but NO TO EXTERNAL mail accounts

IP blacklisted (no)
Router open ports (all open DMZ for my Sentora Server)
NO firewall on ubuntu or router


the things listed up, are not related with my problem because the mail no go out of mys server, never arrives to gmail, hotmail etc....


I guess that is the 25 port but i can change IT!!!!. How i do it!???.

I tried without any result. (reloading, stopping, and restarting postfix and my PC too).

First try:

in the master.cf i have changed this original line:

smtp      inet  n       -       n       -       -       smtpd

by:

465      inet  n       -       n       -       -       smtpd

and later by:

587      inet  n       -       n       -       -       smtpd

Result, no work, roundcube cant connect to postfix to send mails, i don't receive mails from external accounts because postfix must be listening on port 25 to receive mails.


Second Try:

I tried add suport on postfix to send mail thourgh 587 and 465 ports but preserving the 25 port to receive mail.

smtp      inet  n       -       n       -       -       smtpd                    (original line to have port 25 lintening and receive mail)

smtps      inet  n       -       -       -       -       smtpd
submission      inet  n       -       n       -       -       smtpd


Result: NO work, postfix continues sending mail through 25 port, never try the 465 or 587 port.

mail.err
EMPTY!!!

mail.log

Mar 18 22:04:23 ordenazteca postfix/qmgr[3083]: 6CECCE01F58: from=<soporte@ordenazteca.com.mx>, size=1085, nrcpt=1 (queue active)

Mar 18 22:04:53 ordenazteca postfix/smtp[3475]: connect to mx4.hotmail.com[207.46.8.199]:25: Connection timed out
Mar 18 22:05:23 ordenazteca postfix/smtp[3475]: connect to mx2.hotmail.com[65.55.92.184]:25: Connection timed out
Mar 18 22:05:53 ordenazteca postfix/smtp[3475]: connect to mx3.hotmail.com[65.55.92.184]:25: Connection timed out
Mar 18 22:06:23 ordenazteca postfix/smtp[3475]: connect to mx2.hotmail.com[65.55.92.168]:25: Connection timed out
Mar 18 22:06:54 ordenazteca postfix/smtp[3475]: connect to mx2.hotmail.com[65.55.33.135]:25: Connection timed out
Mar 18 22:06:54 ordenazteca postfix/smtp[3475]: 6CECCE01F58: to=<ras_jack@live.com.mx>, relay=none, delay=2227, delays=2076/0.09/150/0, dsn=4.4.1, status=deferred (connect to mx2.hotmail.com[65.55.33.135]:25: Connection timed out)
Mar 18 22:19:23 ordenazteca postfix/qmgr[3083]: 18DD7E01DB6: from=<soporte@ordenazteca.com.mx>, size=1091, nrcpt=1 (queue active)
Mar 18 22:19:53 ordenazteca postfix/smtp[3614]: connect to devotion.com.mx[185.28.23.25]:25: Connection timed out
Mar 18 22:19:53 ordenazteca postfix/smtp[3614]: 18DD7E01DB6: to=<webmaster@devotion.com.mx>, relay=none, delay=2256, delays=2226/0.07/30/0, dsn=4.4.1, status=deferred (connect to devotion.com.mx[185.28.23.25]:25: Connection timed out)
Mar 18 22:44:23 ordenazteca postfix/qmgr[3083]: 6CECCE01F58: from=<soporte@ordenazteca.com.mx>, size=1085, nrcpt=1 (queue active)
Mar 18 22:44:54 ordenazteca postfix/smtp[3814]: connect to mx4.hotmail.com[65.55.37.120]:25: Connection timed out
Mar 18 22:45:24 ordenazteca postfix/smtp[3814]: connect to mx1.hotmail.com[65.55.37.120]:25: Connection timed out
Mar 18 22:45:54 ordenazteca postfix/smtp[3814]: connect to mx4.hotmail.com[65.55.92.152]:25: Connection timed out
Mar 18 22:46:24 ordenazteca postfix/smtp[3814]: connect to mx2.hotmail.com[65.55.37.104]:25: Connection timed out
Mar 18 22:46:54 ordenazteca postfix/smtp[3814]: connect to mx3.hotmail.com[65.55.33.119]:25: Connection timed out
Mar 18 22:46:54 ordenazteca postfix/smtp[3814]: 6CECCE01F58: to=<ras_jack@live.com.mx>, relay=none, delay=4627, delays=4476/0.12/151/0, dsn=4.4.1, status=deferred (connect to mx3.hotmail.com[65.55.33.119]:25: Connection timed out)


Third Try:

I configure Gmail like relayhost and it works but just in a half, the mail now arrives in the normal box(no in spam box), but the email account that appears in the mail is my gmail account used in my postfix relayhost config, no the email account of my domain hosted in my Sentora Server.


So, the problem persist.... hope that somebody can help, tanks by read this xD.
#2
RE: Issue sending mail Sentora Fresh Install
1. Did you check if your ip (Ip block) is not blacklisted.

2. As you are using a home DSL line likely you don't have PTR records, neither SPF?

For email deliverability you need to use fixed ip instead of using such DSL ip that are usually blacklisted or have a bad reputations.

Don't expect high deliverability for such config.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
#3
RE: Issue sending mail Sentora Fresh Install
(03-18-2015, 06:57 PM)Me.B Wrote: 1. Did you check if your ip (Ip block) is not blacklisted.

2. As you are using a home DSL line likely you don't have PTR records, neither SPF?

For email deliverability you need to use fixed ip instead of using such DSL ip that are usually blacklisted or have a bad reputations.

Don't expect high deliverability for such config.

M B





1.- Hello, i has checked the blacklisted of the IPs (actual in every test) and are no balcklisted.

2.- I haven't PTR neither SPF those require Static IP. This records are new for me, i'm learning.

So, is there some method for send mail from DSL Home conection (dinamyc IP)??

Maybe using Gmail like relay server could work for me??.

Tanks for your help.
#4
RE: Change Sentora and Postfix SMTP port 25
Hello, I having the same problem, did you found the solution???
#5
RE: Change Sentora and Postfix SMTP port 25
if you are having trouble with port 25 its almost for 100% sure that your network provider is blocking this, maybe you can ask them for a solution. My hosting provider got there own smtp server witch I am now connected to with the following code in /etc/postfix/main.cf
Code:
relayhost = smtp.ziggo.nl

smtp.ziggo.nl is in this example the smtp server from my network provider beacuse the are blocking port 25. I think you need to use the smarthost of your internet provider.
#6
RE: Change Sentora and Postfix SMTP port 25
Sorry for my beginner's english. I just want to help. I was having the same problem on using SMTP from outside and after a long time of investigation and testing i discovered that my internet provider was blocking my port 25. The effective solution was change the SMTP port from my server editing the master.cf file on \etc\postfix\

Just search the next line:
Code:
smtp      inet  n       -       n       -       -       smtpd

And just bottom add this line:
Code:
587       inet  n       -       n       -       -       smtpd

And restart postfix service. Now your SMTP port is 587 and if it was a problem with the port 25 blocking it should work.

Smile
#7
RE: Change Sentora and Postfix SMTP port 25
(05-25-2015, 03:36 PM)Sonichaos Wrote: Sorry for my beginner's english. I just want to help. I was having the same problem on using SMTP from outside and after a long time of investigation and testing i discovered that my internet provider was blocking my port 25. The effective solution was change the SMTP port from my server editing the master.cf file on \etc\postfix\

Just search the next line:

Code:
smtp      inet  n       -       n       -       -       smtpd

And just bottom add this line:

Code:
587       inet  n       -       n       -       -       smtpd

And restart postfix service. Now your SMTP port is 587 and if it was a problem with the port 25 blocking it should work.

Smile



Hello,
I did it, but still doesn't work.
look my logs....


Jun  2 23:28:13 www2 postfix/smtpd[7186]: connect from 201-2-217-102.bnut3702.ds                                                                  l.brasiltelecom.net.br[201.2.217.102]

Jun  2 23:28:14 www2 postfix/smtpd[7186]: 5AFF912144C: client=201-2-217-102.bnut                                                                  3702.dsl.brasiltelecom.net.br[201.2.217.102], sasl_method=PLAIN, sasl_username=l                                                                  ucas@MYDOMAIN.com.br
Jun  2 23:28:15 www2 postfix/cleanup[7189]: 5AFF912144C: message-id=<556E6636.50                                                                  604@MYDOMAIN.com.br>
Jun  2 23:28:15 www2 postfix/qmgr[7101]: 5AFF912144C: from=<lucas@MYDOMAIN.com.br                                                                  >, size=653, nrcpt=1 (queue active)
Jun  2 23:28:15 www2 postfix/smtpd[7186]: disconnect from 201-2-217-102.bnut3702                                                                  .dsl.brasiltelecom.net.br[201.2.217.102]
Jun  2 23:28:26 www2 postfix/qmgr[7101]: 3BAB1121487: from=<>, size=2939, nrcpt=                                                                  1 (queue active)
Jun  2 23:28:26 www2 postfix/smtp[7192]: 3BAB1121487: to=<www-data@www2.MYDOMAIN.                                                                 com.br>, relay=none, delay=432971, delays=432971/0.01/0.53/0, dsn=4.4.4, status=                                                                  SOFTBOUNCE (Host or domain name not found. Name service error for name=www2.MYDOMAIN.com.br type=AAAA: Host not found)
Jun  2 23:28:26 www2 postfix/qmgr[7101]: 3BAB1121487: from=<>, status=expired, r                                                                  eturned to sender
Jun  2 23:28:26 www2 postfix/qmgr[7101]: 3BAB1121487: removed
Jun  2 23:28:45 www2 postfix/smtp[7137]: connect to gmail-smtp-in.l.google.com[1                                                                  73.194.206.26]:25: Connection timed out
Jun  2 23:28:45 www2 postfix/smtp[7137]: connect to gmail-smtp-in.l.google.com[2                                                                  607:f8b0:400d:c03::1a]:25: Network is unreachable
Jun  2 23:29:15 www2 postfix/smtp[7137]: connect to alt1.gmail-smtp-in.l.google.com[64.233.186.26]:25: Connection timed out
Jun  2 23:29:15 www2 postfix/smtp[7137]: connect to alt1.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1b]:25: Network is unreachable
Jun  2 23:29:45 www2 postfix/smtp[7137]: connect to alt2.gmail-smtp-in.l.google.com[74.125.24.27]:25: Connection timed out
Jun  2 23:29:45 www2 postfix/smtp[7137]: 5AFF912144C: to=<MYEMAIL@gmail.com>, relay=none, delay=92, delays=0.91/0/91/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.24.27]:25: Connection timed out)
#8
RE: Change Sentora and Postfix SMTP port 25
(05-25-2015, 07:25 AM)thepascalboy Wrote: if you are having trouble with port 25 its almost for 100% sure that your network provider is blocking this, maybe you can ask them for a solution. My hosting provider got there own smtp server witch I am now connected to with the following code in /etc/postfix/main.cf

Code:
relayhost = smtp.ziggo.nl

smtp.ziggo.nl is in this example the smtp server from my network provider beacuse the are blocking port 25. I think you need to use the smarthost of your internet provider.

Hello,

in my logs appears 
"Jun  2 23:28:13 www2 postfix/smtpd[7186]: connect from 201-2-217-102.bnut3702.dsl.brasiltelecom.net.br[201.2.217.102]"

is just to put 
"relayhost = brasiltelecom.net.br"
?
how can I check it?
#9
RE: Change Sentora and Postfix SMTP port 25
I have similar problem, had change on master.cf 
Code:
# # Postfix master process configuration file.  For details on the format # of the file, see the Postfix master(5) manual page. # # ***** Unused items removed ***** # ========================================================================== # service type  private unpriv  chroot  wakeup  maxproc command + args #               (yes)   (yes)   (yes)   (never) (100) # ========================================================================== 25      inet  n       -       n       -       -       smtpd 587 inet n - n - - smtpd 465 inet n - n - - smtpd #  -o content_filter=smtp-amavis:127.0.0.1:10024 #  -o receive_override_options=no_address_mappings pickup    fifo  n       -       n       60      1       pickup  -o content_filter=  -o receive_override_options=no_header_body_checks cleanup   unix  n       -       n       -       0       cleanup qmgr      fifo  n       -       n       300     1       qmgr #qmgr     fifo  n       -       n       300     1       oqmgr tlsmgr    unix  -       -       n       1000?   1       tlsmgr rewrite   unix  -       -       n       -       -       trivial-rewrite bounce    unix  -       -       n       -       0       bounce defer     unix  -       -       n       -       0       bounce trace     unix  -       -       n       -       0       bounce verify    unix  -       -       n       -       1       verify flush     unix  n       -       n       1000?   0       flush proxymap  unix  -       -       n       -       -       proxymap smtp      unix  -       -       n       -       -       smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay     unix  -       -       n       -       -       smtp        -o fallback_relay= #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq     unix  n       -       n       -       -       showq error     unix  -       -       n       -       -       error discard   unix  -       -       n       -       -       discard local     unix  -       n       n       -       -       local virtual   unix  -       n       n       -       -       virtual lmtp      unix  -       -       n       -       -       lmtp anvil     unix  -       -       n       -       1       anvil scache    unix  -       -       n       -       1       scache # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # ==================================================================== maildrop  unix  -       n       n       -       -       pipe  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} uucp      unix  -       n       n       -       -       pipe  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail    unix  -       n       n       -       -       pipe  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp     unix  -       n       n       -       -       pipe  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient # # spam/virus section # smtp-amavis  unix  -    -       y       -       2       smtp  -o smtp_data_done_timeout=1200  -o disable_dns_lookups=yes  -o smtp_send_xforward_command=yes 127.0.0.1:10025 inet n  -       y       -       -       smtpd  -o content_filter=  -o smtpd_helo_restrictions=  -o smtpd_sender_restrictions=  -o smtpd_recipient_restrictions=permit_mynetworks,reject  -o mynetworks=127.0.0.0/8  -o smtpd_error_sleep_time=0  -o smtpd_soft_error_limit=1001  -o smtpd_hard_error_limit=1000  -o receive_override_options=no_header_body_checks  -o smtpd_helo_required=no  -o smtpd_client_restrictions=  -o smtpd_restriction_classes=  -o disable_vrfy_command=no  -o strict_rfc821_envelopes=yes # # Dovecot LDA dovecot   unix  -       n       n       -       -       pipe  flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -d ${recipient} # # Vacation mail vacation    unix  -       n       n       -       -       pipe  flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient} retry     unix  -       -       n       -       -       error proxywrite unix -       -       n       -       1       proxymap

but still did not work. 

i did check the log and find this:

Code:
Dec 10 21:10:20 us9 postfix/smtp[27751]: connect to bosweb.ga[104.255.71.109]:25: No route to host Dec 10 21:10:20 us9 postfix/smtp[27751]: 9091372BD39: to=<tanya@bosweb.ga>, relay=none, delay=1.1, delays=0.41/0/0.73/0, dsn=4.4.1, status=deferred (connect to bosweb.ga[104.255.71.109]:25: No route to host) Dec 10 21:11:50 us9 postfix/smtpd[27983]: connect from unknown[115.178.234.214] Dec 10 21:11:52 us9 postfix/smtpd[27983]: 2234B72BD40: client=unknown[115.178.234.214], sasl_method=PLAIN, sasl_username=ask@lembonganrooms.com Dec 10 21:11:52 us9 postfix/cleanup[27875]: 2234B72BD40: message-id=<566A30E6.3070808@lembonganrooms.com> Dec 10 21:11:52 us9 postfix/qmgr[27745]: 2234B72BD40: from=<ask@lembonganrooms.com>, size=609, nrcpt=1 (queue active) Dec 10 21:11:52 us9 postfix/smtpd[27983]: disconnect from unknown[115.178.234.214] Dec 10 21:11:59 us9 postfix/smtp[27751]: connect to bosweb.ga[104.255.71.109]:25: No route to host Dec 10 21:11:59 us9 postfix/smtp[27751]: 2234B72BD40: to=<tanya@bosweb.ga>, relay=none, delay=7.8, delays=0.81/0/7/0, dsn=4.4.1, status=deferred (connect to bosweb.ga[104.255.71.109]:25: No route to host)

The mail try to send trough port 25

the is any solution to change it to port 587?
is there anybody solve for this kind problem?
#10
RE: Change Sentora and Postfix SMTP port 25
100's on Google :Tongue
[google]postfix change port 25 to 587 centOS 6[/google]

Most useful: http://www.faqforge.com/linux/how-to-ena...n-postfix/
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information


Possibly Related Threads…
Thread Author Replies Views Last Post
Sentora cp steps 421darren 6 17 ,346 06-12-2025, 03:29 PM
Last Post: AnthonyDillard
Improving Security on Your Sentora Panel: Best Practices DylanForeman 0 464 05-27-2025, 06:10 PM
Last Post: DylanForeman
Is Sentora dead? rajeevrrs 2 5 ,703 12-17-2022, 09:20 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)