Postfix Sending e-mail failed, out of time

Discussion in 'Server Operation' started by kameleon1er, Oct 26, 2020.

Tags:
  1. kameleon1er

    kameleon1er Member

    Hello everyone, my server works pretty well but I still have some problems sending e-mails. Some of them don't work and end up in time-out.

    Could this be due to a bad configuration of my ipV6?

    Do I have to configure it in postfix or can I force ipV4 alone?

    I put here the return mail that came to me several days after I sent it...

    Thank you for your lights :
    Code:
                     The mail system
    
    <[email protected]>: connect to smtp-in.orange.fr[193.252.22.65]:25:
        Connection timed out
    
    <[email protected]>: connect to
        alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
        timed out
    
    <[email protected]>: connect to
        alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
        timed out
    
    <[email protected]>: connect to
        alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
        timed out
    
    
    Reporting-MTA: dns; srv-b.democrasite.com
    X-Postfix-Queue-ID: 48F927FC82
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Wed, 21 Oct 2020 11:07:39 +0000 (UTC)
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 4.4.1
    Diagnostic-Code: X-Postfix; connect to smtp-in.orange.fr[193.252.22.65]:25:
        Connection timed out
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 4.4.1
    Diagnostic-Code: X-Postfix; connect to
        alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
        timed out
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 4.4.1
    Diagnostic-Code: X-Postfix; connect to
        alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
        timed out
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 4.4.1
    Diagnostic-Code: X-Postfix; connect to
        alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
        timed out
    
    
    Return-Path: <[email protected]>
    Received: from localhost (srv-b.democrasite.com.democrasite.com [127.0.0.1])
        by srv-b.democrasite.com (Postfix) with ESMTP id 48F927FC82;
        Wed, 21 Oct 2020 11:07:39 +0000 (UTC)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kameleon.fr; h=
        content-language:content-type:content-type:mime-version
        :user-agent:date:date:message-id:subject:subject:from:from; s=
        default; t=1603278420; x=1605092821; bh=4HB1vQZ0OOus/LttmzuHN6Qs
        KUct6NTFwBceTRKEXIA=; b=ZYaxFYAifJXrGRoYdWRo+GBgBQIc11VBkqkyy7Fk
        QlX19/UFjCV62ZAY2j+C5woLnNUFLXBOWzVb03W/u7ll6BmzxmK5T8XrkqVguVKU
        aotrsw+2ifGz5wvNQbRVuEHumBnmb3S8PpcDHxtkqbGo9xMJebOOY9Ez7cSz+L95
        eoI=
    X-Virus-Scanned: Debian amavisd-new at democrasite.com
    Received: from srv-b.democrasite.com ([127.0.0.1])
        by localhost (srv-b.democrasite.com.democrasite.com [127.0.0.1]) (amavisd-new, port 10026)
        with ESMTP id KtvRb8KZ3ivD; Wed, 21 Oct 2020 11:07:00 +0000 (UTC)
    Received: from [192.168.1.140] (lneuilly-657-1-64-178.w80-11.abo.wanadoo.fr [80.11.30.178])
        (Authenticated sender: [email protected])
        by srv-b.democrasite.com (Postfix) with ESMTPSA id 1D93D7FC7E;
        Wed, 21 Oct 2020 11:06:59 +0000 (UTC)
    To: [email protected], [email protected], [email protected],
     Louis Motin <[email protected]>
    From: "kameleon1er@nabil" <[email protected]>
    Subject: =?UTF-8?Q?Rappel_cotises=2c_caution=e2=80=a6?=
    Message-ID: <[email protected]>
    Date: Wed, 21 Oct 2020 13:06:59 +0200
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0)
     Gecko/20100101 Thunderbird/68.12.1
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
     boundary="------------B273C8977DF85A2198C0E9ED"
    Content-Language: fr
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I see the problem for a IPv4 address aswell, so it might be a issue with your network or network adapter.
     
  3. kameleon1er

    kameleon1er Member

    Hi Thom, thanks… network adapter ? I don't know if I have one :) I have a scaleway's VPS :
    Code:
    Public IP
    163.172.143.149
    Private IP : 10.65.110.21
    IPv6 : 2001:bc8:47b0:170a::1
    Gateway : 2001:bc8:47b0:170a::
    Netmask : 64
    Public DNS : b2ba61ba-757f-4ed3-9f37-4ce915d98047.pub.instances.scw.cloud
    $ ifconfig :
    Code:
    ens2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 10.65.110.21  netmask 255.255.255.254  broadcast 10.65.110.21
            inet6 2001:bc8:47b0:170a::1  prefixlen 64  scopeid 0x0<global>
            inet6 fe80::dc1c:4cff:fe4b:200b  prefixlen 64  scopeid 0x20<link>
            ether de:1c:4c:4b:20:0b  txqueuelen 1000  (Ethernet)
            RX packets 9839295  bytes 2021996700 (1.8 GiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 9556834  bytes 4678798870 (4.3 GiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 750835  bytes 230961632 (220.2 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 750835  bytes 230961632 (220.2 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Every server has a network adapter if they are connected to the internet. You might want to check with scaleway to see if there is a problem on their end or yours.
     
  5. kameleon1er

    kameleon1er Member

    Ok, I can try to ask them, but the problem is not with all my mail adresses… Could you please show me where do you see the problem, I will follow… Tanks a lot
     
  6. kameleon1er

    kameleon1er Member

    Code:
    Oct 26 20:42:01 srv-b CRON[14835]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Oct 26 20:42:20 srv-b postfix/qmgr[1299]: 393157FEBC: from=<[email protected]>, size=2034, nrcpt=1 (queue active)
    Oct 26 20:42:20 srv-b postfix/error[14860]: 393157FEBC: to=<[email protected]>, relay=none, delay=103414, delays=103414/0.07/0/0.03, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1a]:25: Connection timed out)
    Oct 26 20:42:32 srv-b kernel: [1748173.555169] [UFW BLOCK] IN=ens2 OUT= MAC=de:1c:4c:4b:20:0b:96:1b:ed:5a:ef:3f:08:00 SRC=92.63.197.95 DST=10.65.110.21 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=37482 PROTO=TCP SPT=56358 DPT=30130 WINDOW=1024 RES=0x00 SYN URGP=0
    Oct 26 20:42:34 srv-b postfix/smtpd[14679]: connect from unknown[141.98.10.143]
    
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    For example these two:
    Code:
    <[email protected]>: connect to smtp-in.orange.fr[193.252.22.65]:25:
       Connection timed out
    
    <[email protected]>: connect to
       alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c05::1b]:25: Connection
       timed out
    I think your network just times out so it is not related to the mailaddress. Or port 25 is blocked on your network...
     
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    simple test. from the cli on your mail server.
    telnet 193.252.22.65 25
    see if that connects or times out.
    if it times out, try
    telnet 193.252.22.65 587
    if that connects ok, then you have a firewall somewhere blocking port 25 outbound.
     
  9. kameleon1er

    kameleon1er Member

    Thanks, sounds ok …
    Code:
    telnet 163.172.143.149 25
    Trying 163.172.143.149...
    Connected to srv-b.democrasite.com.
    Escape character is '^]'.
    220 srv-b.democrasite.com ESMTP Postfix (Debian/GNU)
    -------------------------------------
    telnet 163.172.143.149 587
    Trying 163.172.143.149...
    Connected to srv-b.democrasite.com.
    Escape character is '^]'.
    220 srv-b.democrasite.com ESMTP Postfix (Debian/GNU)
     
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    that's your own server. your issue is connecting from your own server to external mailservers.

    that's why the example i gave was to telnet to the ip address of one of the servers you had problems connecting to:

    try it again, using the ip in the examples i gave, 193.252.22.65 from the cli of your mail server.
     
    Th0m likes this.
  11. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    and from scaleway's website:

    blocking port 25 outbound i can understand, but 465 and 587 as well.... i'm all for paranoia when it comes to server security, but that's a bit excessive.
     
    kameleon1er likes this.
  12. kameleon1er

    kameleon1er Member

    I don't know how to use cli commands yet. In the PDF manual there is this part :
    Code:
    apt-get -y install php5-cli php5-mysql php5-mcrypt mcrypt
    Do I need to install this?
     
  13. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    ermm... you've already used cli commands haven't you? how did you run those telnet tests earlier?
    although it seems a bit redundant to do them now, since we know scaleways will block them, i assume you didn't make any attempt to enable smtp in scaleways security groups prior to finding this problem?
     
  14. kameleon1er

    kameleon1er Member

    Yes, I hadn't checked the box for smtp at scaleway. I just did.
    Earlier for Telnet, I did it with my Terminal :)
    Now that scaleway is OK, I'm redoing some tests.

     
  15. kameleon1er

    kameleon1er Member

    That was the trick :) I guess… to gmail adresses ;
    Code:
    Delivered-To: [email protected]
    Received: by 2002:a17:906:70c3:0:0:0:0 with SMTP id g3csp3497570ejk;
            Tue, 27 Oct 2020 04:08:04 -0700 (PDT)
    X-Google-Smtp-Source: ABdhPJzFaql26PD82scwz52bZTZs5tR9uaU8yG7nC8sXjU/Dy1BgLJWcX4lcAWfDS+UYLTmzs1yF
    X-Received: by 2002:a5d:4648:: with SMTP id j8mr2164538wrs.131.1603796884023;
            Tue, 27 Oct 2020 04:08:04 -0700 (PDT)
    ARC-Seal: i=1; a=rsa-sha256; t=1603796884; cv=none;
            d=google.com; s=arc-20160816;
            b=jiUCEKGDxicSGyWY8QsNwJWvQUrr6aH/I3I9c14sLz5UhNCHeGIVQr9zcRUixBsB3t
             0dxqla0fXOkC+n7gePkAagGK2lwtsvxXSh3lSRfwMRMnD8YJZ9p3q6k+EtgFCbbJ4Vm4
             fnpQhZjGEA5k6q54P9uT9Q5kglL7vUnX3XyrsfUNYyLM8Mef98bD25udfUpyTOQ1/RZf
             VR13wg3a1MbKvs8I98wGEKx3F+8cC+IrZaZvYsc99QU38BGsG2vhUhv24oMWV1Q4+bEm
             wovCixLWjzxLcI4kbwyy9gt4Th/msAltELKpWudQzATcnm1/wCvSBjxYfOaAgJ6OOucN
             zPFA==
    ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
            h=content-language:content-transfer-encoding:mime-version:user-agent
             :date:message-id:subject:from:to:dkim-signature;
            bh=t/EtO3NG3mknuuwPASLpDPnTQB915J8za06TxesA+gA=;
            b=0s9Q92nCEjwYdb6Pj97dzvcsxR8j315IUmkD1wapGjne9ncAZF6DWVGy8OlPrVojJs
             vSbXAvzEGq1LqiufmQuqWZRGNe1NYn//sCgoEQPEibEjZDhrXGGo0V2I0YartxkapSh/
             pT6wNQUVHMhCrjbR9OgaRWiZZ1C1E8L/DUEuPzCQR5Pj4f508TgSlt3+2/BMCJ1jnEQP
             HByzYaPO91Y+7F1/VGqAzq0fs44TKbsgfiPpET5AYKey5c+j3RPZexeheOW65TKlBkre
             n+OgnE2DpBadh4N77hNywV+4Jv8tiatZgNroIdW34YZI3tfXwCZ/NgdmZlNo4nqZENJ8
             gN1w==
    ARC-Authentication-Results: i=1; mx.google.com;
           dkim=neutral (invalid public key) [email protected] header.s=default header.b=BEIU7955;
           spf=pass (google.com: domain of [email protected] designates 2001:bc8:47b0:170a::1 as permitted sender) [email protected];
           dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=opaz-ateliers.com
    Return-Path: <[email protected]>
    Received: from srv-b.democrasite.com ([2001:bc8:47b0:170a::1])
            by mx.google.com with ESMTPS id j12si1276689wmi.61.2020.10.27.04.08.03
            for <[email protected]>
            (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
            Tue, 27 Oct 2020 04:08:03 -0700 (PDT)
    Received-SPF: pass (google.com: domain of [email protected] designates 2001:bc8:47b0:170a::1 as permitted sender) client-ip=2001:bc8:47b0:170a::1;
    Authentication-Results: mx.google.com;
           dkim=neutral (invalid public key) [email protected] header.s=default header.b=BEIU7955;
           spf=pass (google.com: domain of [email protected] designates 2001:bc8:47b0:170a::1 as permitted sender) [email protected];
           dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=opaz-ateliers.com
    Received: from localhost (srv-b.democrasite.com.democrasite.com [127.0.0.1])
        by srv-b.democrasite.com (Postfix) with ESMTP id B810B7FEC8
        for <[email protected]>; Tue, 27 Oct 2020 11:08:03 +0000 (UTC)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=
        opaz-ateliers.com; h=content-language:content-transfer-encoding
        :content-type:content-type:mime-version:user-agent:date:date
        :message-id:subject:subject:from:from; s=default; t=1603796844;
         x=1605611245; bh=t/EtO3NG3mknuuwPASLpDPnTQB915J8za06TxesA+gA=; b=
        BEIU7955ZpfK4TZMpSEG0Rrj7P3EjPCnE7l5ONbkGKuJ+n6+rMF3ZoB0u81WJXcG
        ciuddpqiXE+sSy5gxZ8AJKnvc9OxNrpZ0kjYT3nV0QDL/UmD8e9Z4CjXT3QIQQwn
        rBBy4fcNNDsJj379nh2DawLWgHKmCGvd0RHU1TyXGB0=
    X-Virus-Scanned: Debian amavisd-new at democrasite.com
    Received: from srv-b.democrasite.com ([127.0.0.1])
        by localhost (srv-b.democrasite.com.democrasite.com [127.0.0.1]) (amavisd-new, port 10026)
        with ESMTP id 5RPAcdHPsOXQ for <[email protected]>;
        Tue, 27 Oct 2020 11:07:24 +0000 (UTC)
    Received: from [192.168.1.140] (lneuilly-657-1-64-178.w80-11.abo.wanadoo.fr [80.11.30.178])
        (Authenticated sender: [email protected])
        by srv-b.democrasite.com (Postfix) with ESMTPSA id 494CF7FC82
        for <[email protected]>; Tue, 27 Oct 2020 11:07:24 +0000 (UTC)
    To: Kameleon Premier <[email protected]>
    From: opaz-ateliers-contact <[email protected]>
    Subject: =?UTF-8?Q?test_apr=c3=a8s_security_group_scaleway?=
    Message-ID: <[email protected]>
    Date: Tue, 27 Oct 2020 12:07:24 +0100
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0)
     Gecko/20100101 Thunderbird/68.12.1
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8; format=flowed
    Content-Transfer-Encoding: 8bit
    Content-Language: fr
    
    test after scaleway security check…
    I also see that I have one more error :
    Code:
    ARC-Authentication-Results: i=1; mx.google.com;
           dkim=neutral (invalid public key) [email protected] header.s=default header.b=BEIU7955;
           spf=pass (google.com: domain of [email protected] designates 2001:bc8:47b0:170a::1 as permitted sender) [email protected];
           dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=opaz-ateliers.com
     
  16. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    yep, looks like your dkim key for opaz-ateliers.com
     
  17. kameleon1er

    kameleon1er Member

    ///// SOLVED ///// Thanks guys, U saved my day :)
     
    Th0m likes this.

Share This Page