Loading ...
Sorry, an error occurred while loading the content.

Can't receive emails, but I can send

Expand Messages
  • Chris
    Hello, I ve setup Postfix, Dovecot with MySQL and PostfixAdmin like here: https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
    Message 1 of 6 , Sep 5, 2013
    • 0 Attachment
      Hello,

      I've setup Postfix, Dovecot with MySQL and PostfixAdmin like here:
      https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
      on an Ubuntu 12.04 VPS.

      I can send mails - so far so good.
      Now I assume, that something is wrong with my rejection list. If I send
      an email from a freemailer to any account I see this in the mail.info:

      Sep 5 04:47:01 nudin1 postfix/smtp[26753]: 5F08712E005F:
      to=<root@nudin1>, relay=none, delay=0.05, delays=0.01/0/0.04/0,
      dsn=5.4.4, status=bounced (Host or domain name not found. Name service
      error for name=nudin1 type=AAAA: Host not found)
      Sep 5 04:47:01 nudin1 postfix/qmgr[25983]: 5F08712E005F: removed

      /etc/hosts:
      fe00::0 ip6-localnet
      ff00::0 ip6-mcastprefix
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters

      ::1 localhost ip6-localhost ip6-loopback
      127.0.0.1 localhost.localdomain localhost
      # Auto-generated hostname. Please do not remove this comment.
      888.888.888.888 nudin1
      (changed the ip address)

      postconf -n:
      append_dot_mydomain = no
      biff = no
      broken_sasl_auth_clients = yes
      config_directory = /etc/postfix
      content_filter = amavis:[127.0.0.1]:10024
      disable_vrfy_command = yes
      dovecot_destination_recipient_limit = 1
      enable_original_recipient = no
      header_checks = regexp:/etc/postfix/header_checks
      inet_interfaces = all
      mailbox_size_limit = 0
      maximal_backoff_time = 8000s
      maximal_queue_lifetime = 7d
      minimal_backoff_time = 1000s
      mydestination = $myhostname, /etc/postfix/virtual/domains
      myhostname = mail.m445.com
      mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
      mynetworks_style = host
      myorigin = /etc/hostname
      readme_directory = no
      recipient_delimiter = +
      smtp_helo_timeout = 60s
      smtp_tls_note_starttls_offer = yes
      smtp_tls_security_level = may
      smtpd_banner = $myhostname ESMTP $mail_name
      smtpd_client_restrictions = reject_rbl_client zen.spamhaus.org,
      reject_rbl_client blackholes.easynet.nl
      smtpd_data_restrictions = reject_unauth_pipelining
      smtpd_delay_reject = yes
      smtpd_hard_error_limit = 12
      smtpd_helo_required = yes
      smtpd_helo_restrictions = permit_mynetworks, warn_if_reject
      reject_non_fqdn_hostname, reject_invalid_hostname, permit
      smtpd_recipient_limit = 16
      smtpd_recipient_restrictions = reject_unauth_pipelining,
      permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient,
      reject_unknown_recipient_domain, reject_unauth_destination, permit
      smtpd_sasl_auth_enable = yes
      smtpd_sasl_authenticated_header = yes
      smtpd_sasl_local_domain =
      smtpd_sasl_path = private/auth
      smtpd_sasl_security_options = noanonymous
      smtpd_sasl_type = dovecot
      smtpd_sender_restrictions = permit_sasl_authenticated,
      permit_mynetworks, warn_if_reject reject_non_fqdn_sender,
      reject_unknown_sender_domain, reject_unauth_pipelining, permit
      smtpd_soft_error_limit = 3
      smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
      smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
      smtpd_tls_loglevel = 1
      smtpd_tls_received_header = yes
      smtpd_tls_security_level = may
      smtpd_tls_session_cache_timeout = 3600s
      smtpd_use_tls = yes
      tls_random_source = dev:/dev/urandom
      unknown_local_recipient_reject_code = 450
      virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf,
      mysql:/etc/postfix/mysql_virtual_alias_domainaliases_maps.cf
      virtual_gid_maps = static:8
      virtual_mailbox_base = /var/vmail
      virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
      virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf,
      mysql:/etc/postfix/mysql_virtual_mailbox_domainaliases_maps.cf
      virtual_transport = dovecot
      virtual_uid_maps = static:150

      I'm not perfectly sure about the hostname in the /etc/hosts ..
      Does this need to be an actual domain name of one of the domains which
      are served by this server?
      Is there anything wrong in the main.cf?

      Thank you in advance
      Bye, Chris
    • Vishal Agarwal
      ... Also pl check your resolve.conf file.
      Message 2 of 6 , Sep 5, 2013
      • 0 Attachment
        On 09/05/2013 02:30 PM, Chris wrote:
        Hello,

        I've setup Postfix, Dovecot with MySQL and PostfixAdmin like here:
        https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
        on an Ubuntu 12.04 VPS.

        I can send mails - so far so good.
        Now I assume, that something is wrong with my rejection list. If I send an email from a freemailer to any account I see this in the mail.info:

        Sep  5 04:47:01 nudin1 postfix/smtp[26753]: 5F08712E005F: to=<root@nudin1>, relay=none, delay=0.05, delays=0.01/0/0.04/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=nudin1 type=AAAA: Host not found)
        Sep  5 04:47:01 nudin1 postfix/qmgr[25983]: 5F08712E005F: removed

        /etc/hosts:
        fe00::0         ip6-localnet
        ff00::0         ip6-mcastprefix
        ff02::1         ip6-allnodes
        ff02::2         ip6-allrouters

        ::1             localhost ip6-localhost ip6-loopback
        127.0.0.1 localhost.localdomain localhost
        # Auto-generated hostname. Please do not remove this comment.
        888.888.888.888 nudin1
        (changed the ip address)

        postconf -n:
        append_dot_mydomain = no
        biff = no
        broken_sasl_auth_clients = yes
        config_directory = /etc/postfix
        content_filter = amavis:[127.0.0.1]:10024
        disable_vrfy_command = yes
        dovecot_destination_recipient_limit = 1
        enable_original_recipient = no
        header_checks = regexp:/etc/postfix/header_checks
        inet_interfaces = all
        mailbox_size_limit = 0
        maximal_backoff_time = 8000s
        maximal_queue_lifetime = 7d
        minimal_backoff_time = 1000s
        mydestination = $myhostname, /etc/postfix/virtual/domains
        myhostname = mail.m445.com
        mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
        mynetworks_style = host
        myorigin = /etc/hostname
        readme_directory = no
        recipient_delimiter = +
        smtp_helo_timeout = 60s
        smtp_tls_note_starttls_offer = yes
        smtp_tls_security_level = may
        smtpd_banner = $myhostname ESMTP $mail_name
        smtpd_client_restrictions = reject_rbl_client zen.spamhaus.org, reject_rbl_client blackholes.easynet.nl
        smtpd_data_restrictions = reject_unauth_pipelining
        smtpd_delay_reject = yes
        smtpd_hard_error_limit = 12
        smtpd_helo_required = yes
        smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
        smtpd_recipient_limit = 16
        smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit
        smtpd_sasl_auth_enable = yes
        smtpd_sasl_authenticated_header = yes
        smtpd_sasl_local_domain =
        smtpd_sasl_path = private/auth
        smtpd_sasl_security_options = noanonymous
        smtpd_sasl_type = dovecot
        smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
        smtpd_soft_error_limit = 3
        smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
        smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
        smtpd_tls_loglevel = 1
        smtpd_tls_received_header = yes
        smtpd_tls_security_level = may
        smtpd_tls_session_cache_timeout = 3600s
        smtpd_use_tls = yes
        tls_random_source = dev:/dev/urandom
        unknown_local_recipient_reject_code = 450
        virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/mysql_virtual_alias_domainaliases_maps.cf
        virtual_gid_maps = static:8
        virtual_mailbox_base = /var/vmail
        virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
        virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/mysql_virtual_mailbox_domainaliases_maps.cf
        virtual_transport = dovecot
        virtual_uid_maps = static:150

        I'm not perfectly sure about the hostname in the /etc/hosts ..
        Does this need to be an actual domain name of one of the domains which are served by this server?
        Is there anything wrong in the main.cf?

        Thank you in advance
        Bye, Chris

        It looks like that you have missed 198.187.29.107 this ip in your my networks.
        Also pl check your resolve.conf file.


      • Wietse Venema
        ... Postfix requires that the destination has an MX, A, or AAAA record. To disable DNS lookups: # postconf -e disable_dns_lookups = yes # postfix reload
        Message 3 of 6 , Sep 5, 2013
        • 0 Attachment
          Chris:
          > Hello,
          >
          > I've setup Postfix, Dovecot with MySQL and PostfixAdmin like here:
          > https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
          > on an Ubuntu 12.04 VPS.
          >
          > I can send mails - so far so good.
          > Now I assume, that something is wrong with my rejection list. If I send
          > an email from a freemailer to any account I see this in the mail.info:
          >
          > Sep 5 04:47:01 nudin1 postfix/smtp[26753]: 5F08712E005F:
          > to=<root@nudin1>, relay=none, delay=0.05, delays=0.01/0/0.04/0,
          > dsn=5.4.4, status=bounced (Host or domain name not found. Name service
          > error for name=nudin1 type=AAAA: Host not found)

          Postfix requires that the destination has an MX, A, or AAAA record.

          To disable DNS lookups:

          # postconf -e 'disable_dns_lookups = yes'
          # postfix reload

          Wietse
        • Chris
          Wietse: thank you for your support. It seems to be a bit better - at least now I can send an email but I can t receive it. My DNS looks like: @ 86400 IN MX 10
          Message 4 of 6 , Sep 5, 2013
          • 0 Attachment
            Wietse:

            thank you for your support. It seems to be a bit better - at least now I
            can send an email but I can't receive it.

            My DNS looks like:
            @ 86400 IN MX 10 mail
            and I just added:
            mail 86400 IN A 888.888.888.888

            I disabled the dns lookup.
            Then I've tried to send an email from privatemail@... to
            info@... and got this from the log:


            Sep 5 09:05:21 nudin1 postfix/smtpd[31096]: warning: dict_nis_init: NIS
            domain name not set - NIS lookups disabled
            Sep 5 09:05:21 nudin1 postfix/smtpd[31096]: Anonymous TLS connection
            established from shout01.mail.de[213.128.888.216]: TLSv1.1 with cipher
            AECDH-AES256-SHA (256/256 bits)
            Sep 5 09:05:21 nudin1 postfix/trivial-rewrite[31074]: warning: do not
            list domain domain1.de in BOTH mydestination and virtual_mailbox_domains
            Sep 5 09:05:21 nudin1 postfix/smtpd[31096]: 677F412E0063:
            client=shout01.mail.de[213.128.888.216]
            Sep 5 09:05:21 nudin1 postfix/cleanup[31092]: 677F412E0063:
            message-id=<52288189.8040108@...>
            Sep 5 09:05:23 nudin1 postfix/trivial-rewrite[31074]: warning: do not
            list domain domain1.de in BOTH mydestination and virtual_mailbox_domains
            Sep 5 09:05:23 nudin1 postfix/trivial-rewrite[31074]: warning: do not
            list domain domain1.de in BOTH mydestination and virtual_mailbox_domains
            Sep 5 09:05:23 nudin1 postfix/local[31094]: DBCDD12E0065:
            to=<info@...>, relay=local, delay=0.03, delays=0.01/0/0/0.02,
            dsn=5.1.1, status=bounced (unknown user: "info")
            Sep 5 09:05:23 nudin1 postfix/smtp[31102]: 677F412E0063:
            to=<info@...>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.6,
            delays=0.15/0.01/0/2.4, dsn=2.0.0, status=sent (250 2.0.0 from
            MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as DBCDD12E0065)
            Sep 5 09:05:54 nudin1 postfix/smtp[31076]: connect to
            mail.de[2001:868:100:600::200]:25: Connection timed out
            Sep 5 09:05:56 nudin1 dovecot: pop3-login: Login:
            user=<info@...>, method=PLAIN, rip=221.172.223.1,
            lip=888.236.10.239, mpid=31110, TLS
            Sep 5 09:05:58 nudin1 dovecot: pop3(info@...): Disconnected:
            Logged out top=0/0, retr=0/0, del=0/3, size=5904741

            First the sending process and then the fetching one.

            I just see:
            postfix/trivial-rewrite[31074]: warning: do not list domain domain1.de
            in BOTH mydestination and virtual_mailbox_domains
            and I changed it already in main.cf to nudin1 (it's just a name for the
            server I came up with, but the domain isn't registered).

            Not sure how to continue from here. :-S

            Hope anyone can help me to get this up and running.

            Thanks,
            Chris




            Am 05.09.2013 20:05, schrieb Wietse Venema:
            > Chris:
            >> Hello,
            >>
            >> I've setup Postfix, Dovecot with MySQL and PostfixAdmin like here:
            >> https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
            >> on an Ubuntu 12.04 VPS.
            >>
            >> I can send mails - so far so good.
            >> Now I assume, that something is wrong with my rejection list. If I send
            >> an email from a freemailer to any account I see this in the mail.info:
            >>
            >> Sep 5 04:47:01 nudin1 postfix/smtp[26753]: 5F08712E005F:
            >> to=<root@nudin1>, relay=none, delay=0.05, delays=0.01/0/0.04/0,
            >> dsn=5.4.4, status=bounced (Host or domain name not found. Name service
            >> error for name=nudin1 type=AAAA: Host not found)
            >
            > Postfix requires that the destination has an MX, A, or AAAA record.
            >
            > To disable DNS lookups:
            >
            > # postconf -e 'disable_dns_lookups = yes'
            > # postfix reload
            >
            > Wietse
            >
            >
          • Wietse Venema
            ... Don t do that. For more support, provide output from: postconf -n mydestination virtual_mailbox_domains Wietse
            Message 5 of 6 , Sep 5, 2013
            • 0 Attachment
              Chris:
              > Sep 5 09:05:21 nudin1 postfix/trivial-rewrite[31074]: warning: do not
              > list domain domain1.de in BOTH mydestination and virtual_mailbox_domains

              Don't do that.

              For more support, provide output from:

              postconf -n mydestination virtual_mailbox_domains

              Wietse
            • Chris
              Wietse: Thanks, that gave me the clue - now it works again. There was a file with some virtual domains that I tried since something with mysql didn t seem to
              Message 6 of 6 , Sep 5, 2013
              • 0 Attachment
                Wietse:

                Thanks, that gave me the clue - now it works again.

                There was a file with some virtual domains that I tried since something
                with mysql didn't seem to work. I just commented it out.

                Eventually I have no idea why it suddenly stopped working :-S
                But thanks for the support - really happy now. :)

                Chris

                Am 05.09.2013 22:40, schrieb Wietse Venema:
                > Chris:
                >> Sep 5 09:05:21 nudin1 postfix/trivial-rewrite[31074]: warning: do not
                >> list domain domain1.de in BOTH mydestination and virtual_mailbox_domains
                >
                > Don't do that.
                >
                > For more support, provide output from:
                >
                > postconf -n mydestination virtual_mailbox_domains
                >
                > Wietse
                >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.