Receive mail but impossible to sent

Discussion in 'General' started by Oitsuki, Feb 26, 2020.

  1. Oitsuki

    Oitsuki Member

    Hello,

    I can receive email but I can not sent
    Roundcube make an error
    Code:
    Erreur SMTP (250) : échec lors de l'authentification.
    and there my log on mail.log
    Code:
    oot@ns3xxxxxxxx:/var/log# tail -f mail.log
    Feb 26 03:29:22 ns3xxxxxxxx postfix/smtpd[2406]: connect from localhost[127.0.0.1]
    Feb 26 03:29:22 ns3xxxxxxxx postfix/smtpd[2406]: CE8151D40082: client=localhost[127.0.0.1]
    Feb 26 03:29:22 ns3xxxxxxxx postfix/cleanup[2403]: CE8151D40082: message-id=<[email protected]>
    Feb 26 03:29:22 ns3xxxxxxxx postfix/qmgr[1197]: CE8151D40082: from=<[email protected]>, size=1456, nrcpt=1 (queue active)
    Feb 26 03:29:22 ns3xxxxxxxx amavis[1282]: (01282-01) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [104.158.61.37]:44926 [104.158.61.37] <[email protected]> -> <[email protected]>, Queue-ID: 5EB4E1D40081, Message-ID: <[email protected]>, mail_id: br8VLFZfW8Su, Hits: -, size: 372, queued_as: CE8151D40082, dkim_new=default:domain.org, 162 ms
    Feb 26 03:29:22 ns3xxxxxxxx postfix/smtp[2404]: 5EB4E1D40081: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.65, delays=0.46/0.02/0.01/0.16, 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 CE8151D40082)
    Feb 26 03:29:22 ns3xxxxxxxx postfix/qmgr[1197]: 5EB4E1D40081: removed
    Feb 26 03:29:23 ns3xxxxxxxx dovecot: lda([email protected])<2409><PjSsNhLmVV5pCQAAyB2G8Q>: sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    Feb 26 03:29:23 ns3xxxxxxxx postfix/pipe[2408]: CE8151D40082: to=<[email protected]>, relay=dovecot, delay=0.23, delays=0.04/0.01/0/0.17, dsn=2.0.0, status=sent (delivered via dovecot service)
    Feb 26 03:29:23 ns3xxxxxxxx postfix/qmgr[1197]: CE8151D40082: removed
    Feb 26 03:30:02 ns3xxxxxxxx dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<0EhFOHKfkKEAAAAAAAAAAAAAAAAAAAAB>
    Feb 26 03:30:02 ns3xxxxxxxx dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<PU1FOHKf5pAAAAAAAAAAAAAAAAAAAAAB>
    Feb 26 03:30:02 ns3xxxxxxxx postfix/smtpd[2500]: warning: cannot load 1024-bit DH parameters from file /etc/ssl/private/dhparams.pem: No such file or directory -- using compiled-in defaults
    Feb 26 03:30:02 ns3xxxxxxxx postfix/smtpd[2500]: connect from localhost[::1]
    Feb 26 03:30:02 ns3xxxxxxxx postfix/smtpd[2500]: lost connection after CONNECT from localhost[::1]
    Feb 26 03:30:02 ns3xxxxxxxx postfix/smtpd[2500]: disconnect from localhost[::1] commands=0/0
    
    Any idea ?

    Thank you.
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Have you checked that line?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the content of the file /etc/postfix/master.cf
     
  4. Oitsuki

    Oitsuki Member

    Hello,
    in etc/ssl/private I have only this
    apache.pem dovecot.pem ns320556.ip-94-23-7.eu.key pure-ftpd.pem ssl-cert-snakeoil.key

    /etc/postif/master.cf
    Code:
    #
    # 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       -       y       -       -       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=$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       -       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=$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
    
    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}
    
    # ====================================================================
    #
    # 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
    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}
    
    # ispconfig 3
    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
    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
    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
    
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    master.cf looks fine so far. Please login to webmail and send an email to the same address you used for the webmail login. does this email arrive after a few seconds in the webmail inbox?
     
  6. Oitsuki

    Oitsuki Member

    I think I have been received an email but with lot of delay.
    tested as you say, nothing for moment,
    There is not log mail in the queue (around 13) but I do not see the latest I sent
    example :
    postqueue -p
    009B51D40083 1300 Wed Feb 26 07:43:48 [email protected]
    (deferred transport)
    loic.gmail.com
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Post the lines that got added in the mail log for this test email send.
     
  8. Oitsuki

    Oitsuki Member

    1 - postqueue -p 15
    2 - postsuper -d ALL
    3 - postqueue -p
    empty

    5 - create an email [email protected] to [email protected] ==> no error appear
    6 - postqueue -p
    Mail queue is empty
    Nothing in queue for this moment (after 1mn)

    mail.log
    Feb 26 19:53:48 nsxxxxxxdovecot: pop3-login: Login: user=<[email protected]>, method=PLAIN, rip=104.158.61.37, lip=94.23.7.166, mpid=30473, TLS, session=<37J09n+fWuhonj0l>
    Feb 26 19:53:48 nsxxxxxx dovecot: pop3([email protected])<30473><37J09n+fWuhonj0l>: Disconnected: Logged out top=0/0, retr=2/3012, del=0/2, size=2978
     
  9. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Those logs are for a pop3 login/logout, ie. a client (and not roundcube) checking email; what you need to find is the logs created when you send a new test message.
     
  10. Oitsuki

    Oitsuki Member

    Ok email received and sent by thunderbird
    but by roundube I have always this :
    Erreur SMTP (250) : échec lors de l'authentification.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    roundcube connects to localhost and does not has to authenticate itself. Check your roundcube config and ensure that the smtp server is set to 'localhost'. Then check postfix main.cf file and ensure that IP 127.0.0.1 is listed in the mynetworks line.
     
  12. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    This is true, but there is an advantage to setting roundcube to authenticate, in that postfix then adds the authenticated sender info to the headers, which is picked up by spamassassin and can help it work better (ie. can help improve how spamassassin performs at remote sites, not necessarily on your own server).
     
    till likes this.
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Agreed, did not think of that. In this case, he must reconfigure RoundCube to authenticate correctly with email address and password as the mail system must be working when Thunderbird is able to login.
     
  14. Oitsuki

    Oitsuki Member

    Yes the smtp server is set to 'localhost' and IP 127.0.0.1 is listed in the mynetworks line (see above)
    // %z - IMAP domain (IMAP hostname without the first part)
    // For example %n = mail.domain.tld, %t = domain.tld
    $config['smtp_server'] = 'localhost';
     

Share This Page