Emails not working on the server

My server is working fine except emails, I am not able to get emails working, not able to receive. I understand sending requires more things than receiving. It never worked since I installed the server few months back. Just didn’t get time to climb the learning curve of ApisCP.

I have setup mailbox, able to login to webmail(I use Roundcube). but emails are not received. When I send from my other server, emails bounces back and never delivered.

When I login to roundcube, I see error popup in bottom right saying, Internal error occured, check server log for more details. Where should I check log?

Not sure where to start to fix this. Any help is appreciated.

Make sure your server is properly configured for outbound emails. Some providers do not allow traffic on port 25, you usually have to submit a request for it to be allowed.

Then, check maillog and see what’s the reason of those bounced mails: https://docs.apiscp.com/DEBUGGING/#log-locations

What’s the bounceback? The more information provided the quicker a turnaround is. There’s too many possibilities to list without a copy of the reject notice.

It could be:

  • Bad A record
  • Missing MX
  • Firewall restrictions
  • Domain unconfigured to handle mail on server
  • Email address unprovisioned on server
  • Bad mailfilter rules
  • Z̸̛̛̘̰̞͍̻̍̓̂̿̑͒͆́̚̕̚̕͜͠ả̸̡͈͈̘̝̰̼͊̾̓̋ļ̶̧̡̡̛͓͍̖̣̮̦͖̯̙͗͋͂͌̿̀̏͛̀͊͑̾́̀ǵ̴͔͍̍̚o̴̧̨̦̣̮̜͔͙͐̕

Providing the rejection helps isolate which specific issue to focus on :+1:

When I try to send email I get error SMTP Error(550): Failed to add recipient…

Here’s the maillog.

A record is good as the website works fine. MX is also added to this. I have opened port 25 on Firewall. Domain is configure on the server to handle mails for this domain.

Please let me know what else can help in figuring out. Thanks

It allows only 1 image in post…here’s more logs

Run yum clean all ; yum reinstall -y dovecot. Linked back to the Dovecot hotfix. Snarf is no longer available in Dovecot 2.3.

For 550 errors, the address in the RCPT TO header is not present in Mail > Manage Mailboxes for that domain.

Not able to upgrade to 2.3, what command would help in below case? Thanks

Error:
Problem: cannot install both dovecot-2:2.3.17.1-3.apnscp.x86_64 and dovecot-2:2.2.36-12.apnscp.x86_64 conflicting requests
(try to add ‘–allowerasing’ to command line to replace conflicting packages or ‘–skip-broken’ to skip uninstallable packages)
[root@webserver ~]# yum reinstall -y --allowerasing dovecot
Last metadata expiration check: 0:00:53 ago on Thu 10 Mar 2022 10:55:04 AM MST.
Error:
Problem: cannot install both dovecot-2:2.3.17.1-3.apnscp.x86_64 and dovecot-2:2.2.36-12.apnscp.x86_64 conflicting requests
(try to add ‘–skip-broken’ to skip uninstallable packages)
[root@webserver ~]# yum reinstall --skip-broken -y dovecot
Last metadata expiration check: 0:02:18 ago on Thu 10 Mar 2022 10:55:04 AM MST.
Error:
Problem: cannot install both dovecot-2:2.3.17.1-3.apnscp.x86_64 and dovecot-2:2.2.36-12.apnscp.x86_64 conflicting requests
(try to add ‘–allowerasing’ to command line to replace conflicting packages)

rpm -qa | grep dovecot | xargs rpm -e
yum install -y dovecot dovecot23-apnscp dovecot-pigeonhole
# Give the platform a full scrub to make sure everything is OK
upcp -sb

upcp -sb ended with following:
RUNNING HANDLER [common : Restart dovecot] *************************************
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Unable to restart service dovecot: Job for dovecot.service failed because the control process exited with error code.\nSee “systemctl status dovecot.service” and “journalctl -xe” for details.\n”}

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
localhost : ok=1008 changed=46 unreachable=0 failed=1 skipped=530 rescued=0 ignored=0

[root@webserver ~]# systemctl status dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/dovecot.service.d
└─override.conf
Active: failed (Result: exit-code) since Thu 2022-03-10 13:34:35 MST; 1min 35s ago
Docs: man:dovecot(1)
https://doc.dovecot.org/
Process: 540383 ExecStop=/usr/bin/doveadm stop (code=exited, status=127)
Process: 12116 ExecStart=/usr/sbin/dovecot -F (code=exited, status=0/SUCCESS)
Process: 543609 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=203/EXEC)
Main PID: 12116 (code=exited, status=0/SUCCESS)

Mar 10 13:34:35 webserver.networkdevices.ca systemd[1]: Starting Dovecot IMAP/POP3 email server…
Mar 10 13:34:35 webserver.networkdevices.ca systemd[1]: dovecot.service: Control process exited, code=exited status=203
Mar 10 13:34:35 webserver.networkdevices.ca systemd[1]: dovecot.service: Failed with result ‘exit-code’.
Mar 10 13:34:35 webserver.networkdevices.ca systemd[1]: Failed to start Dovecot IMAP/POP3 email server.

This isn’t easy it seems, what’s next?
Thanks

What about the first two commands? Also, check dovecot logs to see why is it failing…

grep dovecot /var/log/maillog | tail -n 20

@anatoli other two commands didn’t give any error.

@msaladna output from the command
[root@webserver ~]# grep dovecot /var/log/maillog | tail -n 20
Mar 10 12:38:49 webserver dovecot[12119]: config: Warning: NOTE: You can get a n ew clean config file with: doveconf -Pn > dovecot-new.conf
Mar 10 12:38:49 webserver dovecot[12119]: config: Warning: Obsolete setting in / etc/dovecot/conf.d/apnscp.conf:29: ssl_protocols has been replaced by ssl_min_pr otocol
Mar 10 12:40:50 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<LMUwZOLZUMN/AAAB>
Mar 10 12:42:50 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<Wapba+LZUMN/AAAB>
Mar 10 12:44:50 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<IIeIcuLZ5Nl/AAAB>
Mar 10 12:46:51 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<Flm3eeLZ7NB/AAAB>
Mar 10 12:48:51 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<x83lgOLZUMN/AAAB>
Mar 10 12:50:52 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<QSoQiOLZUMN/AAAB>
Mar 10 12:52:52 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<R186j+LZUMN/AAAB>
Mar 10 12:54:52 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<C1tnluLZUMN/AAAB>
Mar 10 12:56:53 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<KnOSneLZUMN/AAAB>
Mar 10 12:58:53 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<ZdW8pOLZUMN/AAAB>
Mar 10 12:58:58 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<TM0SpeLZUMN/AAAB>
Mar 10 13:00:59 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<ifw8rOLZUMN/AAAB>
Mar 10 13:02:59 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<i5Zps+LZUMN/AAAB>
Mar 10 13:04:59 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<B/qWuuLZUMN/AAAB>
Mar 10 13:07:00 webserver dovecot[12119]: imap-login: Disconnected: Aborted logi n by logging out (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0 .0.1, session=<yKrBweLZUMN/AAAB>
Mar 10 13:08:44 webserver dovecot[12119]: log(12119): Warning: Killed with signa l 15 (by pid=1 uid=0 code=kill)
Mar 10 13:08:44 webserver dovecot[12119]: log(12119): Warning: Shutting down log ging for 'config: ’ with 2 clients
Mar 10 13:08:44 webserver dovecot[12116]: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)

You need to be on the latest release of ApisCP (run upcp). ssl_protocols/ssl_min_protocol was introduced 11 months ago.

dovecot_version gets set from the command output in rpm -q --queryformat="%{VERSION}" dovecot. This would be 2.3.17.1 after removing all previous packages. Likewise the Dovecot package, when installed, will run the following commands:

[[ -f /etc/sysconfig/apnscp ]] && . /etc/sysconfig/apnscp
cd "${APNSCP_ROOT:-/usr/local/apnscp}/resources/playbooks"
rm -f storage/run/.ansible.lock
ansible-playbook bootstrap.yml --tags=mail/configure-dovecot --extra-vars="dovecot_version=2.3.17.1 yum_transaction_hook=update bootstrapper_acquire_lock=false"

This updates /etc/dovecot/conf.d/apnscp.conf, so that message wouldn’t appear in maillog.

You may also try running /usr/libexec/dovecot/prestartscript directly to see what it reports.

Is there a way to release the license key?

I think I will fresh install the server, it was installed a while back and was shutdown for few months end of 2021. I know a bit more things now than when I installed first. I knew it’s hard to get all things perfect first time, so, I planned this server for trial. I only have development sites on this and all is backed up.

But now I think I can reinstall and make it ready to be suitable for live sites.

Thanks for all your efforts to help.

Licenses may be revoked via my.apiscp.com.