Postfix unable to send SMTP emails

Discussion in 'Installation/Configuration' started by Magiodev, Jan 4, 2019.

  1. Magiodev

    Magiodev New Member

    Hi guys, i've finally configured a good webserver following the Perfect Server tutorial for Debian 9, nginx variant.

    I'm testing PostfixvSMTP server by sending emails from Contact Form 7 plugin, in WordPress (one of the most common and used mailform on internet), the emails is sent to two recipients one [email protected] (received in Spam) and one [email protected] (not received as you can see below)

    And why is not set server2.magiodev.com instead of localhost.localdomain??

    I'm going crazy with the this last issue regarding the installation of Postfix server. Here the lgos. (i've changed all the email addresses to [email protected] in order to avoid spam on my personal mails)

    Thanks you all in advance for helping me

    Jan 4 20:54:18 server2 postfix/pickup[1204]: EC6E141C4C: uid=5006 from=<[email protected]>
    Jan 4 20:54:18 server2 postfix/cleanup[5539]: EC6E141C4C: message-id=<[email protected]>
    Jan 4 20:54:18 server2 postfix/qmgr[1205]: EC6E141C4C: from=<[email protected]>, size=910, nrcpt=2 (queue active)
    Jan 4 20:54:19 server2 postfix/smtpd[5546]: connect from localhost.localdomain[127.0.0.1]
    Jan 4 20:54:19 server2 postfix/smtpd[5546]: 4586141C49: client=localhost.localdomain[127.0.0.1]
    Jan 4 20:54:19 server2 postfix/cleanup[5539]: 4586141C49: message-id=<[email protected]>
    Jan 4 20:54:19 server2 postfix/qmgr[1205]: 4586141C49: from=<[email protected]>, size=1330, nrcpt=2 (queue active)
    Jan 4 20:54:19 server2 postfix/smtpd[5546]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 mail=1 rcpt=2 data=1 quit=1 commands=6
    Jan 4 20:54:19 server2 amavis[1569]: (01569-10) Passed CLEAN {RelayedOutbound}, LOCAL [127.0.0.1] <[email protected]> -> <[email protected]>,<[email protected]>, Message-ID: <[email protected]>, mail_id: SD4GPFj6pctc, Hits: 0, size: 910, queued_as: 4586141C49, 303 ms
    Jan 4 20:54:19 server2 postfix/smtp[5543]: EC6E141C4C: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.38, delays=0.05/0.01/0/0.31, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4586141C49)
    Jan 4 20:54:19 server2 postfix/smtp[5543]: EC6E141C4C: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.38, delays=0.05/0.01/0/0.31, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4586141C49)
    Jan 4 20:54:19 server2 postfix/qmgr[1205]: EC6E141C4C: removed
    Jan 4 20:54:19 server2 postfix/smtp[5548]: connect to ASPMX.L.GOOGLE.COM[2a00:1450:4013:c01::1b]:25: Network is unreachable
    Jan 4 20:54:19 server2 postfix/smtp[5547]: 4586141C49: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.128.27]:25, delay=0.53, delays=0.01/0.03/0.15/0.34, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[74.125.128.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. m22si3209710edj.434 - gsmtp (in reply to end of DATA command))
    Jan 4 20:54:20 server2 postfix/smtp[5548]: 4586141C49: to=<[email protected]>, relay=ASPMX.L.GOOGLE.COM[108.177.127.26]:25, delay=0.75, delays=0.01/0.04/0.21/0.49, dsn=2.0.0, status=sent (250 2.0.0 OK 1546631660 z7-v6si1007328eji.249 - gsmtp)
    Jan 4 20:54:20 server2 postfix/cleanup[5539]: 0893741C4F: message-id=<[email protected]>
    Jan 4 20:54:20 server2 postfix/qmgr[1205]: 0893741C4F: from=<>, size=4078, nrcpt=1 (queue active)
    Jan 4 20:54:20 server2 postfix/bounce[5549]: 4586141C49: sender non-delivery notification: 0893741C4F
    Jan 4 20:54:20 server2 postfix/qmgr[1205]: 4586141C49: removed
    Jan 4 20:54:20 server2 dovecot: lda([email protected]): sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    Jan 4 20:54:20 server2 postfix/pipe[5550]: 0893741C4F: to=<[email protected]>, relay=dovecot, delay=0.07, delays=0.01/0.01/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
    Jan 4 20:54:20 server2 postfix/qmgr[1205]: 0893741C4F: removed
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Because it has to be localhost.localdomain when you send over IP 127.0.0.1, that's absolutely ok.

    I use the exact Debian perfect server setups on several servers, all of them work out of the box, no mail issues on any of them. So the issues are not caused by the setup, just follow it to the letter to get a working server.

    So, when do such delivery problems occur:

    a) Server hostname is wrong or does not exist.
    b) Reverse DNS record is wrong or does not exist.
    c) No SPF record or wrong SPF record.
    d) Enable DKIM for that domain on your server

    And as google suggests, authenticate your email. For wordpress, you can do that e.g. with wp mail smtp: https://cool-tricks.net/contact-for...nd-all-emails-through-an-external-smtp-server
     
  3. Magiodev

    Magiodev New Member

    hostname respond server2
    hostname -f
    respond server2.magiodev.com
    /etc/mailname
    contains server2.magiodev.com
    /etc/postfix/main.cf
    contains [...]
    myhostname =
    server2.magiodev.com [...] mydestination = server2.magiodev.com, localhost.localdomain, localhost [..]


    No, i've not configured it. I manage my domain on namecheap and i'm not configured nothing in DNS zone module.
    No, no SPF records How can i do them?
    I've already verified domain and subdomains on postmaster.google.com as asked by error message but still receiving in spam on @magiodev.com and a mailer-daemon notification for [email protected]. Or do you mean SSL validation for my TLD domain magiodev.com? have i to ensure all subdomain or can i buy an authority issued certificate just for my top level?

    Yep i know about that, i'm using it for someone but i want to solve the issue globally, for all customers and all webs. I have many web apps that need an healthy SMTP server. Can't stay even there in paranoid that some clients can experience some related issue.

    Thanks for help!
     
    Last edited: Jan 4, 2019
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    That's not related to the dns module in ISPConfig. Talk with your server hoster and tell them to set the reverse DNS for your IP to point back to the server hostname if you did not do that already.

    I don't use namechep, so I can't tell you how to do that on their systems. ISPConfig has a generator for that, but you don't use ISPConfig DNS, so this will not help you. If Namecheap has no generator for SPF records, then you can search for spf generator on the internet, there are websites that can create the required TXT-Record for you which you then add at namecheap.

    DKIM is not SSL. DKIM is a method to digitally sign email messages, you generate the dkim record in ispconfig for the email domain and then you have to publis the record in your dns zone at namecheap.

    This cannot be solved globally as authentication has to happen for each mail user and website individually, so authentication is not a global setting. Just in case you need authentication. But if you have setup the other parts I listed correctly, then you probably don't need authentication anymore.
     
  5. Magiodev

    Magiodev New Member

    Sorry but how can i do if i want to manage the DNS Zone by ISPConfig? Am i obbligated to use Namecheap DNS zone?
    My domain register is Namecheap and my VPS provider is DigitalOcean. According to this DigitalOcean tutorial i can point my domain DNS to ns1.digitalocean.com, ns2,digitalocean.com, ns3.digitalocean.com and then manage the zone from digitalocean's panel.
    Is that useful in order to manage DNS zone by ISPConfig?

    I don't understand how to set domain between vps properly and where to create the DNS zone. So i can't set SPF, MKDIR and a PTR for reverse.

    Sorry but i really don't know too much about DNSs.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. Magiodev

    Magiodev New Member

    Attached Files:

Share This Page