Author Topic: ***RESOLVED***Zentyal 3.3 postfix, unable to receive external emails  (Read 2632 times)

rifaadh

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Hello,

I am presently having an issue to get external emails. I am able to send email to my internal accounts also external accounts. My ISP is blocking the port 25 so i am using there smtp server to replay my email.

My external emails are being replayed via NoIP Reflector service and i am using the port 587, I also tried the port 465.

- The email comes to my server but gets rejected.

- I have already tried Telnet on my server and it works. I was able to connect to the ESTMP. Also i was able to send an email as my Gmail account to my internal account and it worked

Any help will be really appreciated. Here a couple of information. If you need more information please ask.

Mail.log file:

Feb  4 12:35:14 server01 postfix/smtpd[12593]: connect from mail1.no-ip.com[8.23.224.50]

Feb  4 12:35:14 server01 postfix/smtpd[12593]: NOQUEUE: reject: RCPT from  mail1.no-ip.com[8.23.224.50]: 554 5.7.1 <mail1.no-ip.com[8.23.224.50]>:  Client host rejected: Access denied; from=<My@gmail.com> to=<rifaadh@rifaadh.com> proto=ESMTP helo=<mail1.no-ip.com>

Main.cf file:

# Generated by Zentyal
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

# require helo
smtpd_delay_reject  = yes
smtpd_helo_required = yes

strict_rfc821_envelopes = yes
disable_vrfy_command = yes

smtpd_banner = server01.rifaadh.com ESMTP
biff = no

# appending .domain is the MUAs job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myorigin = /etc/mailname
myhostname = server01.rifaadh.com
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain
smtp_helo_name = server01.rifaadh.com
alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases
local_recipient_maps = proxy:unix:passwd.byname $alias_maps

relayhost = smtp.electronicbox.net:587

smtp_tls_security_level = may
smtp_tls_key_file  = /etc/postfix/sasl/postfix.pem
smtp_tls_cert_file = /etc/postfix/sasl/postfix.pem


mynetworks = 127.0.0.0/8

message_size_limit = 0
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all

# Virtual Aliases
virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = ldap:valiases
valiases_server_host = localhost:390
valiases_version = 3
valiases_search_base = ou=mailalias,ou=postfix,dc=rifaadh,dc=com
valiases_query_filter = (&(|(mail=%s)(mail=@%s))(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
valiases_bind = yes
valiases_bind_dn = cn=zentyalro,dc=rifaadh,dc=com
valiases_bind_pw = Mb2n6theMDbjHyWXYy4=

# Virtual Domains
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
virtual_mailbox_base = /var/vmail/
virtual_mailbox_maps= ldap:ldapvirtualmap
ldapvirtualmap_server_host = localhost:390
ldapvirtualmap_version = 3
ldapvirtualmap_search_base = dc=rifaadh,dc=com
ldapvirtualmap_query_filter = (&(mail=%s)(!(quota=-1))(objectClass=CourierMailA$
ldapvirtualmap_result_attribute = mailbox
ldapvirtualmap_bind = yes
ldapvirtualmap_bind_dn = cn=zentyalro,dc=rifaadh,dc=com
ldapvirtualmap_bind_pw = Mb2n6theMDbjHyWXYy4=

virtual_mailbox_domains = ldap:vmaildomains
vmaildomains_server_host = localhost:390
vmaildomains_version = 3
vmaildomains_search_base =  ou=vdomains,ou=postfix,dc=rifaadh,dc=com
vmaildomains_query_filter = (&(objectclass=domain)(dc=%s))
vmaildomains_result_attribute = dc, maildrop
vmaildomains_bind = yes
vmaildomains_bind_dn = cn=zentyalro,dc=rifaadh,dc=com
vmaildomains_bind_pw = Mb2n6theMDbjHyWXYy4=

virtual_minimum_uid = 100
virtual_uid_maps = static:107
virtual_gid_maps = static:112

# TLS/SSL
smtpd_use_tls = yes
smtpd_tls_key_file  = /etc/postfix/sasl/postfix.pem
smtpd_tls_cert_file = /etc/postfix/sasl/postfix.pem
smtpd_tls_loglevel = 0

# recipient restrictions
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, re$
submission_recipient_restrictions = reject_non_fqdn_sender, reject_non_fqdn_rec$
smtpd_restriction_classes = submission_recipient_restrictions

#SASL authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =  $myorigin

smtpd_sender_restrictions=reject_authenticated_sender_login_mismatch
smtpd_sender_login_maps = ldap:senderlogin
senderlogin_server_host = localhost:390
senderlogin_version = 3
senderlogin_search_base = dc=rifaadh,dc=com
senderlogin_query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
senderlogin_result_attribute = mail
senderlogin_bind = yes
senderlogin_bind_dn = cn=zentyalro,dc=rifaadh,dc=com
senderlogin_bind_pw = Mb2n6theMDbjHyWXYy4=


content_filter=smtp-amavis:127.0.0.1:10024












« Last Edit: February 06, 2014, 01:03:59 am by rifaadh »

rifaadh

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Zentyal 3.3 postfix, unable to receive external emails
« Reply #1 on: February 06, 2014, 01:02:01 am »
hey

I AM SOO HAPPY, I FIXED THE ISSUE AND IT WORKS!!!!!!!!!!

- i resolved the matter and i am inputting the resolution so it could help other people if they encounter the same issue


- What i did to resolve the matter:

i recently did an update on zentyal and it screwed up a little my things so i reinstalled everything.

then i did another telnet test but with the port 25 at home and i was able to connect to my server and send the email
but when i did it with the port 587 it failed and gave me the same error message.

- i changed the smtp port to 600 on the /etc/postfix/master.cf and /etc/services and i was able to telnet to the smtp server on my laptop
- also i put my laptop on the 3G and i was able to send an email like from my Gmail to my rifaadh@rifaadh.com
- i inserted in my router to forward the port 600 to my server
- i allowed the port 600 on my server firewall (EX: SMTP: source port= any, destination port = 600)

- i also added the noip mail server in my MX(Mail exchangers) in the DNS section

- i also changed the settings on my Noip account.

To change the smtp port i followed this link:

http://sharadchhetri.com/2013/03/06/how-to-change-smtp-port-number-25-in-postfix/

- Now it works

- it looks like the server does not want to receive email from the port 587.