550-No Such User Here 550 Sender

Discussion in 'ISPConfig 3 Priority Support' started by tucutacr, Jul 18, 2017.

  1. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hi everyone
    I have see the manual and nothing comes out of how to configure postfix or bind.

    The problem is that I can not see mydomain.me.
    I have also set up an email and when I try to send an email, it returns me: 550-No Such User Here 550 Sender.
    I followed the https://www.howtoforge.com/tutorial...l-pureftpd-bind-postfix-doveot-and-ispconfig/ and i could not configure my domain.

    Thank you in advance for all the help you can give me.

    I have the following configuration:
    File hostname on /etc
    Code:
    [email protected]:/etc# cat hostname
    server1
    
    File 'hosts' on /etc:
    Code:
    [email protected]:/etc# cat hosts
    127.0.0.1       localhost
    192.172.1.50    server1.domain.me server1
    [...]
    
    File 'resolv.conf' on /etc:
    Code:
    [email protected]:/etc# cat resolv.conf
    [...]
    nameserver 192.172.1.50
    
    File 'named.conf.options' on /etc/bind:
    Code:
    [email protected]:/etc/bind# cat named.conf.options
    options {
      directory "/var/cache/bind";
    
      // If there is a firewall between you and nameservers you want
      // to talk to, you may need to fix the firewall to allow multiple
      // ports to talk.  See http://www.kb.cert.org/vuls/id/800113
    
      // If your ISP provided one or more IP addresses for stable
      // nameservers, you probably want to use them as forwarders.
      // Uncomment the following block, and insert the addresses replacing
      // the all-0's placeholder.
    
      // forwarders {
      //  0.0.0.0;
      // };
    
      //========================================================================
      // If BIND logs error messages about the root key being expired,
      // you will need to update your keys.  See https://www.isc.org/bind-keys
      //========================================================================
      dnssec-enable yes;
      dnssec-validation yes;
      dnssec-lookaside auto;
    
      auth-nxdomain no;  # conform to RFC1035
      listen-on-v6 { any; };
    };
    
    File dns for my domain on /etc/bind:
    Code:
    [email protected]:/etc/bind# cat pri.domain.me
    $TTL  3600
    @  IN  SOA  ns1.domain.me. info.domain.me. (
      2017071806  ; serial, todays date + todays serial #
      7200  ; refresh, seconds
      540  ; retry, seconds
      604800  ; expire, seconds
      3600 )  ; minimum, seconds
    ;
    
    domain.me. 3600 A  192.172.1.50
    www 3600 A  192.172.1.50
    mail 3600 A  192.172.1.50
    mx 3600 A  192.172.1.50
    ns1 3600 A  192.172.1.50
    ns2 3600 A  192.172.1.50
    domain.me. 3600  NS  ns1.domain.me.
    domain.me. 3600  NS  ns2.domain.me.
    domain.me. 3600  MX  10  mail.domain.me.
    domain.me. 3600  TXT  "v=spf1 mx a ~all"
    
    File 'master.cf' on /etc/postfix
    Code:
    [email protected]:/etc/postfix# cat master.cf
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master" or
    # on-line: http://www.postfix.org/master.5.html).
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # 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  -  -  -  -  smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -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  -  -  -  -  smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -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 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
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -  n  n  -  -  pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    #  lmtp  cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus  unix  -  n  n  -  -  pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix  -  n  n  -  -  pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # 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 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 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
    
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    BIND and Postfix are both configured by the ISPConfig installer already, so there is no further configuration required. You just have to add the DNS zone and the website in ISPConfig as described in the manual.

    The zone file is fine. Run the following command on the shell of your server and post the result:

    dig @localhost domain.me

    Replace domain.me with your real domain name.

    Regarding email. Create an email domain in ISPConfig and then create a mailbox in ISPConfig. Then login to this mailbox in Roundcube on your server and send an email to the same address that you used for logging into RoundCube. Wait a minute and check in Roundcube if the email arrived in the inbox again.
     
  3. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hi Till, thanks for your reply and you help.

    Code:
    [[email protected] named]# dig [USER=13658]@localhost[/USER] domain.me
    
    ; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> [USER=13658]@localhost[/USER] domain.me
    ; (2 servers found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20686
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
    ;; WARNING: recursion requested but not available
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;domain.me.  IN  A
    
    ;; ANSWER SECTION:
    domain.me.  3600  IN  A  my.external.ip
    
    ;; AUTHORITY SECTION:
    domain.me.  3600  IN  NS  ns2.server1.domain.me.
    domain.me.  3600  IN  NS  ns1.server1.domain.me.
    
    ;; ADDITIONAL SECTION:
    ns1.server1.domain.me.  3600  IN  A  my.external.ip
    ns2.server1.domain.me.  3600  IN  A  my.external.ip
    
    ;; Query time: 0 msec
    ;; SERVER: ::1#53:):1)
    ;; WHEN: Sat Jul 22 01:10:04 CST 2017
    ;; MSG SIZE  rcvd: 128
    Regarding email, it came exactly as I sent it.
     
  4. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hello Till, I love this panel, if it helps me to configure my server with my own dns and that my mails will run support them for a long time.

    Thank you
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The etst above is fine, it shows that email and DNS are working on the server. So when you can't reach the mail and DNS server from outside, then there might be a firewall in between (e.g. at your ISP or datacenter provider) which blocks access to these services.

    Just to be sure that the services are correctly listening on the eexternal network interface, please run the test script from here and post the output:

    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
     
  6. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hi Till thanks for you reply:

    I can already see my server from outside: in pri.domain.me I have the following and this work fine:

    Code:
    $TTL 10800
    @ IN SOA server.domain.me.    postmaster.domain.me. (
        2017072306  ;serial
        21600    ;refresh after 6 hours
        3600    ;retry after 1 hour
        86400   ;expire after 1 week
        86400 )    ;minimum TTL of 1 day
    @            3600        IN        A            ext.ip
    @            172800        IN        NS            server.domain.me.
    @            172800        IN        NS            server2.domain.me.
    @            86400        IN        MX            10  mail.domain.me.
    
    server        172800        IN        A            ext.ip
    server2        172800        IN        A            ext.ip
    mail        3600        IN        A            ext.ip
    
    www            3600        IN        CNAME        @
    ftp            3600        IN        CNAME        @
    
    server        3600        IN        TXT            "v=spf1 mx a ~all"
    The problem now I have it with my email account. If I send an email to my account, everything is fine, but if I send it to some other mail I receive: Diagnostic-Code: smtp; 550-Verification failed.

    In my Master i have:
    Code:
    submission inet n  -  -  -  -  smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -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=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps  inet  n  -  -  -  -  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=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    
    What will be the problem and thank you very much for the help you can give me ...
    One more thing that I forgot: If I send an email to my account in hotmail it arrives at unwanted mails, but if I send it to a personal email account it does not.
     
    Last edited: Jul 26, 2017
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, I guess don't understand your post :) You said that you can not send from your account because you get 550 code and at the end, you write that you can send to hotmail. Are you able to send mails out at the moment or not? Maybe you can describe exactly from where to where you are sending emails when it does not work and post the exact error messages that you get in the mail log on your server then.

    And when you send mail with an external email client like outlook or thunderbird, then ensure that you enabled smtp authentication, your email program has to authenticate itself when email is sent with the email address and password of the email account.

    Regarding DNS, the spf record is wrong, remove the 'server' from the host field. an SPF record ha to be for the domain and not the hostname of the server.
     
  8. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hi Till, thanks you for you fast reply.
    Yes, if I send an email to my hotmail account I get it, but if I send an email to my account [email protected] I get the message:
    550-Verification failed.
    This appears in the hotmail header:
    Code:
    Received: from server.domain.me ([ext.ip]) by SNT004-MC2F14.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23143);
         Tue, 25 Jul 2017 22:50:02 -0700
    Received: from localhost (localhost.localdomain [127.0.0.1])
        by server.domain.me (Postfix) with ESMTP id BEF6860CE78D
        for <[email protected]>; Tue, 25 Jul 2017 23:49:59 -0600 (CST)
    X-Virus-Scanned: amavisd-new at server.domain.me
    Received: from server.domain.me ([127.0.0.1])
        by localhost (server.domain.me [127.0.0.1]) (amavisd-new, port 10026)
        with ESMTP id lZV_Y8hgXD07 for <[email protected]>;
        Tue, 25 Jul 2017 23:49:59 -0600 (CST)
    Received: from [192.172.1.25] (unknown [192.172.1.25])
        (Authenticated sender: [email protected])
        by server.domain.me (Postfix) with ESMTPSA id 1E5C0605EA1F
        for <[email protected]>; Wed, 26 Jul 2017 05:49:59 +0000 (UTC)
    To: <[email protected]>
    My own [email protected]
    Code:
    Return-Path: <MAILER-DAEMON>
    Delivered-To: [email protected]
    Received: by server.domain.me (Postfix)
    id 161C2605EA1F; Wed, 26 Jul 2017 01:40:15 -0600 (CST)
    Date: Wed, 26 Jul 2017 01:40:15 -0600 (CST)
    From: [email protected] (Mail Delivery System)
    Subject: Undelivered Mail Returned to Sender
    To: [email protected]
    Auto-Submitted: auto-replied
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
    boundary="B8F3D60CE796.1501054815/server.domain.me"
    Content-Transfer-Encoding: 7bit
    Message-Id: <[email protected]>
    
    This is a MIME-encapsulated message.
    
    --B8F3D60CE796.1501054815/server.domain.me
    Content-Description: Notification
    Content-Type: text/plain; charset=us-ascii
    
    This is the mail system at host server.domain.me.
    
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
    The mail system
    
    <[email protected]>: host otherdomain.com[69.175.92.117] said:
    550-Verification failed for <[email protected]> 550-No Such User Here 550 Sender
    verify failed (in reply to RCPT TO command)
    
    This ip 69.175.92.117 is not mine.
    My new file look like this and work fine:
    Code:
    $TTL 10800
    @ IN SOA server.domain.me. postmaster.domain.me. (
    2017072306 ;serial
    21600 ;refresh after 6 hours
    3600 ;retry after 1 hour
    86400 ;expire after 1 week
    86400 ) ;minimum TTL of 1 day
    @ 3600 IN A ext.ip
    @ 172800 IN NS server.domain.me.
    @ 172800 IN NS server2.domain.me.
    @ 86400 IN MX 10 mail.domain.me.
    
    server 172800 IN A ext.ip
    server2 172800 IN A ext.ip
    mail 3600 IN A ext.ip
    
    www 3600 IN CNAME @
    ftp 3600 IN CNAME @
    
    domain.me 3600 IN TXT "v=spf1 mx a ~all"
    
     
  9. tucutacr

    tucutacr New Member HowtoForge Supporter

    My mail log on /val/log/maillog
    Code:
    Jul 26 02:17:25 server postfix/submission/smtpd[3594]: 5A7E6605EA1F: client=unknown[192.172.1.25], sasl_method=PLAIN, [email protected]
    Jul 26 02:17:25 server postfix/cleanup[3603]: 5A7E6605EA1F: message-id=<[email protected]>
    Jul 26 02:17:25 server postfix/qmgr[1719]: 5A7E6605EA1F: from=<[email protected]>, size=637, nrcpt=1 (queue active)
    Jul 26 02:17:25 server postfix/submission/smtpd[3594]: disconnect from unknown[192.172.1.25]
    Jul 26 02:17:25 server clamd[1316]: SelfCheck: Database status OK.
    Jul 26 02:17:25 server dovecot: imap([email protected]): Disconnected: Disconnected in IDLE in=1574 out=10034
    Jul 26 02:17:25 server postfix/smtpd[2902]: connect from localhost.localdomain[127.0.0.1]
    Jul 26 02:17:25 server postfix/smtpd[2902]: CCE3F60CE79A: client=localhost.localdomain[127.0.0.1]
    Jul 26 02:17:25 server postfix/cleanup[3603]: CCE3F60CE79A: message-id=<[email protected]>
    Jul 26 02:17:25 server postfix/smtpd[2902]: disconnect from localhost.localdomain[127.0.0.1]
    Jul 26 02:17:25 server postfix/qmgr[1719]: CCE3F60CE79A: from=<[email protected]>, size=1090, nrcpt=1 (queue active)
    Jul 26 02:17:25 server amavis[2612]: (02612-02) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [192.172.1.25]:57883 [192.172.1.25] <[email protected]> -> <[email protected]>, Queue-ID: 5A7E6605EA1F, Message-ID: <[email protected]>, mail_id: XDoAEsjUsRx0, Hits: -1, size: 637, queued_as: CCE3F60CE79A, 463 ms
    Jul 26 02:17:25 server postfix/smtp[3604]: 5A7E6605EA1F: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.5, delays=0.02/0.01/0/0.46, 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 CCE3F60CE79A)
    Jul 26 02:17:25 server postfix/qmgr[1719]: 5A7E6605EA1F: removed
    Jul 26 02:17:28 server postfix/smtp[3608]: CCE3F60CE79A: to=<[email protected]>, relay=otherdomain.com[69.175.92.117]:25, delay=2.3, delays=0/0.01/2.2/0.12, dsn=5.0.0, status=bounced (host otherdomain.com[69.175.92.117] said: 550-Verification failed for <[email protected]> 550-No Such User Here 550 Sender verify failed (in reply to RCPT TO command))
    Jul 26 02:17:28 server postfix/cleanup[3603]: 421B7605EA1F: message-id=<[email protected]>
    Jul 26 02:17:28 server postfix/bounce[3609]: CCE3F60CE79A: sender non-delivery notification: 421B7605EA1F
    Jul 26 02:17:28 server postfix/qmgr[1719]: 421B7605EA1F: from=<>, size=3171, nrcpt=1 (queue active)
    Jul 26 02:17:28 server postfix/qmgr[1719]: CCE3F60CE79A: removed
    Jul 26 02:17:28 server dovecot: lda([email protected]): sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    Jul 26 02:17:28 server postfix/pipe[3610]: 421B7605EA1F: to=<[email protected]>, relay=dovecot, delay=0.04, delays=0/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot service)
    Jul 26 02:17:28 server postfix/qmgr[1719]: 421B7605EA1F: removed
    Jul 26 02:17:32 server dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=192.172.1.25, lip=192.172.1.50, mpid=3615, TLS, session=<kc1tFDRVYgDArAEZ>
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The file has an error, you missed the dot at the end of domain.me in the spf record. its has to be 'domain.me.'

    Regarding the other domain that you send an email to, is that on the same server then domain.me?
     
  11. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hi Till, thanks again for your quick reply:
    My new file looks like this:
    Code:
    $TTL 10800
    @ IN SOA server.domain.me. postmaster.domain.me. (
    2017072306 ;serial
    21600 ;refresh after 6 hours
    3600 ;retry after 1 hour
    86400 ;expire after 1 week
    86400 ) ;minimum TTL of 1 day
    @ 3600 IN A ext.ip
    @ 172800 IN NS server.domain.me.
    @ 172800 IN NS server2.domain.me.
    @ 86400 IN MX 10 mail.domain.me.
    
    server 172800 IN A ext.ip
    server2 172800 IN A ext.ip
    mail 3600 IN A ext.ip
    
    www 3600 IN CNAME @
    ftp 3600 IN CNAME @
    
    domain.me. 3600 IN TXT "v=spf1 mx a ~all"
    
    With regard to mail, I can not receive either from [email protected] nor from [email protected].

    [email protected] header
    Code:
    Return-Path: <>
    Delivered-To: [email protected]
    Received: from single-priva3a.otherdomain.com
    by single-priva3a.otherdomain.com (Dovecot) with LMTP id 8cZ5AfBZeFlzMgAABMwwLg
    for <[email protected]>; Wed, 26 Jul 2017 04:59:28 -0400
    Return-path: <>
    Envelope-to: [email protected]
    Delivery-date: Wed, 26 Jul 2017 04:59:28 -0400
    Received: from mailnull by single-priva3a.otherdomain.com with local (Exim 4.89)
    id 1daIAB-0003QN-VT
    for [email protected]; Wed, 26 Jul 2017 04:59:28 -0400
    X-Failed-Recipients: [email protected]
    Auto-Submitted: auto-replied
    From: Mail Delivery System <[email protected]>
    To: [email protected]
    Content-Type: multipart/report; report-type=delivery-status; boundary=1501059567-eximdsn-619062477
    MIME-Version: 1.0
    Subject: Mail delivery failed: returning message to sender
    Message-Id: <[email protected]>
    Date: Wed, 26 Jul 2017 04:59:27 -0400
    X-EsetId: 37303A29B931416D64726B
    
    --1501059567-eximdsn-619062477
    Content-type: text/plain; charset=us-ascii
    
    This message was created automatically by mail delivery software.
    
    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:
    
    [email protected]
    No Such User Here
    
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    1) ensure that the mx record of
    domain.me points really to an A-Record which points to the IP of the correct server.
    2) ensure that domain.me is not listed anywhere in the postfix main.cf file nor that it is the hostname of the server. In main.cf and as hostname you can use server.domain.me but not domain.me, if you would use domain.me, then this address will not be able to receive any emails.
     
  13. tucutacr

    tucutacr New Member HowtoForge Supporter

    Hi Till, thanks for you fast reply...
    This is correct...?
    @ 3600 IN A 201.202.external.ip

    On this tutorial (https://www.howtoforge.com/tutorial...php-pureftpd-postfix-dovecot-and-ispconfig/2/) never configures any postfix.

    My /etc/postfix/main.cf
    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    
    daemon_directory = /usr/libexec/postfix
    
    data_directory = /var/lib/postfix
    
    mail_owner = postfix
    
    #myhostname = host.domain.tld
    #myhostname = virtual.domain.tld
    #myhostname = server.domain.me
    
    #mydomain = domain.tld
    
    #myorigin = $myhostname
    #myorigin = $mydomain
    
    #inet_interfaces = all
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost
    inet_interfaces = all
    
    # Enable IPv4, and IPv6 if supported
    inet_protocols = all
    
    #proxy_interfaces =
    #proxy_interfaces = 1.2.3.4
    
    
    mydestination = $myhostname, server.domain.me, localhost, localhost.localdomain
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
    #  mail.$mydomain, www.$mydomain, ftp.$mydomain
    
    unknown_local_recipient_reject_code = 550
    
    #mynetworks_style = class
    #mynetworks_style = subnet
    #mynetworks_style = host
    
    #mynetworks = 168.100.189.0/28, 127.0.0.0/8
    #mynetworks = $config_directory/mynetworks
    #mynetworks = hash:/etc/postfix/network_table
    
    #relay_domains = $mydestination
    
    #relayhost = $mydomain
    #relayhost = [gateway.my.domain]
    #relayhost = [mailserver.isp.tld]
    #relayhost = uucphost
    #relayhost = [an.ip.add.ress]
    
    #relay_recipient_maps = hash:/etc/postfix/relay_recipients
    
    #in_flow_delay = 1s
    
    #alias_maps = dbm:/etc/aliases
    alias_maps = hash:/etc/aliases
    #alias_maps = hash:/etc/aliases, nis:mail.aliases
    #alias_maps = netinfo:/aliases
    
    #alias_database = dbm:/etc/aliases
    #alias_database = dbm:/etc/mail/aliases
    alias_database = hash:/etc/aliases
    #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
    
    #recipient_delimiter = +
    
    #home_mailbox = Mailbox
    #home_mailbox = Maildir/
    
    #mail_spool_directory = /var/mail
    #mail_spool_directory = /var/spool/mail
    
    #mailbox_command = /some/where/procmail
    #mailbox_command = /some/where/procmail -a "$EXTENSION"
    
    #luser_relay = [email protected]
    #luser_relay = [email protected]
    #luser_relay = admin+$local
    
    debug_peer_level = 2
    
    #debug_peer_list = 127.0.0.1
    #debug_peer_list = some.domain
    
    debugger_command =
      PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
      ddd $daemon_directory/$process_name $process_id & sleep 5
    
    sendmail_path = /usr/sbin/sendmail.postfix
    
    newaliases_path = /usr/bin/newaliases.postfix
    
    mailq_path = /usr/bin/mailq.postfix
    
    setgid_group = postdrop
    
    html_directory = no
    
    manpage_directory = /usr/share/man
    
    sample_directory = /usr/share/doc/postfix-2.10.1/samples
    
    readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.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 = mysql:/etc/postfix/mysql-virtual_uids.cf
    virtual_gid_maps = 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_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
    smtpd_use_tls = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = 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
    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, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    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
    smtp_tls_security_level = may
    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
    myhostname = server.domain.me
    mynetworks = 127.0.0.0/8 [::1]/128
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
    File /etc/hostname
    Code:
    [[email protected] etc]# cat hostname
    server.domain.me
    
    File /etc/hosts
    Code:
    [[email protected] etc]# cat hosts
    127.0.0.1  localhost.localdomain localhost
    192.172.1.50  server.domain.me server
    
    ::1  localhost.localdomain localhost
    
    Thanks in advance for you help...
    ;-)
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    When you are able to connect to the right server by using the domain name, e.g. with ssh, then the dns should be ok.

    Your main.cf does not look as if you started with a clean system, but ok, it might work nonetheless. To test the mail system, login to webmail on this server with a local email account. then send an email to the same address that you used for webmail login. then wait a minute and check if the email arrived in the inbox inside webmail. If yes, then the mail system itself is working fine.
     
  15. tucutacr

    tucutacr New Member HowtoForge Supporter

    I can connect via ssh from an external ip, I am using JuiceSSH.
    And yes, I can receive my own emails.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so your mail server is working fine. The server that complains that it can't find the email address is the system 'single-priva3a.otherdomain.com'. Is this the server that you just tested successfully? if not, then why is this other server receiving the emails:

    Maybe you changed dns and did not wait long enough (at least 24 hours) to let it propagate to all other dns servers?
    Or both servers are behind a router and the mail traffic is routed to the other system.
     
  17. tucutacr

    tucutacr New Member HowtoForge Supporter

  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Correct, users can not post more than 10.000 characters in a post and I did not ask you to post such large amount of characters :) I just explained which reasons it may have that your mail system is fully working and you still experience problems.
     
  19. tucutacr

    tucutacr New Member HowtoForge Supporter

    Something strange I've seen is that when I dig the domain I get the following:
    Code:
    ; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> cryn.me all
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32337
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
    ;; WARNING: recursion requested but not available
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;domain.me.  IN  A
    
    ;; ANSWER SECTION:
    domain.me.  3600  IN  A  201.202.ext.ip
    
    ;; AUTHORITY SECTION:
    domain.me.  172800  IN  NS  server2.domain.me.
    domain.me.  172800  IN  NS  server.domain.me.
    
    ;; ADDITIONAL SECTION:
    server.domain.me.  172800  IN  A  201.202.ext.ip
    server2.domain.me.  172800  IN  A  201.202.ext.ip
    
    ;; Query time: 0 msec
    ;; SERVER: 192.172.1.50#53(192.172.1.50)
    ;; WHEN: Wed Jul 26 04:52:35 CST 2017
    ;; MSG SIZE  rcvd: 127
    
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 45575
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
    ;; WARNING: recursion requested but not available
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;all.  IN  A
    
    ;; Query time: 0 msec
    ;; SERVER: 192.172.1.50#53(192.172.1.50)
    ;; WHEN: Wed Jul 26 04:52:35 CST 2017
    ;; MSG SIZE  rcvd: 32
    
    
     
  20. tucutacr

    tucutacr New Member HowtoForge Supporter

    Thanks Till, it's very kind ...
    This is very strange, if you like write to the mail with which I registered and give you access by ssh.
     

Share This Page