dovecot-2.3.7.2-1.1.mga7
postfix-3.4.5-1.mga7
mysql Ver 15.1 Distrib 10.3.20-MariaDB, for Linux (x86_64) using readline 5.1
After upgrading my server to Mageia 7, I was unable to get my mail server (local email on my LAN only with 2 users: root and madams) to work after restoring backup configs. I eventually decided to just rebuild the mail server. I went from postfix+cyrus+mysql to the postfix+dovecot+mysql solution.
Trouble is, I can't get it to work. I've been through a dozen or so tutorials and read everything I can find (and make sense of). I can use telnet to send mail, but it never shows up anywhere. I presented this issue to the postfix users' mailing list and they pointed at dovecot. I was prepared to send a help request to the dovecot folks, but I am not convinced that Postfix is working. I can send email with telnet with no error:
- Code: Select all
$ mail root@shuttle
Subject: testing
test
.
EOT
[madams@shuttle ~]$
My configuration is designed to use mbox mailboxes rather than Maildir. It's a small informal system and mbox has been fine for years now. I'm sticking with it. I can check my mbox with Webmin and the last mail that ran was on 12/22/19 despite the fact that I have 2 other machines sending admin messages to this server at least once a day. If my reading of that mbox file via Webmin is correct, nothing is appearing in those boxes.
Here is my postfix config:
- Code: Select all
# postconf -n
alias_database = hash:/etc/postfix/aliases.db
alias_maps = hash:/etc/postfix/aliases
biff = no
compatibility_level = 2
debug_peer_list = 127.0.0.1
inet_interfaces = all
mail_spool_directory = /var/spool/mail
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:private/dovecot-lmtp
mydestination = shuttle, localhost, localhost.localdomain
myhostname = shuttle.local
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $myhostname
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/adams-lan.mail.pem
smtpd_tls_key_file = /etc/ssl/private/adams-lan.mail.key
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_transport = lmtp:unix:private/dovecot-lmtp
There was some information about a lack of reference to transport maps, lmpt or any other dovecot information. I'm down to just following information I can find on the Internet. I haven't located anything particularly helpful. Same goes for dovecot. Here is my config on it:
- Code: Select all
# dovecot -n
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# OS: Linux 5.4.6-desktop-2.mga7 x86_64 Mageia 7
# Hostname: shuttle
disable_plaintext_auth = no
first_valid_uid = 10001
last_valid_uid = 10001
mail_gid = 10001
mail_location = mbox:~/:INBOX=/var/spool/mail/%u
mail_privileged_group = mail
mail_uid = 10001
passdb {
driver = pam
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
ssl_cert = </etc/pki/tls/certs/adams-lan.mail.pem
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
I know nothing about dovecot, so I'm just following advice on the internt.
All this is hampered by the fact that everything seems to test good as far as connectivity is concerned and the tutorials I'm finding don't really provide much troubleshooting beyond that. I can see that ports are open and listening:
- Code: Select all
PORT STATE SERVICE VERSION
25/tcp open smtp Postfix smtpd
110/tcp open pop3 Dovecot pop3d
143/tcp open imap Dovecot imapd
993/tcp open imaps?
995/tcp open pop3s?
Service Info: Host: shuttle.local
I can connect to those imap and pop3 ports (either telnet or openssl) locally on the server or remotely from my desktop, and authenticate on them without error. I can list folders and see that the folders I expect to be there are not.
- Code: Select all
$ telnet shuttle 143
Trying 192.168.1.105...
Connected to shuttle.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN] Dovecot ready.
a login madams xxxxxxxxxx
a OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY LITERAL+ NOTIFY] Logged in
I haven't figured out a way to read those files. the "mailx" command shows old messages when my user connects on the server, but from my desktop the mail command shows "no mail".
EDIT: I have found the imap commands that allows me to access mailbox contents. Old messages are there. Postfix is not delivering any new messages. I still think there is an issue with postfix.
The mail spools seem to be owned and permissioned correctly:
- Code: Select all
# ll /var/spool/mail
total 6128
-rw-rw---- 1 apache mail 284135 Dec 23 11:36 apache
-rw-rw---- 1 madams mail 5947463 Dec 26 11:30 madams
-rw-rw---- 1 postfix mail 23170 Dec 14 04:02 postfix
-rw-rw---- 1 root mail 4859 Dec 23 15:15 root
Does anybody have any suggestions as to how I can troubleshoot this? At this point, I'm not finding much help out there.
Thanks.
Mark