postfix config

Discussion in 'Server Operation' started by etragardh, May 18, 2015.

  1. etragardh

    etragardh New Member

    Hi,

    I've followed this guide:
    https://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3
    Except that I now have a multi server environment and my mailserver is on a separate server.

    I have 2 separate problems (at least I think they are not connected)

    1) Some mail sent from others to me does not reach my inbox but some do. Actually most of them do and I've traced my problem as far as emails with no valid SPF records does not end up in the inbox. Not evan the "softfails". How do I change this?

    2) Some mail sent from my server to others does not reach the destination inbox (or the junkmail box).
    In the process of finding a solution this is what I've found.
    a) In my log files my emails seems to be logged as "RelayedOpenRelay" or "RelayedOutbound" - I suppose this is not expected behaviour and I have no clue why it differs from time to time.
    b) Some log-lines ends with "helo=woop.lan" where woop is the name of my laptop which is not part of my ISPConfig setup at all.
    I use Apple Mail on my laptop where I've setup IMAP and SMTP to my ISPConfig-mail-server just as I have my mail set up on my iPhone.

    Here is a cut from my log of an email I have sent and I know did not make it all the way to the receiver.
    Code:
    May 18 11:55:45 mail postfix/smtpd[28882]: connect from 81-235-175-155-no204.tbcn.telia.com[81.235.175.155]
    
    May 18 11:55:46 mail postfix/smtpd[28882]: NOQUEUE: filter: RCPT from 81-235-175-155-no204.tbcn.telia.com[81.235.175.155]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<woop.lan>
    
    May 18 11:55:46 mail postfix/smtpd[28882]: 6A37B13C1BB: client=81-235-175-155-no204.tbcn.telia.com[81.235.175.155], sasl_method=PLAIN, [email protected]
    
    May 18 11:55:46 mail postfix/cleanup[28887]: 6A37B13C1BB: message-id=<[email protected]>
    
    May 18 11:55:46 mail postfix/qmgr[20354]: 6A37B13C1BB: from=<[email protected]>, size=32370, nrcpt=1 (queue active)
    
    May 18 11:55:56 mail postfix/smtpd[28891]: connect from localhost[127.0.0.1]
    
    May 18 11:55:56 mail postfix/smtpd[28891]: 5B22E13C1BE: client=localhost[127.0.0.1]
    
    May 18 11:55:56 mail postfix/cleanup[28887]: 5B22E13C1BE: message-id=<[email protected]>
    
    May 18 11:55:56 mail postfix/qmgr[20354]: 5B22E13C1BE: from=<[email protected]>, size=33288, nrcpt=1 (queue active)
    
    May 18 11:55:56 mail postfix/smtpd[28891]: disconnect from localhost[127.0.0.1]
    
    May 18 11:55:56 mail amavis[21349]: (21349-13) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [81.235.175.155]:58573 [81.235.175.155] <[email protected]> -> <[email protected]>, Queue-ID: 6A37B13C1BB, Message-ID: <[email protected]>, mail_id: uvscuuaky4cf, Hits: 1.439, size: 32369, queued_as: 5B22E13C1BE, dkim_new=t:t.se, 9614 ms
    
    May 18 11:55:56 mail postfix/smtp[28888]: 6A37B13C1BB: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=10, delays=0.38/0.01/0/9.6, 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 5B22E13C1BE)
    
    May 18 11:55:56 mail postfix/qmgr[20354]: 6A37B13C1BB: removed
    
    May 18 11:55:56 mail postfix/smtp[28892]: connect to mx10-se.staysecuregroup.com[2001:67c:27e0:2110::2b01]:25: Network is unreachable
    
    May 18 11:55:56 mail postfix/smtp[28892]: connect to mx10-se.staysecuregroup.com[2001:9b0:1:703::2b01]:25: Network is unreachable
    
    May 18 11:55:56 mail postfix/smtp[28892]: connect to mx10-se.staysecuregroup.com[2001:67c:27e0:2210::2b01]:25: Network is unreachable
    
    May 18 11:55:58 mail postfix/smtp[28892]: 5B22E13C1BE: to=<[email protected]>, relay=mx10-se.staysecuregroup.com[91.236.208.20]:25, delay=2.6, delays=0/0.02/0.13/2.4, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 794FC7CC1B4)
    
    May 18 11:55:58 mail postfix/qmgr[20354]: 5B22E13C1BE: removed
    
    May 18 11:56:46 mail postfix/smtpd[28882]: disconnect from 81-235-175-155-no204.tbcn.telia.com[81.235.175.155]
    
    May 18 11:58:13 mail postfix/smtpd[28923]: warning: hostname 80-82-65-61.vmnode.pw does not resolve to address 80.82.65.61
    
    May 18 11:58:13 mail postfix/smtpd[28923]: connect from unknown[80.82.65.61]
    
    May 18 11:58:14 mail dovecot: auth-worker(28924): mysql(localhost): Connected to database dbispconfig
    
    May 18 11:58:16 mail postfix/smtpd[28923]: warning: unknown[80.82.65.61]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
    
    Thanks in advance.
    /Etragardh
     
    Last edited: May 18, 2015
  2. etragardh

    etragardh New Member

    I thought this might be worth knowing.

    Email sent from my ISPConfig-mail-server to my gmail.com address reaches my gmail inbox with the following information when pressing "show original message".

    Code:
    Delivered-To: [email protected]
    Received: by 10.152.214.70 with SMTP id ny6csp278730lac;
    Mon, 18 May 2015 13:10:06 -0700 (PDT)
    X-Received: by 10.112.119.139 with SMTP id ku11mr18092645lbb.49.1431979806221;
    Mon, 18 May 2015 13:10:06 -0700 (PDT)
    Return-Path: <[email protected]>
    Received: from mail.t.se (mail.t.se. [83.168.197.x])
    by mx.google.com with ESMTPS id l6si7347755lbd.114.2015.05.18.13.10.06
    for <[email protected]>
    (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
    Mon, 18 May 2015 13:10:06 -0700 (PDT)
    Received-SPF: pass (google.com: domain of [email protected] designates 83.168.197.x as permitted sender) client-ip=83.168.197.x;
    Authentication-Results: mx.google.com;
    spf=pass (google.com: domain of [email protected] designates 83.168.197.x as permitted sender) [email protected];
    dkim=pass [email protected]
    Received: from localhost (localhost [127.0.0.1])
    by mail.t.se (Postfix) with ESMTP id 0BD7F13C1BE
    for <[email protected]>; Mon, 18 May 2015 22:07:04 +0200 (CEST)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t.se; h=
    x-mailer:mime-version:date:date:message-id:subject:subject
    :content-transfer-encoding:content-type:content-type:from:from;
    s=tross; t=1431979614; x=1433794015; bh=mZ6EV2P1JA9DJkQ0YPvrWB1
    EDqBKp3/ImyNCMf0EIeA=; b=gcSxMmakFMRPiLn8rAO6jTmAdN/BrDite2yHaqi
    0CqGw5N0Ok0dHxW9w/qlOSAxMB9pjp0WcB+ueHdug697hygzYZfsHGXZ35Qp7nhT
    qS1ToxeinBRPcGPZsi39dIQEohOQ1BiG0UIYcswVgZIAkympxmyw0eKmV2aTWhZK
    CTO4=
    X-Virus-Scanned: Debian amavisd-new at mail.t.se
    Received: from mail.t.se ([127.0.0.1])
    by localhost (mail.t.se [127.0.0.1]) (amavisd-new, port 10026)
    with ESMTP id yzTmgycxbg8M for <[email protected]>;
    Mon, 18 May 2015 22:06:54 +0200 (CEST)
    Received: from woop.lan (81-235-175-155-no204.tbcn.telia.com [81.235.175.155])
    (Authenticated sender: [email protected])
    by mail.t.se (Postfix) with ESMTPSA id 850B213C1A7
    for <[email protected]>; Mon, 18 May 2015 22:06:54 +0200 (CEST)
    From: =?utf-8?Q?Emil_Tr=C3=A4g=C3=A5rdh?= <[email protected]>
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    Subject: kontrollera
    Message-Id: <[email protected]>
    Date: Mon, 18 May 2015 22:09:54 +0200
    To: =?utf-8?Q?Emil_Tr=C3=A4g=C3=A5rdh?= <[email protected]>
    Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
    X-Mailer: Apple Mail (2.2070.6)
    
    It shows all the world my laptop name "woop.lan" and my laptop ip 81.235.175.155 (replaced in all text here, my real ip is something else)
     
  3. florian030

    florian030 Well-Known Member HowtoForge Supporter

    1. Following the tutorial you have no spf-checks. If your server does not accept mails, then there must be another problem.
    2. If you sent mails and you mta delivers the mails to the other mta, you must check the remote-logs to find out, why the remote-server does not deliver your mail.
    The "Received: from woop.lan" in the mailheader is a normal header-line.
     
  4. etragardh

    etragardh New Member

    OK, I'll ask the server admin of the remote server then.
    But why does my log say RelayedOpenRelay and RelayedOutbound. Isn't this supposed to say RelayedInbound ?
    When I do online open relay tests it says that my server is no open relay.
     

Share This Page