My server is Ubuntu 22.04.4 LTS with apache2 version 2.4.52 and the hosting is digitalocean. I had to set up email with postfix, dovecot and roundcube.dovecot -n:
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf# Pigeonhole version 0.5.16 (09c29328)doveconf: Warning: /etc/dovecot/conf.d/20-lmtp.conf line 43: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/conf.d/20-imap.conf line 94 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/conf.d/20-imap.conf line 94)doveconf: Warning: /etc/dovecot/dovecot.conf line 116: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/conf.d/20-imap.conf line 94 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/conf.d/20-imap.conf line 94)doveconf: Warning: /etc/dovecot/conf.d/20-lmtp.conf line 43: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/conf.d/20-imap.conf line 94 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/conf.d/20-imap.conf line 94)doveconf: Warning: /etc/dovecot/dovecot.conf line 116: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/conf.d/20-imap.conf line 94 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/conf.d/20-imap.conf line 94)# OS: Linux 5.15.0-112-generic x86_64 Ubuntu 22.04.4 LTS ext4# Hostname: example.comauth_debug = yesauth_debug_passwords = yesauth_mechanisms = plain loginauth_verbose = yesauth_verbose_passwords = plaindebug_log_path = /var/log/dovecot-debug.loginfo_log_path = /var/log/dovecot-info.loglog_path = /var/log/dovecot.logmail_debug = yesmail_gid = vmailmail_home = /var/mail/vhostsmail_location = mdbox:/var/mail/vhosts/%d/%nmail_plugins = " fts fts_squat fts fts_squat fts fts_squat"mail_uid = vmailmanagesieve_notify_capability = mailtomanagesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttextmbox_md5 = allnamespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator =}namespace storage { hidden = no list = yes location = mbox:/var/mail/vhosts/%d/%n/storage prefix = Storage/}passdb { driver = pam}passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/dovecot-users driver = passwd-file}plugin { acl = vfile:/tmp/global-acls:cache_secs=5 fts = squat fts_autoindex = yes fts_squat = partial=4 full=10 fts_squat_save = /var/cache/dovecot fts_squat_save_on_rotate = yes mail_plugins = " fts fts_squat quota" quota = maildir:User quota quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M sieve = /etc/dovecot/sieve/spam_filter.sieve sieve_before = /mailhomes/sieve/global/SpamToJunk.sieve sieve_dir = ~/sieve sieve_global_dir = /var/lib/dovecot/sieve/ sieve_global_path = /var/lib/dovecot/sieve/default.sieve sieve_max_actions = 32 sieve_max_redirects = 4 sieve_max_script_size = 1M sieve_quota_max_scripts = 20 sieve_quota_max_storage = 10M sieve_redirect_envelope_from = sender zlib_save = bz2 zlib_save_level = 6}protocols = imap pop3 sieveservice auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail }}service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes }}service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = vmail mode = 0600 user = vmail }}service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes }}ssl = requiredssl_cert = </etc/letsencrypt/live/itar.ngo/fullchain.pemssl_cipher_list = HIGH:!aNULL:!MD5ssl_client_ca_dir = /etc/ssl/certsssl_dh = # hidden, use -P to show itssl_key = # hidden, use -P to show ituserdb { driver = passwd}userdb { args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n/mailboxes driver = static}protocol lmtp { mail_plugins = " fts fts_squat sieve" postmaster_address = admin@example.com}protocol imap { mail_plugins = " fts fts_squat imap_quota quota" }
etc/postfix/main.cf:
smtpd_banner = $myhostname ESMTP $mail_namebiff = noappend_dot_mydomain = noreadme_directory = no# SMTP SETTINGSsmtp_use_tls=yessmtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache# SMTPD SETTINGSsmtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scachesmtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination# SASL SETTINGSsmtp_sasl_auth_enable = yessmtp_sasl_security_options = noanonymoussmtp_sasl_password_maps = hash:/etc/postfix/sasl_passwdsmtp_tls_security_level = maysmtpd_tls_auth_only=yessmtpd_use_tls=yessmtp_tls_loglevel = 1smtpd_tls_CAfile = /etc/letsencrypt/live/example.com/fullchain.pemsmtpd_tls_cert_file = /etc/letsencrypt/live/example.com/cert.pemsmtpd_tls_key_file = /etc/letsencrypt/live/example.com/privkey.pem# VIRTUAL MAIL BOX AND LMTP SETTINGSvirtual_transport = lmtp:unix:private/dovecot-lmtpsmtpd_sasl_auth_enable = yesbroken_sasl_auth_clients = yessmtpd_sasl_authenticated_header = yes#smtpd_restriction_classes = greylistingvirtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains# Enable ports 465 and 587smtpd_tls_wrappermode=yessmtpd_tls_security_level=encrypt# OTHER SETTINGSmyhostname = example.commydomain = example.commyorigin = example.commydestination = localhost.$mydomain, exmaple.com, localhostrelayhost =[smtp.office365.com]:587mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128recipient_delimiter = +inet_interfaces = allinet_protocols = allalias_maps = hash:/etc/aliasesalias_database = hash:/etc/aliaseshome_mailbox=/var/mail/mail_spool_directory = /var/spool/mailappend_at_myorigin = yescommand_directory = /usr/sbindata_directory = /var/lib/postfixdebugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_na>mailbox_size_limit = 204800000mailq_path = /usr/bin/mailqmanpage_directory = /usr/share/manmaximal_queue_lifetime = 30dmessage_size_limit = 102400000meta_directory = /etc/postfixsmtpd_client_message_rate_limit = 100maildrop_destination_concurrency_limit = 1maildrop_destination_recipient_limit = 1smtpd_helo_required = yessmtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc>header_checks = regexp:/etc/postfix/header_checksmime_header_checks = regexp:/etc/postfix/mime_header_checksnested_header_checks = regexp:/etc/postfix/nested_header_checksbody_checks = regexp:/etc/postfix/body_checksowner_request_special = nosmtpd_tls_mandatory_protocols = !SSLv2, !SSLv3smtpd_tls_protocols = !SSLv2,!SSLv3smtp_tls_protocols = !SSLv2,!SSLv3dovecot_destination_recipient_limit = 1smtpd_sasl_type = dovecotsmtpd_sasl_path = private/authcontent_filter = smtp:[127.0.0.1]:10024receive_override_options = no_address_mappings#recipient_canonical_maps = hash:/etc/postfix/recipient_canonical_mapsrecipient_delimiter = +smtpd_sasl_path = private/auth#tls_random_source = dev:/dev/urandom#unknown_local_recipient_reject_code = 550#unverified_sender_remime_header_checks = regexp:/etc/postfix/mime_header_checksject_code = 550mime_header_checks = regexp:/etc/postfix/mime_header_checks
everything is working except when I try to open an email it shows the email headers and body like this:email header:
and this is the email body:Email body
Those data was copied by me using rsync from the previous cpanel server in a2hosting. When I open the email and the error I pasted above shown then the email subject disappearsHow could I solve this issue around 2 days I have spent trying everything and nothing worked.