Email problem... sending emails

Discussion in 'Installation/Configuration' started by Troy, May 9, 2019.

  1. Troy

    Troy New Member

    OK, did a email test with ISPconfig and roundcube

    I can receive emails but unable to send emails I get this instant email returned to the roundcube web mail client.

    This is the mail system at host server5.domainname.com.

    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.
    Any tips what I need to do to fix this issue?

    The mail system

    <[email protected]>: host gmail-smtp-in.l.google.com[118.187.103.27] said:
    550-5.7.1 This message does not have authentication information or fails to
    pass 550-5.7.1 authentication checks. To best protect our users from spam,
    the 550-5.7.1 message has been blocked. Please visit 550-5.7.1
    https://support.google.com/mail/answer/81126#authentication for more 550
    5.7.1 information. k19si517511otl.158 - gsmtp (in reply to end of DATA
    command)
    Reporting-MTA: dns; server5.domainname.com
    X-Postfix-Queue-ID: 517512A18E3
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Thu, 9 May 2019 20:27:08 +0000 (UTC)

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.7.1
    Remote-MTA: dns; gmail-smtp-in.l.google.com
    Diagnostic-Code: smtp; 550-5.7.1 This message does not have authentication
    information or fails to pass 550-5.7.1 authentication checks. To best
    protect our users from spam, the 550-5.7.1 message has been blocked. Please
    visit 550-5.7.1
    https://support.google.com/mail/answer/81126#authentication for more 550
    5.7.1 information. k19si517511otl.158 - gsmtp
     
  2. Troy

    Troy New Member

    This is the /var/log/mail.log

    May 9 23:53:09 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:09 server5 dovecot: imap([email protected]): Logged out in=29 out=502
    May 9 23:53:09 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:09 server5 dovecot: imap([email protected]): Logged out in=70 out=633
    May 9 23:53:10 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:10 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:10 server5 dovecot: imap([email protected]): Logged out in=233 out=1026
    May 9 23:53:10 server5 dovecot: imap([email protected]): Logged out in=318 out=2527
    May 9 23:53:14 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:14 server5 dovecot: imap([email protected]): Logged out in=318 out=2519
    May 9 23:53:15 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:15 server5 dovecot: imap([email protected]): Logged out in=32 out=485
    May 9 23:53:15 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:15 server5 dovecot: imap([email protected]): Logged out in=44 out=592
    May 9 23:53:34 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:34 server5 postfix/pickup[898]: 6848F2A18E1: uid=33 from=<[email protected]>
    May 9 23:53:34 server5 postfix/cleanup[2044]: 6848F2A18E1: message-id=<[email protected]$
    May 9 23:53:34 server5 postfix/qmgr[899]: 6848F2A18E1: from=<[email protected]>, size=515, nrcpt=1 (queue active)
    May 9 23:53:34 server5 dovecot: imap([email protected]): Logged out in=442 out=640
    May 9 23:53:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:35 server5 dovecot: imap([email protected]): Logged out in=70 out=633
    May 9 23:53:35 server5 postfix/smtpd[2055]: connect from localhost[127.0.0.1]
    May 9 23:53:35 server5 postfix/smtpd[2055]: 71DA02A18F2: client=localhost[127.0.0.1]
    May 9 23:53:35 server5 postfix/cleanup[2044]: 71DA02A18F2: message-id=<[email protected]$
    May 9 23:53:35 server5 postfix/qmgr[899]: 71DA02A18F2: from=<[email protected]>, size=1652, nrcpt=1 (queue activ$
    May 9 23:53:35 server5 amavis[1084]: (01084-01) Passed CLEAN {RelayedOutbound}, LOCAL [127.0.0.1] <[email protected]$
    May 9 23:53:35 server5 postfix/smtp[2049]: 6848F2A18E1: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024$
    May 9 23:53:35 server5 postfix/qmgr[899]: 6848F2A18E1: removed
    May 9 23:53:35 server5 postfix/smtp[2060]: connect to gmail-smtp-in.l.google.com[2607:f8b0:4003:c00::1a]:25: Netw$
    May 9 23:53:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:35 server5 dovecot: imap([email protected]): Logged out in=318 out=2519
    May 9 23:53:35 server5 dovecot: imap([email protected]): Logged out in=233 out=1026
    May 9 23:53:36 server5 postfix/smtp[2060]: 71DA02A18F2: to=<[email protected]>, relay=gmail-smtp-in.l.google.com$
    May 9 23:53:36 server5 postfix/cleanup[2044]: 055262A18F3: message-id=<[email protected]$
    May 9 23:53:36 server5 postfix/qmgr[899]: 055262A18F3: from=<>, size=4399, nrcpt=1 (queue active)
    May 9 23:53:36 server5 postfix/bounce[2067]: 71DA02A18F2: sender non-delivery notification: 055262A18F3
    May 9 23:53:36 server5 postfix/qmgr[899]: 71DA02A18F2: removed
    May 9 23:53:36 server5 dovecot: lda([email protected]): sieve: msgid=<[email protected]$
    May 9 23:53:36 server5 postfix/pipe[2069]: 055262A18F3: to=<[email protected]>, relay=dovecot, delay=0.06, delay$
    May 9 23:53:36 server5 postfix/qmgr[899]: 055262A18F3: removed
    May 9 23:53:38 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:53:38 server5 dovecot: imap([email protected]): Logged out in=318 out=3047
    May 9 23:54:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:54:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 9 23:55:02 server5 dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, li$
    May 9 23:55:02 server5 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, li$
    May 9 23:55:02 server5 postfix/smtpd[2185]: connect from localhost[127.0.0.1]
    May 9 23:55:02 server5 postfix/smtpd[2185]: lost connection after CONNECT from localhost[127.0.0.1]
    May 9 23:55:02 server5 postfix/smtpd[2185]: disconnect from localhost[127.0.0.1] commands=0/0
    May 9 23:55:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:55:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 9 23:56:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:56:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 9 23:57:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:57:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 9 23:58:35 server5 postfix/smtpd[2055]: timeout after END-OF-MESSAGE from localhost[127.0.0.1]
    May 9 23:58:35 server5 postfix/smtpd[2055]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 comm$
    May 9 23:58:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:58:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 9 23:59:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 9 23:59:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 10 00:00:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 10 00:00:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
    May 10 00:01:35 server5 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=12$
    May 10 00:01:35 server5 dovecot: imap([email protected]): Logged out in=119 out=1070
     
  3. Troy

    Troy New Member

    --> sudo systemctl status amavisd-new.service
    ● amavis.service - LSB: Starts amavisd-new mailfilter
    Loaded: loaded (/etc/init.d/amavis; generated; vendor preset: enabled)
    Active: active (running) since Thu 2019-05-09 23:42:53 UTC; 27min ago
    Docs: man:systemd-sysv-generator(8)
    Process: 412 ExecStart=/etc/init.d/amavis start (code=exited, status=0/SUCCESS)
    Tasks: 3 (limit: 7372)
    CGroup: /system.slice/amavis.service
    ├─ 988 /usr/sbin/amavisd-new (master)
    ├─1083 /usr/sbin/amavisd-new (virgin child)
    └─1084 /usr/sbin/amavisd-new (ch1-avail)

    May 09 23:42:53 server5.domain.com.com amavis[988]: No decoder for .jar
    May 09 23:42:53 server5.domain.com.com amavis[988]: No decoder for .lha
    May 09 23:42:53 server5.domain.com.com amavis[988]: No decoder for .lrz
    May 09 23:42:53 server5.domain.com.com amavis[988]: No decoder for .lz4
    May 09 23:42:53 server5.domain.com.com amavis[988]: No decoder for .swf
    May 09 23:42:53 server5.domain.com.com amavis[988]: Using primary internal av scanner code for ClamAV-clamd
    May 09 23:42:53 server5.domain.com.com amavis[988]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamsca
    May 09 23:42:53 server5.domain.com.com amavis[988]: Deleting db files __db.002,snmp.db,__db.001,nanny.db,__db.003
    May 09 23:42:53 server5.domain.com.com amavis[988]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
    May 09 23:53:35 server5.domain.com.com amavis[1084]: (01084-01) Passed CLEAN {RelayedOutbound}, LOCAL [127.0.0.1]
     
  4. Troy

    Troy New Member

    --> apt-cache policy spamassassin
    spamassassin:
    Installed: 3.4.2-1~deb9u1
    Candidate: 3.4.2-1~deb9u1
    Version table:
    *** 3.4.2-1~deb9u1 500
    500 http://ftp.us.debian.org/debian stretch/main amd64 Packages
    100 /var/lib/dpkg/status
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Looks like your server actually can send e-mails, but the receiving servers do not accept e-mails from your server. Like the log says:
    Verify the e-mail sending and receiving works within yours server by sending in Roundcube an e-mail to yourself, i.e. send to that same e-mail address you used to log in to Roundcube.
    Things to check:
    1. output of command hostname and hostname -f from your server
    2. check MX record for the sending domain, adapt this example
      Code:
      $ host howtoforge.com
      howtoforge.com has address 104.24.1.68
      howtoforge.com has address 104.24.0.68
      howtoforge.com has IPv6 address 2606:4700:20::6818:44
      howtoforge.com has IPv6 address 2606:4700:20::6818:144
      howtoforge.com mail is handled by 10 mail.howtoforge.com.
      MX host is what appers on the mail is handled by -line.
    3. Check again with host command:
      Code:
      $ host mail.howtoforge.com.
      mail.howtoforge.com has address 78.46.214.220
      [email protected] /home/tale
      $ host 78.46.214.220
      220.214.46.78.in-addr.arpa domain name pointer mail.ensign.de.
      
    4. Check using some website that does mail server checks, for example https://mxtoolbox.com/ the SPF etc. records are as they should.
     
  6. Troy

    Troy New Member

    That worked the spf did not generate correctly had I typo it was like this v==spf1 mx a ~all.

    Now I need to learn how make the DMARC already have the SPF and DKIM working.

    Thank you
     
  7. Troy

    Troy New Member

    Well that was easy to make a DMARC record used the generator on https://mxtoolbox.com/.

    Thanks again for the help!
     
  8. Troy

    Troy New Member

    DMARC QUESTION.png
    Above is the DMARC Check confused is there a error because of the red x on the top entry and stats no record found?
    what should the dns dmac text title be? (default._domainkey. _domainkeys)
    SPF and DKIM verified OK.
    If I email my self using roundcube the email marked as spam. I send email to a google email it goes to the spam folder.

    How do I keep the emails out of the spam folder is there a DMARC problem maybe?

    ***SPAM***Test MSG
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Your screenshot clearly reads "No DMARC record found".
    Read the mail.log to see why your server put the e-mail to spam. Also the mail itself may show spam score and such in headers.
    Google puts mails to spam for many reasons. Check with MXtoolbox if your mail server is blacklisted.
     
  10. Troy

    Troy New Member

  11. Troy

    Troy New Member

Share This Page