Results 1 to 8 of 8

Thread: Zentyal 3.3 ubuntu postfix, unable to receive external emails

  1. #1
    Join Date
    Feb 2014
    Beans
    26

    Zentyal 3.3 ubuntu postfix, unable to receive external emails

    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.$mydomai n
    smtp_helo_name = server01.rifaadh.com
    alias_maps = hash:/etc/aliases


    alias_database = hash:/etc/aliases
    local_recipient_maps = proxy:unixasswd.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=CourierMailAl ias))
    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_sen der_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

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    I don't see $mydomain set anywhere. Add
    Code:
    mydomain=rifaadh.com
    above myhostname. Without $mydomain specified, nothing in $mydestination will match mail addressed to rifaadh@rifaadh.com.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Feb 2014
    Beans
    26

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    Hello,

    first of all, thanks for you replay i really appreciated it.

    I inputted mydomain=rifaadh.com just above myhostname and restarted the postfix service and it is giving me the same error.

    do you have more ideas at what could be the cause?

    Thanks,

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    Code:
    mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain
    I misread that line and thought there was a comma between "localhost" and "$mydomain" rather than a period. Try using this for mydestination instead:

    Code:
    mydestination =  $myorigin, $myhostname, localhost.$mydomain, localhost, $mydomain
    For more details, see the discussion of the "mydestination" parameter in the Postfix documents.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Feb 2014
    Beans
    26

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    Hello,

    Thanks again for the replay. I did what you said and now i am getting another error on my mail.log file.

    "server01 postfix/trivial-rewrite[10785]: warning: do not list domain rifaadh.com in BOTH mydestination and virtual_mailbox_domains"

    Sorry for the long replay i tried a couple of things to see maybe it will work or not.

    Like:

    - i was able to telnet via the port smtp 587 on my windows computer also on my server. I put my cellphone on a hotspot and tried and i was able to telnet
    - i was able to input the from address but when inputted the rcpt address i got an error (on my server side and windows side and when i was on the hotspot also):
    rcpt to:<rifaadh@rifaadh.com>
    554 5.7.1 <rifaadh@rifaadh.com>: Recipient address rejected: Access denied

    - i read the my destination page and from what i understood my config is showing it correctly

    thanks,

    if i get to know anything i will post it here

  6. #6
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    I don't use virtual domains. (I actually don't use Postfix that much either; I've used sendmail for nearly two decades now.) Will you be accepting mail for multiple domains or just rifaadh.com? If the latter, I don't see much value in adding all of the complications of virtual domains.

    Anyway, I guess my suggestion doesn't work with virtual domains. Maybe another person with more experience there can help?
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Feb 2014
    Beans
    26

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    hey,

    Again i would like to thank you for your help.

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

    - What i did to resolve the matter:

    with zentyal you have to have a virtual domain to have email address. i recently did an update on zentyal and it screwed up a little my things so i reinstalled everything.

    then i did a 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/...25-in-postfix/

    - Now it works

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

  8. #8
    Join Date
    Feb 2014
    Beans
    26

    Re: Zentyal 3.3 ubuntu postfix, unable to receive external emails

    Thank you for all your help

Bookmarks

Posting Permissions

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