Closed ShweetsStuff closed 1 year ago
/var/log/mail.err
and journalctl -xeu postfix.service
may be useful
cat /var/log/mail.err
:
Jul 7 01:59:04 [my hostname] spamd[7014]: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (you may need to install the Mail::SpamAssassin::CompiledRegexps::body_0
4006/auto /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/lib/x86_64-linux-gnu/
1.
Jul 7 01:59:06 [my hostname] dovecot: master: Fatal: service(imap) access(/usr/lib/dovecot/imap) failed: No such file or directory
Jul 7 01:59:36 [my hostname] dovecot: master: Fatal: service(imap) access(/usr/lib/dovecot/imap) failed: No such file or directory
Jul 7 02:01:34 [my hostname] spamd[16102]: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (you may need to install the Mail::SpamAssassin::CompiledRegexps::body_
04006/auto /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/lib/x86_64-linux-gnu
e 1.
Jul 7 02:01:36 [my hostname] spamd[16143]: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (you may need to install the Mail::SpamAssassin::CompiledRegexps::body_
04006/auto /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/lib/x86_64-linux-gnu
e 1.
Jul 7 02:20:09 [my hostname] opendkim[17545]: can't load key from /etc/postfix/dkim/mail.private: No such file or directory
Jul 7 02:20:09 [my hostname] opendkim[17545]: 7F1C6BC2: error loading key 'mail._domainkey.[my domain name]'
Jul 7 02:20:13 [my hostname] opendkim[17545]: can't load key from /etc/postfix/dkim/mail.private: No such file or directory
Jul 7 02:20:13 [my hostname] opendkim[17545]: 6BE7CBC2: error loading key 'mail._domainkey.[my domain name]
Not sure what the OpenDKIM stuff or the spamassassin stuff is about...
journalctl -xeu postfix.service
:
Jul 07 01:32:18 [my host name] systemd[1]: Starting Postfix Mail Transport Agent...
░░ Subject: A start job for unit postfix.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit postfix.service has begun execution.
░░
░░ The job identifier is 7016.
Jul 07 01:32:18 [my host name] systemd[1]: Finished Postfix Mail Transport Agent.
░░ Subject: A start job for unit postfix.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit postfix.service has finished successfully.
░░
░░ The job identifier is 7016.
Just sort of immediately starts and finishes, which I'm not sure.
On Thunderbird, SMTP port is set to 465.
On Fri Jul 7, 2023 at 2:24 AM UTC, Shweet wrote:
cat /var/log/mail.err
:Jul 7 01:59:04 [my hostname] spamd[7014]: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (you may need to install the Mail::SpamAssassin::CompiledRegexps::body_0 4006/auto /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/lib/x86_64-linux-gnu/ 1. Jul 7 01:59:06 [my hostname] dovecot: master: Fatal: service(imap) access(/usr/lib/dovecot/imap) failed: No such file or directory Jul 7 01:59:36 [my hostname] dovecot: master: Fatal: service(imap) access(/usr/lib/dovecot/imap) failed: No such file or directory Jul 7 02:01:34 [my hostname] spamd[16102]: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (you may need to install the Mail::SpamAssassin::CompiledRegexps::body_ 04006/auto /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/lib/x86_64-linux-gnu e 1. Jul 7 02:01:36 [my hostname] spamd[16143]: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (you may need to install the Mail::SpamAssassin::CompiledRegexps::body_ 04006/auto /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/lib/x86_64-linux-gnu e 1. Jul 7 02:20:09 [my hostname] opendkim[17545]: can't load key from /etc/postfix/dkim/mail.private: No such file or directory Jul 7 02:20:09 [my hostname] opendkim[17545]: 7F1C6BC2: error loading key 'mail._domainkey.[my domain name]' Jul 7 02:20:13 [my hostname] opendkim[17545]: can't load key from /etc/postfix/dkim/mail.private: No such file or directory Jul 7 02:20:13 [my hostname] opendkim[17545]: 6BE7CBC2: error loading key 'mail._domainkey.[my domain name]
Your installation looks very broken. You may want to purge opendkim, spamassassin/spamd, postfix, and dovecot, along with all their configuration files, and reinstall with emailwiz. (Additionally, if you are planning to switch to Debian 12 bookworm, or if you're already on Bookworm, you may want to use this pull request too.
Not sure what the OpenDKIM stuff or the spamassassin stuff is about...
Don't know, seems that you have missing configuration files. See above.
On Thunderbird, SMTP port is set to 465.
I am unsure how this works, but my setup doesn't work with port 465 (with TLS) either. When using external SMTP clients, I use port 587 with STARTTLS.
The following is an example MSMTP configuration that works for me as I do not use Thunderbird:
account ***@***.***
host mail.example.org
port 587
from ***@***.***
user ***@***.***
passwordeval "pass ***@***.***"
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
Hope this helps.
Purged (apt purge
):
opendkim
postfix
dovecot-imapd
dovecot-sieve
opendkim
spamassassin
spamc
opendkim-tools
Removed (rm -rf
):
/etc/postfix
/etc/opendkim
/etc/spamassassin
/etc/dovecot
Ran emailwiz.sh.
Copied information from ~/dns_emailwizard to my MX records, verbatim.
Tested 465. Hangs on "Sending message..." until eventually erroring out.
Tested 587. Immediately throws this error:
Sending of the message failed. An error occurred while sending mail. The mail server responded: Service unavailable - try again later. Please check the message and try again.
Emailing to just a gmail account, nothing more.
Currently sticking with Debian 11, as it stands.
I think it'd be useful to have an uninstall script for retards like me, tbh. I've "reinstalled" multiple times by 1) purging all the packages, and 2) hunting down all the files I can with "postfix", "spamassassin", "dovecot", etc. and deleting them, but maybe I'm just not being comprehensive enough.
spamd
and opendkim
Ultimately, this just seems like an issue with my server - it's currently got Debian 11 and the new hotness is 12, with this script being updated for it. I'll save everyone some headaches on this issue and just reinstall everything, as much as a burden as that is; that will probably solve the problem.
Thunderbird:
Sending of the message failed. The message could not be sent because connecting to Outgoing server (SMTP) mail.[my domain] failed. The server may be unavailable or is refusing SMTP connections. Please verify that your Outgoing server (SMTP) settings are correct and try again.
Port 25 isn't blocked. Asked Vultr to unblock it many moons ago, and testing it just as proof:
I figure the issue may be with Postfix, as the status says "active (exited)":
Receiving email works totally fine. Suddenly had this issue after months of using the email just fine. Any ideas? Might also be something with OpenDKIM, not sure.