Need help with sending email

Hello everyone, I have two servers, one for email and one for my website(s). I’m trying to send email from a contact form on my website and not sure how to set up the server to send email. My email server for my business email addresses is working fine. Is it possible to connect my website form to my email server or should I set up email on the server hosting my website. I’m new to this so am a bit confused.

Here are the details:

Website Server:

UpCloud
OS: Ubuntu
CyberPanel
LiteSpeed Server

Email Server:

UpCloud
OS: Ubuntu
iredmail email server

I appreciate any help.

Be Well,

Tommy

Many web applications provide SMTP settings. Check your web application’s documentation to find where’s the SMTP settings.

In the SMTP setting, normally you need to enter

mail server address:   mail.example.com
username:              [email protected]
password:              your_password
port number:           587
Encryption:            STARTTLS (or SSL, TLS)

If your web application doesn’t have a SMTP setting, you can set up SMTP relay between the two servers with Postfix.
How to Set Up SMTP Relay Between 2 Postfix SMTP Servers on Ubuntu

It’s easier to use the web application’s built-in SMTP setting. If you use WordPress, you can install an SMTP plugin.

Thanks for your quick response! I followed your guide to set up the SMTP relay but am having no luck. Do you think CyberPanel is misconfigured in a way that could cause it to block the relay? I have not configured any of the DNS entries in CyberPanel. My registrar is Cloudflare and it points to both my website server as well as my email server and everything in that regard is working fine. I’m just not having any luck getting the email from my website server to be sent out.

These are the last 50 lines from my email log in CyberPanel:

Dec 10 13:29:58 localhost postfix/error[100976]: 99061DCDE2: to=[email protected], relay=none, delay=786, delays=786/0.06/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:33:24 localhost postfix/postfix-script[101169]: refreshing the Postfix mail system
Dec 10 13:33:24 localhost postfix/master[100870]: reload – version 3.4.13, configuration /etc/postfix
Dec 10 13:39:55 localhost dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=96.127.175.10, lip=209.50.50.115, session=<6wysTxy2xt9gf68K>
Dec 10 13:39:55 localhost dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=96.127.175.10, lip=209.50.50.115, TLS, session=<Ey+wTxy2DuFgf68K>
Dec 10 13:39:55 localhost dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=96.127.175.10, lip=209.50.50.115, TLS handshaking: SSL_accept() failed: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low, session=<VD+yTxy2g+Jgf68K>
Dec 10 13:39:56 localhost dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=96.127.175.10, lip=209.50.50.115, TLS handshaking: SSL_accept() failed: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol, session=
Dec 10 13:39:56 localhost dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=96.127.175.10, lip=209.50.50.115, TLS handshaking: SSL_accept() failed: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol, session=
Dec 10 13:39:56 localhost dovecot: imap-login: Error: Diffie-Hellman key exchange requested, but no DH parameters provided. Set ssh_dh=</path/to/dh.pem
Dec 10 13:39:56 localhost dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=96.127.175.10, lip=209.50.50.115, TLS handshaking: SSL_accept() failed: error:141EC044:SSL routines:tls_construct_server_key_exchange:internal error, session=<1Ha7Txy2LOVgf68K>
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 8C86FDC65A: from=<>, size=2571, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 84E96DC5D2: from=<>, size=4335, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 8AEAADC655: from=<>, size=3783, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9593DDCDD5: from=<>, size=4154, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 93B8DDCDC5: from=<>, size=4335, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9074CDCDC2: from=<>, size=4379, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 99CACDC58C: from=<>, size=2939, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9AEB5DC5CD: from=<>, size=3774, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 96835DCDDF: from=<>, size=4171, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 92137DC59D: from=<>, size=3771, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 976DDDCDE0: from=<>, size=4248, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9BD50DC58E: from=<>, size=4157, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9B610DC697: from=<>, size=3772, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9842FDCDE1: from=<>, size=4347, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 9A85BDCDE3: from=<>, size=4255, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/qmgr[101173]: 99061DCDE2: from=<>, size=3772, nrcpt=1 (queue active)
Dec 10 13:43:24 localhost postfix/smtp[101363]: warning: no MX host for mail.replogle.us has a valid address record
Dec 10 13:43:24 localhost postfix/smtp[101363]: warning: relayhost configuration problem
Dec 10 13:43:24 localhost postfix/smtp[101363]: 8C86FDC65A: to=[email protected], relay=none, delay=1592, delays=1592/0.02/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/smtp[101363]: warning: no MX host for mail.replogle.us has a valid address record
Dec 10 13:43:24 localhost postfix/smtp[101363]: warning: relayhost configuration problem
Dec 10 13:43:24 localhost postfix/smtp[101365]: warning: no MX host for mail.replogle.us has a valid address record
Dec 10 13:43:24 localhost postfix/smtp[101365]: warning: relayhost configuration problem
Dec 10 13:43:24 localhost postfix/smtp[101363]: 84E96DC5D2: to=[email protected], relay=none, delay=1592, delays=1592/0.02/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/smtp[101363]: warning: no MX host for mail.replogle.us has a valid address record
Dec 10 13:43:24 localhost postfix/smtp[101363]: warning: relayhost configuration problem
Dec 10 13:43:24 localhost postfix/smtp[101365]: 8AEAADC655: to=[email protected], relay=none, delay=1592, delays=1592/0.02/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/smtp[101363]: 9593DDCDD5: to=[email protected], relay=none, delay=1592, delays=1592/0.03/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 93B8DDCDC5: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 9074CDCDC2: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101370]: 9AEB5DC5CD: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 99CACDC58C: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101370]: 92137DC59D: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 96835DCDDF: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 9B610DC697: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101370]: 9BD50DC58E: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 9842FDCDE1: to=[email protected], relay=none, delay=1592, delays=1592/0.05/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101371]: 976DDDCDE0: to=[email protected], relay=none, delay=1592, delays=1592/0.04/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101369]: 99061DCDE2: to=[email protected], relay=none, delay=1592, delays=1592/0.05/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)
Dec 10 13:43:24 localhost postfix/error[101370]: 9A85BDCDE3: to=[email protected], relay=none, delay=1592, delays=1592/0.05/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mail.mail.replogle.us type=AAAA: Host not found)

Is there a quick way to test configuration changes in terminal…to see if the relay is working?

Thanks!!

You have a DNS resolution problem on your CyberPanel server. It can’t find the A record of mail.replogle.us. You can follow the tutorial below to set up a local BIND DNS resolver on the CyberPanel server.
Set Up Local DNS Resolver on Ubuntu 20.04 with BIND9

Thank you! Next day off I’ll see if I can figure it out. Thanks for your help!

1 Like