Postfix and Email — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberLoader

Postfix and Email

So my main issue is, the ports won't connect through telnet. They're definitelly allowed through the firewall. But they just aren't "Listening". So I've been troubleshooting, then i noticed in postfix (when i restart it)
I keep getting an error: (Line 60 which is this line)

smtpd_tls_chain_files =
/etc/letsencrypt/live/mail.DOMAIN.TLD/privkey.pem,
/etc/letsencrypt/live/mail.DOMAIN.TLD/fullchain.pem

Error:
postfix: fatal: /etc/postfix/main.cf, line 60: missing '=' after attribute name: "/etc/letsencrypt/live/mail.DOMAIN.TLD/privkey.pem,"


MY MAIN.CF FILE (POSTFIX) - (bottom half of it)
========================
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
# smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
# smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
smtpd_tls_chain_files =
/etc/letsencrypt/live/mail.DOMAIN.TLD/privkey.pem,
/etc/letsencrypt/live/mail.DOMAIN.TLD/fullchain.pem


virtual_create_maildirsize = yes
virtual_maildir_extended = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_>
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
inet_interfaces = all
smtp_tls_security_level = may

smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept

tls_server_sni_maps = hash:/etc/postfix/vmail_ssl.map
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587
=======================

(FYI) Yes, I have sendgrid setup too. I can't remove it, till i get local email up and running.

Obviously DOMAIN.TLD is replaced my actual domain.

Thank you.

Comments

  • Please use this guide for troubleshooting -> https://cyberpanel.net/docs/troubleshooting-cyberpanel/
  • Hey Usman,

    Thank you for replying, i dont like bothering you directly since you're probably swamped with requests lol.

    I actually already did that, and that was the error I was getting but here is a direct copy/paste of the log that grep gets me.

    May 30 19:09:33 DOMAIN.TLD postfix/smtpd[32609]: fatal: /etc/postfix/main.cf, line 60: missing '=' after attribute name: "/etc/letsencrypt/live/mail.DOMAIN.TLD/privkey.pem,"
    May 30 19:09:34 DOMAIN.TLD postfix/master[23446]: warning: process /usr/lib/postfix/sbin/smtpd pid 32609 exit status 1
    May 30 19:09:34 DOMAIN.TLD postfix/master[23446]: warning: /usr/lib/postfix/sbin/smtpd: bad command startup -- throttling
    May 30 19:09:41 DOMAIN.TLD postfix/smtpd[32612]: fatal: /etc/postfix/main.cf, line 60: missing '=' after attribute name: "/etc/letsencrypt/live/mail.DOMAIN.TLD/privkey.pem,"
    May 30 19:09:42 DOMAIN.TLD postfix/master[23446]: warning: process /usr/lib/postfix/sbin/smtpd pid 32612 exit status 1
    May 30 19:09:42 DOMAIN.TLD postfix/master[23446]: warning: /usr/lib/postfix/sbin/smtpd: bad command startup -- throttling

    That extra = attribute.. i just don't get it. I tried adding it just to shut it up, then it completely fails of course.
  • Looks like malformed configs. I would recommend to go with one of our partner (for at least first few months), once you know how things work you can then shift to doing things on your own.

    https://cyberpanel.net (scroll down to bottom)

    Go to bottom of our site and there are various super affordable partners offering managed and semi managed services.
  • Hey @usmannasir
    i have issue with email it cant receive email

    this is the result from journalctl -f | grep postfix

    Jun 02 14:47:04 pplayy.com postfix/qmgr[692500]: C14F51613B9: removed
    Jun 02 14:47:05 pplayy.com postfix/smtpd[693269]: connect from localhost[127.0.0.1]
    Jun 02 14:47:05 pplayy.com postfix/smtpd[693269]: 0DFD51613B9: client=localhost[127.0.0.1]
    Jun 02 14:47:05 pplayy.com postfix/smtpd[693269]: warning: connect to /var/log/policyServerSocket: No such file or directory
    Jun 02 14:47:06 pplayy.com postfix/smtpd[693269]: warning: connect to /var/log/policyServerSocket: No such file or directory
    Jun 02 14:47:06 pplayy.com postfix/smtpd[693269]: warning: problem talking to server /var/log/policyServerSocket: No such file or directory
    Jun 02 14:47:06 pplayy.com postfix/cleanup[693274]: 0DFD51613B9: message-id=<[email protected]>
    Jun 02 14:47:06 pplayy.com postfix/qmgr[692500]: 0DFD51613B9: from=<[email protected]>, size=20463, nrcpt=1 (queue active)
    Jun 02 14:47:06 pplayy.com postfix/smtpd[693269]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
    Jun 02 14:47:06 pplayy.com postfix/pipe[693275]: B3E8E1613F0: to=<[email protected]>, relay=spamassassin, delay=2.4, delays=1.1/0/0/1.3, dsn=2.0.0, status=sent (delivered via spamassassin service)
    Jun 02 14:47:06 pplayy.com postfix/qmgr[692500]: B3E8E1613F0: removed
    Jun 02 14:47:06 pplayy.com postfix/smtpd[693269]: connect from localhost[127.0.0.1]
    Jun 02 14:47:06 pplayy.com postfix/smtpd[693269]: 4BBC01613F0: client=localhost[127.0.0.1]
    Jun 02 14:47:06 pplayy.com postfix/smtpd[693269]: warning: connect to /var/log/policyServerSocket: No such file or directory
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: warning: connect to /var/log/policyServerSocket: No such file or directory
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: warning: problem talking to server /var/log/policyServerSocket: No such file or directory
    Jun 02 14:47:07 pplayy.com postfix/cleanup[693274]: 4BBC01613F0: message-id=<[email protected]>
    Jun 02 14:47:07 pplayy.com postfix/qmgr[692500]: 4BBC01613F0: from=<[email protected]>, size=21313, nrcpt=1 (queue active)
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
    Jun 02 14:47:07 pplayy.com postfix/pipe[693279]: 0DFD51613B9: to=<[email protected]>, relay=spamassassin, delay=2.4, delays=1.1/0/0/1.3, dsn=2.0.0, status=sent (delivered via spamassassin service)
    Jun 02 14:47:07 pplayy.com postfix/qmgr[692500]: 0DFD51613B9: removed
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: connect from localhost[127.0.0.1]
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<> to=<[email protected]> proto=ESMTP helo=<pplayy.com>
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<> to=<[email protected]> proto=ESMTP helo=<pplayy.com>
    Jun 02 14:47:07 pplayy.com postfix/smtpd[693269]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 mail=2 rcpt=0/2 data=0/2 rset=3 quit=1 commands=9/13
    Jun 02 14:47:07 pplayy.com postfix/pipe[693275]: 4BBC01613F0: to=<[email protected]>, relay=spamassassin, delay=1.3, delays=1.1/0/0/0.2, dsn=5.3.0, status=bounced (service unavailable)
    Jun 02 14:47:07 pplayy.com postfix/cleanup[693274]: A0E8A1613F6: message-id=<[email protected]>
    Jun 02 14:47:07 pplayy.com postfix/bounce[693317]: 4BBC01613F0: sender non-delivery notification: A0E8A1613F6
    Jun 02 14:47:07 pplayy.com postfix/qmgr[692500]: 4BBC01613F0: removed
    Jun 02 14:47:07 pplayy.com postfix/qmgr[692500]: A0E8A1613F6: from=<>, size=23542, nrcpt=1 (queue active)
    Jun 02 14:47:07 pplayy.com postfix/pipe[693357]: A0E8A1613F6: to=<[email protected]>, relay=dovecot, delay=0.05, delays=0/0.01/0/0.04, dsn=5.1.1, status=bounced (user unknown)
    Jun 02 14:47:07 pplayy.com postfix/qmgr[692500]: A0E8A1613F6: removed

    can you help me please?
  • For receiving please check if MX records are properly set.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!