Author Topic: Unable to send email  (Read 8662 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Unable to send email
« on: January 12, 2020, 07:50:20 PM »
Hello,

I am unable to send email thru Roundcube on Centos 7 Web panel server. I can receive email, connect Thunderbird and view all emails, but when I send email to my private email it does not go thru. I have tried other emails too.

Also my website is futuratoneri.ba.

There is only one account on server.

My ip is not on blacklist.

I have spent 4 days investigating what could be the issue, read forums but with no luck.

This is log from maillog: Jan 12 19:14:38 server1 postfix/smtp[1270]: 31EA015550D: to=<admin@kreka.ba>, relay=none, delay=5382, delays=5382/0.03/0.09/0, dsn=4.4.1, status=deferred (connect to mail.kreka.ba[213.136.70.150]:25: No route to host)

Any help would be grateful.


Re: Unable to send email
« Reply #1 on: January 13, 2020, 01:50:08 AM »
The clue is in the error:
Quote
(connect to mail.kreka.ba[213.136.70.150]:25: No route to host)

You have a routing issue - likely wrong default gateway. Could also be that your provider blocks port 25 (good plan for users that don't know what they are doing ;) )

Offline
*
Re: Unable to send email
« Reply #2 on: January 15, 2020, 01:04:36 PM »
I just spoke with my provider and they are saying that port 25 is open, and that the problem is not caused by them.

Any help would be appriciated.

I can receive email, but can not send.

I have Let's Encript SSL instaled on my server domains and hostname, if it may help.

This is my /etc/postfix/main.cf content:
Code: [Select]
# postfix config file

# uncomment for debugging if needed
#soft_bounce=yes

#Nermin dodao



# postfix main
mail_owner = postfix
setgid_group = postdrop
delay_warning_time = 4

# postfix paths
html_directory = no
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
queue_directory = /var/spool/postfix
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man

# network settings
inet_interfaces = all
mydomain = futuratoneri.ba
myhostname = server1.futuratoneri.ba
mynetworks = $config_directory/mynetworks
mydestination = $myhostname = server1.futuratoneri.ba
relay_domains = proxy:mysql:/etc/postfix/mysql-relay_domains_maps.cf

# mail delivery
recipient_delimiter = +

# mappings
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
transport_maps = hash:/etc/postfix/transport
#local_recipient_maps =

# virtual setup
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_alias_default_maps.cf, proxy:mysql:/etc/postfix/mysql-virtual_alias_maps.cf, regexp:/etc/postfix/virtual_regexp
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/mysql-virtual_alias_pipe_maps.cf
virtual_minimum_uid = 101
virtual_uid_maps = static:101
virtual_gid_maps = static:12
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

# debugging
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5

# authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname = server1.futuratoneri.ba
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

# tls config
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_security_level = may
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtp_tls_session_cache_database = btree:$data_directory/smtp_tls_session_cache
# Change mail.example.com.* to your host name
smtpd_tls_key_file = /etc/pki/tls/private/hostname.key
smtpd_tls_cert_file = /etc/pki/tls/certs/hostname.bundle

# rules restrictions
smtpd_client_restrictions =
smtpd_helo_restrictions =
smtpd_sender_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain
# uncomment for realtime black list checks
# ,reject_rbl_client zen.spamhaus.org
# ,reject_rbl_client bl.spamcop.net
# ,reject_rbl_client dnsbl.sorbs.net
smtpd_helo_required = yes
unknown_local_recipient_reject_code = 550
disable_vrfy_command = yes
smtpd_data_restrictions = reject_unauth_pipelining

# Other options
# email size limit ~20Meg
message_size_limit = 204800000
mailbox_size_limit = 2048000000

# Vacation Scripts
vacation_destination_recipient_limit = 1
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_vacation.cf

This is my master.cf content:

Code: [Select]
#
# 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)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
587     inet  n       -       n       -       -       smtpd
26      inet  n       -       n       -       -       smtpd
#  -o content_filter=smtp-amavis:127.0.0.1:10024
#  -o receive_override_options=no_address_mappings
#
## Enable SMTP on port 587 only for authenticated/TLS clients
submission inet n       -       n       -       -       smtpd
  -o smtpd_enforce_tls=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#
## Enable SMTP on port 465 only for authenticated/SSL clients
smtps     inet  n       -       n       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#
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=/usr/local/cwp/php71/bin/php -q /var/spool/vacation/vacation.php ${sender} ${recipient}


Re: Unable to send email
« Reply #3 on: January 15, 2020, 01:47:20 PM »
You're only skim reading.
From your VPS:
Code: [Select]
traceroute 213.136.70.150vs.
Code: [Select]
traceroute google.com
Also destination may have blocked your IP.

Offline
*
Re: Unable to send email
« Reply #4 on: January 15, 2020, 02:25:53 PM »
My server IP IP 77.78.204.207 is not blocked by anyone.
I have another dedicated server with WHM/cPanel and in mail log, there is not a trace of email even arriving to destination or rejecting it because of spam/bad IP reputation or similar. I have tested it with my own server, with private Gmail, Hotmail, same error occurs.

This is the output from your commands:
Code: [Select]
[root@server1 ~]# traceroute 213.136.70.150
traceroute to 213.136.70.150 (213.136.70.150), 30 hops max, 60 byte packets
 1  gateway (192.168.0.1)  0.206 ms  0.208 ms  0.176 ms
 2  10.196.224.1 (10.196.224.1)  8.781 ms  8.761 ms  8.721 ms
 3  tu-he-m-1-pc3.telemach.ba (77.77.197.82)  9.855 ms  9.831 ms  9.807 ms
 4  77.77.197.111 (77.77.197.111)  11.562 ms  11.539 ms  11.514 ms
 5  ki-he-m-1-te0-2.telemach.ba (77.77.197.74)  13.187 ms  13.163 ms  13.137 ms
 6  77.77.201.0 (77.77.201.0)  15.548 ms 77.77.201.12 (77.77.201.12)  14.390 ms                        77.77.201.0 (77.77.201.0)  14.339 ms
 7  89.216.5.68 (89.216.5.68)  24.463 ms  20.566 ms  23.942 ms
 8  de-fra-r-1-be1.sbb.rs (89.216.5.97)  42.567 ms  42.526 ms  42.797 ms
 9  at-vie-r-1-be1.sbb.rs (89.216.5.76)  42.094 ms de-fra-r-1-be1.sbb.rs (89.216                       .5.97)  41.307 ms  41.269 ms
10  rt-decix-1.contabo.net (80.81.194.0)  49.257 ms  49.189 ms  49.153 ms
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

[root@server1 ~]# traceroute google.com
traceroute to google.com (172.217.19.110), 30 hops max, 60 byte packets
 1  gateway (192.168.0.1)  0.163 ms  0.156 ms  0.160 ms
 2  10.196.224.1 (10.196.224.1)  15.352 ms  15.303 ms  15.242 ms
 3  tu-he-m-1-pc3.telemach.ba (77.77.197.82)  16.017 ms  15.974 ms  15.939 ms
 4  77.77.197.111 (77.77.197.111)  15.886 ms  16.450 ms  16.408 ms
 5  ki-he-m-1-te0-2.telemach.ba (77.77.197.74)  18.195 ms  18.157 ms  18.115 ms
 6  77.77.201.12 (77.77.201.12)  19.088 ms  10.370 ms  14.713 ms
 7  89.216.5.68 (89.216.5.68)  23.462 ms  18.005 ms  21.955 ms
 8  bg-tp-m-0-hg5-7.sbb.rs (89.216.5.231)  20.923 ms bg-tp-m-0-hg6-7.sbb.rs (89.                       216.5.255)  21.872 ms bg-tp-m-0-hg5-7.sbb.rs (89.216.5.231)  20.842 ms
 9  72.14.219.230 (72.14.219.230)  27.128 ms  27.095 ms  27.041 ms
10  74.125.242.225 (74.125.242.225)  28.460 ms  28.421 ms 74.125.242.241 (74.125                       .242.241)  26.411 ms
11  209.85.255.243 (209.85.255.243)  26.347 ms  26.300 ms 216.239.35.183 (216.23                       9.35.183)  23.896 ms
12  muc03s07-in-f110.1e100.net (172.217.19.110)  22.073 ms  25.628 ms  21.094 ms

[root@server1 ~]#
« Last Edit: January 15, 2020, 02:35:47 PM by nermin_dadan »

Re: Unable to send email
« Reply #5 on: January 15, 2020, 02:37:38 PM »
Yup, looks like you are blocked at 213.136.70.150 - I'll assume a ping doesn't work either.
Not much you can do other than contacting that remote server operator, or hoping that the block clears.
I presume your actual IP is 77.77.197.82 - which could have the block imposed on it.
As it appears you are using NAT on your sever, it may be a permanent block.

Not a CWP issue.

Offline
*
Re: Unable to send email
« Reply #6 on: January 18, 2020, 08:11:36 PM »
I am not blocked by anyone, the IP 213.136.70.150 is mine IP on dedicated server WHM/cPanel and the email does not even show up in WHM Mail delivery reports. I have added IP 77.78.204.207 to trusted hosts in WHM, but no email comes at all.

 It always shows up why IP address was blocked (blacklists, spam or bad IP reputation) in mail delivery reports. My new server's IP (77.78.204.207) does not show up at all, or sender email info@futuratoneri.ba.

I have set up NAT on server.

Sorry if there are some dumb questions, but it is my first time working with Centos 7 web panel on my own.

What am I doing wrong?

Thank you!

Re: Unable to send email
« Reply #7 on: January 18, 2020, 08:30:52 PM »
Once again, it isn't a CWP issue if your basic network skills are lacking. You haven't answered the ping question, though your traceroute displays the routing problem nicely. I'm not here to tutor you on networking/debugging however, perhaps someone else will.