can't send emails from mail-client outside my network

Discussion in 'Installation/Configuration' started by ragy, Dec 3, 2020.

  1. ragy

    ragy New Member

    i have a problem with my server running ISPconfig 3.1 then updated to 3.2, installed on ubuntu 18.04 by following The Perfect Server guide.
    the problem is that i can't send emails from any mail client from outside my newtwork, while sending from internal network is working fine.
    and if using webmail (roundcube) for sending/receiving from internal or external network it works fine as well, could someone help me understand the situation?
    here is the log while sending from outside my network
    Code:
    Dec  3 15:41:13 mail postfix/submission/smtpd[15880]: connect from unknown[external.ip.address.xx]
    Dec  3 15:41:14 mail postfix/submission/smtpd[15880]: NOQUEUE: filter: RCPT from unknown[external.ip.address.xx]: <[email protected]>: Sender address triggers FILTER lmtp:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[10.162.51.160]>
    Dec  3 15:41:14 mail postfix/submission/smtpd[15880]: A3E1E140094: client=unknown[external.ip.address.xx], sasl_method=PLAIN, [email protected]
    Dec  3 15:41:14 mail postfix/cleanup[15884]: A3E1E140094: message-id=<[email protected]>
    Dec  3 15:41:15 mail postfix/qmgr[15394]: A3E1E140094: from=<[email protected]>, size=1222, nrcpt=1 (queue active)
    Dec  3 15:41:15 mail postfix/submission/smtpd[15880]: disconnect from unknown[external.ip.address.xx] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
    Dec  3 15:41:15 mail postfix/smtpd[15888]: connect from localhost[127.0.0.1]
    Dec  3 15:41:15 mail postfix/smtpd[15888]: 99AA1142D4D: client=localhost[127.0.0.1]
    Dec  3 15:41:15 mail postfix/cleanup[15884]: 99AA1142D4D: message-id=<[email protected]>
    Dec  3 15:41:15 mail postfix/qmgr[15394]: 99AA1142D4D: from=<[email protected]>, size=2142, nrcpt=1 (queue active)
    Dec  3 15:41:15 mail postfix/smtpd[15888]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
    Dec  3 15:41:15 mail amavis[1696]: (01696-11) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [127.0.0.1] [196.132.7.99] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: Tj5HobkWRdNJ, Hits: -0.999, size: 1222, queued_as: 99AA1142D4D, dkim_new=default:mydomin.com, 669 ms
    Dec  3 15:41:15 mail postfix/lmtp[15885]: A3E1E140094: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.1, delays=0.43/0.02/0/0.68, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 99AA1142D4D)
    Dec  3 15:41:15 mail postfix/qmgr[15394]: A3E1E140094: removed
    Dec  3 15:41:16 mail postfix/smtp[15890]: 99AA1142D4D: to=<[email protected]>, relay=mx-eu.mail.am0.yahoodns.net[188.125.72.73]:25, delay=1.3, delays=0.04/0.03/0.7/0.51, dsn=5.7.1, status=bounced (host mx-eu.mail.am0.yahoodns.net[188.125.72.73] said: 554 5.7.1 This email from IP 197.50.241.58 has been rejected. The email message was detected as spam. (in reply to end of DATA command))
    Dec  3 15:41:16 mail postfix/cleanup[15884]: EA0F8142D4F: message-id=<[email protected]>
    Dec  3 15:41:16 mail postfix/bounce[15891]: 99AA1142D4D: sender non-delivery notification: EA0F8142D4F
    Dec  3 15:41:16 mail postfix/qmgr[15394]: EA0F8142D4F: from=<>, size=4310, nrcpt=1 (queue active)
    Dec  3 15:41:16 mail postfix/qmgr[15394]: 99AA1142D4D: removed
    Dec  3 15:41:17 mail dovecot: lmtp(15892): Connect from local
    Dec  3 15:41:17 mail dovecot: lmtp([email protected]): eL3sAP3qyF8UPgAA+5twOw: sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    Dec  3 15:41:17 mail postfix/lmtp[15885]: EA0F8142D4F: to=<[email protected]>, relay=mail.mydomin.com[private/dovecot-lmtp], delay=0.16, delays=0.03/0/0.02/0.11, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> eL3sAP3qyF8UPgAA+5twOw Saved)
    Dec  3 15:41:17 mail dovecot: lmtp(15892): Disconnect from local: Successful quit
    Dec  3 15:41:17 mail postfix/qmgr[15394]: EA0F8142D4F: removed
    
     
  2. ragy

    ragy New Member

    this is postfix master.cf
    Code:
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (no)    (never) (100)
    # ==========================================================================
    smtp      inet  n       -       y       -       -       smtpd
    #smtp      inet  n       -       y       -       1       postscreen
    #smtpd     pass  -       -       y       -       -       smtpd
    #dnsblog   unix  -       -       y       -       0       dnsblog
    #tlsproxy  unix  -       -       y       -       0       tlsproxy
    submission inet n       -       y       -       -       smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_tls_auth_only=yes
    #  -o smtpd_reject_unlisted_recipient=no
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=
    #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       y       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_reject_unlisted_recipient=no
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=
    #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       y       -       -       qmqpd
    pickup    unix  n       -       y       60      1       pickup
    cleanup   unix  n       -       y       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    #qmgr     unix  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       y       1000?   1       tlsmgr
    rewrite   unix  -       -       y       -       -       trivial-rewrite
    bounce    unix  -       -       y       -       0       bounce
    defer     unix  -       -       y       -       0       bounce
    trace     unix  -       -       y       -       0       bounce
    verify    unix  -       -       y       -       1       verify
    flush     unix  n       -       y       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       y       -       -       smtp
    relay     unix  -       -       y       -       -       smtp
            -o syslog_name=postfix/$service_name
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       y       -       -       showq
    error     unix  -       -       y       -       -       error
    retry     unix  -       -       y       -       -       error
    discard   unix  -       -       y       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       y       -       -       lmtp
    anvil     unix  -       -       y       -       1       anvil
    scache    unix  -       -       y       -       1       scache
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix   -   n   n   -   2   pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    
    
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
           -o smtp_bind_address=
    
    
    127.0.0.1:10025 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o smtpd_end_of_data_restrictions=
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
            -o disable_dns_lookups=yes
    
    
    127.0.0.1:10027 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o smtpd_end_of_data_restrictions=
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
           -o milter_default_action=accept
           -o milter_macro_daemon_name=ORIGINATING
            -o disable_dns_lookups=yes
    
     
  3. ragy

    ragy New Member

    this is postfix main.cf
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = /usr/share/doc/postfix
    
    # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
    # fresh installs.
    compatibility_level = 2
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    myhostname = mail.mydomin.com
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination = mail.mydomin.com, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains = proxy:mysql:/etc/postfix/mysql-virtual_alias_domains.cf
    virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = proxy:mysql:/etc/postfix/mysql-virtual_uids.cf
    virtual_gid_maps = proxy:mysql:/etc/postfix/mysql-virtual_gids.cf
    sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_restriction_classes = greylisting
    greylisting = check_policy_service inet:127.0.0.1:10023
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = proxy:mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = proxy:mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
    smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access proxy:mysql:/etc/postfix/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, reject_rbl_client zen.spamhaus.org, permit_sasl_authenticated, reject_unauth_pipelining, permit
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = lmtp:unix:private/dovecot-lmtp
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    owner_request_special = no
    smtp_tls_security_level = dane
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_exclude_ciphers = RC4, aNULL
    smtp_tls_exclude_ciphers = RC4, aNULL
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    content_filter = lmtp:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    message_size_limit = 0
    smtpd_etrn_restrictions = permit_mynetworks, reject
    smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
    smtpd_tls_mandatory_ciphers = medium
    tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
    tls_preempt_cipherlist = no
    address_verify_negative_refresh_time = 60s
    enable_original_recipient = no
    smtpd_forbidden_commands = CONNECT,GET,POST,USER,PASS
    address_verify_sender_ttl = 15686s
    smtp_dns_support_level = dnssec
     
  4. ragy

    ragy New Member

    this is the output of dovecot -n
    Code:
    # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
    # Pigeonhole version 0.4.21 (92477967)
    # OS: Linux 4.15.0-124-generic x86_64 Ubuntu 18.04.5 LTS
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    listen = *,[::]
    lmtp_rcpt_check_quota = yes
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_max_userip_connections = 100
    mail_plugins = quota
    mail_privileged_group = vmail
    passdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    plugin {
      quota = dict:user::file:/var/vmail/%d/%n/.quotausage
      quota_status_nouser = DUNNO
      quota_status_overquota = 552 5.2.2 Mailbox is full
      quota_status_success = DUNNO
      sieve = /var/vmail/%d/%n/.sieve
      sieve_after = /var/vmail/%d/%n/.ispconfig.sieve
      sieve_before = /var/vmail/%d/%n/.ispconfig-before.sieve
      sieve_max_actions = 100
      sieve_max_redirects = 25
      sieve_max_script_size = 2M
    }
    postmaster_address = [email protected]
    protocols = imap pop3 lmtp
    service auth {
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
      }
      unix_listener auth-userdb {
        group = vmail
        mode = 0600
        user = vmail
      }
      user = root
    }
    service imap-login {
      client_limit = 1000
      process_limit = 512
    }
    service lmtp {
      unix_listener /var/spool/postfix/private/dovecot-lmtp {
        group = postfix
        mode = 0600
        user = postfix
      }
    }
    service quota-status {
      client_limit = 1
      executable = quota-status -p postfix
      unix_listener /var/spool/postfix/private/quota-status {
        group = postfix
        mode = 0660
        user = postfix
      }
    }
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
    ssl_key =  # hidden, use -P to show it
    userdb {
      driver = prefetch
    }
    userdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    protocol imap {
      auth_verbose = yes
      mail_plugins = quota imap_quota
    }
    protocol pop3 {
      auth_verbose = yes
      mail_plugins = quota
      pop3_uidl_format = %08Xu%08Xv
    }
    protocol lda {
      mail_plugins = sieve quota
      postmaster_address = [email protected]
    }
    protocol lmtp {
      mail_plugins = quota sieve
      postmaster_address = [email protected]
    }
     
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Sending worked fine from your side, the message was rejected by the recipient as being spam. Search for that, there are numerous related posts (eg. check/work on your server's reputation, setup PTR record, setup DMARC using SPF and DKIM signing).
     
  6. ragy

    ragy New Member

    i noticed that the recipient did rejected the mail, which is strange to my understanding because when i send the same mail to the same recipient from inside my local network or as i said from webmail (roundcube) and it accepts the mail and it goes directly to the inbox not the spam folder.
    any way this is the mail log while sending from inside my local lan
    Code:
    Dec  3 15:37:19 mail postfix/submission/smtpd[15608]: connect from _gateway[192.168.1.1]
    Dec  3 15:37:20 mail postfix/submission/smtpd[15608]: NOQUEUE: filter: RCPT from _gateway[192.168.1.1]: <[email protected]>: Sender address triggers FILTER lmtp:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[192.168.1.6]>
    Dec  3 15:37:20 mail postfix/submission/smtpd[15608]: 09CD4140094: client=_gateway[192.168.1.1], sasl_method=PLAIN, [email protected]
    Dec  3 15:37:20 mail postfix/cleanup[15612]: 09CD4140094: message-id=<[email protected]>
    Dec  3 15:37:20 mail postfix/qmgr[15394]: 09CD4140094: from=<[email protected]>, size=764, nrcpt=1 (queue active)
    Dec  3 15:37:20 mail postfix/submission/smtpd[15608]: disconnect from _gateway[192.168.1.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
    Dec  3 15:37:20 mail dovecot: imap([email protected]): Connection closed (IDLE running for 0.001 + waiting input for 0.001 secs, 2 B in + 10+10 B out, state=wait-input) in=1150 out=38190
    Dec  3 15:37:20 mail dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=192.168.1.1, lip=172.16.0.101, mpid=15618, TLS, session=<fzeJdY+1QJasEEtL>
    Dec  3 15:37:20 mail postfix/smtpd[15619]: connect from localhost[127.0.0.1]
    Dec  3 15:37:20 mail postfix/smtpd[15619]: BB25D142D4D: client=localhost[127.0.0.1]
    Dec  3 15:37:20 mail postfix/cleanup[15612]: BB25D142D4D: message-id=<[email protected]>
    Dec  3 15:37:20 mail postfix/qmgr[15394]: BB25D142D4D: from=<[email protected]>, size=1701, nrcpt=1 (queue active)
    Dec  3 15:37:20 mail postfix/smtpd[15619]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
    Dec  3 15:37:20 mail amavis[1695]: (01695-10) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [127.0.0.1] <[email protected]> -> <any.account@y ahoo.com>, Message-ID: <[email protected]>, mail_id: lJdZKmzMFTdU, Hits: -1, size: 764, queued_as: BB25D142D4D, dkim_new=default:mydomain.com, 643 ms
    Dec  3 15:37:20 mail postfix/lmtp[15613]: 09CD4140094: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.81, delays=0.14/0.02/0/0.65, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as BB25D142D4D)
    Dec  3 15:37:20 mail postfix/qmgr[15394]: 09CD4140094: removed
    Dec  3 15:37:33 mail postfix/smtp[15621]: BB25D142D4D: to=<[email protected]>, relay=mx-eu.mail.am0.yahoodns.net[188.125.72.73]:25, delay=13, delays=0.04/0.03/0.77/12, dsn=2.0.0, status=sent (250 ok dirdel)
    Dec  3 15:37:33 mail postfix/qmgr[15394]: BB25D142D4D: removed
    Dec  3 15:37:48 mail dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=15624, secured, session=<VEIyd4+12rp/AAAB>
    Dec  3 15:37:48 mail dovecot: imap([email protected]): Logged out in=204 out=2593
    and this is a screenshot of mail.mydomin.com score at mail-tester.com
    my-domain-dns-score.png
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    It tells you there is no A record for the hostname of your mailserver. You need to create that DNS record.
     
  8. ragy

    ragy New Member

    i already have an A record set at namecheap.com nameserver you can verify it here in this screenshot, also i added the same records in ISPconfig DNS (but when i used the DNS wizard of ISPconfig it added records with local ips as my server is behind nat so i changed local ips to the real public ips).
    mydomain-dns-records.png
    is there a way to see the whole mail that is being sent to a recipient?, this way changes can be compared and it will be visible why the recipient accepted mail from inside my LAN while rejecting other mail from outside my LAN.
     
  9. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Do you have an email account at a different provider? the easiest way would be to send yourself two messages there and compare them.
     
  10. ragy

    ragy New Member

    i have tried to send mail to other mail provider but it get rejected, so i did try installing the new update of ISPconfig from 3.2 to 3.2.1 to let it reconfigure the postfix and dovecot services but without change the problem still exists.
    but now when sending out mail from outside my lan network (using android k9-mail client through my mobile network) i see new line in the logs which says that the ip address that the mobile network gave me is blacklisted in nsZones.com as you can see in this log when sending to yahoo
    Code:
    Dec  4 17:21:41 mail amavis[27595]: (27595-01) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [127.0.0.1] [196.157.36.242] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: kShfpmfXGiH1, Hits: -0.999, size: 6002, queued_as: 74DAC142009, dkim_new=default:mydomain.com, 1030 ms
    Dec  4 17:21:41 mail postfix/lmtp[27934]: 1B839141450: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.7, delays=0.65/0.02/0.01/1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 74DAC142009)
    Dec  4 17:21:41 mail postfix/qmgr[27502]: 1B839141450: removed
    Dec  4 17:21:41 mail postfix/smtp[27942]: 74DAC142009: host mx-eu.mail.am0.yahoodns.net[188.125.72.74] refused to talk to me: 421 service not available (connection to blacklisted host (188.125.72.74 - DNSBL))
    Dec  4 17:21:53 mail postfix/smtp[27942]: 74DAC142009: to=<[email protected]>, relay=mx-eu.mail.am0.yahoodns.net[188.125.72.73]:25, delay=12, delays=0.05/0.03/11/1, dsn=5.7.1, status=bounced (host mx-eu.mail.am0.yahoodns.net[188.125.72.73] said: 554 5.7.1 Message refused by DNSBL check. bl.nsZones.com / 196.157.36.242 This email from IP 197.50.241.58 has been rejected. The email message was detected as spam. (in reply to end of DATA command))
    and with gmail as well
    Code:
    Dec  4 20:34:24 mail amavis[27596]: (27596-02) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [127.0.0.1] [196.157.36.242] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: iJ5Q5Anf4O_M, Hits: -0.999, size: 6002, queued_as: 7B9AE14200C, dkim_new=default:mydomain.com, 814 ms
    Dec  4 20:34:24 mail postfix/lmtp[4450]: 415C6141450: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.5, delays=0.68/0.02/0/0.82, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 7B9AE14200C)
    Dec  4 20:34:24 mail postfix/qmgr[27502]: 415C6141450: removed
    Dec  4 20:34:25 mail postfix/smtp[4455]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1b]:25: Network is unreachable
    Dec  4 20:34:27 mail postfix/smtp[4455]: 7B9AE14200C: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.133.26]:25, delay=2.8, delays=0.05/0.03/1.5/1.2, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[74.125.133.26] said: 554 5.7.1 Message refused by DNSBL check. bl.nsZones.com / 196.157.36.242 This email from IP 197.50.241.58 has been rejected. The email message was detected as spam. (in reply to end of DATA command))
    but is this normal for an email to get rejected because ip that the mail client uses not the server's ip itself ?!
    also the line that says
    , does this mean that it changes the origin of the mail from my server ip to the ip of the mail-client
     

Share This Page