I’ve installed Postfix+Dovecot on my Ubuntu Server 22.04 (VMware Workstation 16 virtual machine). Then I’ve deployed the Ubuntu 22.04 Desktop and started to create a new mailbox in Geary. But it said “Account not created: check your sending server details”.
And I can see some interesting entries in /var/log/mail.log
.
Jan 19 16:40:17 mailserver dovecot: imap-login: Disconnected: Connection closed (auth failed, 1 attempts in 4 secs): user=<obfuscated>, method=PLAIN, rip=192.168.0.220, lip=192.168.0.212, session=<JX+MEp7ymNTAqADc>
Server name is mailserver.example.com
.
User mail: [email protected]
SSL/TLS: no.
/etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_location = maildir:~/Maildir
mail_privileged_group = mail
/etc/dovecot/dovecot.conf
protocols = imap lmtp
10-master.conf
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0600
user = postfix
group = postfix
}
}
ervice auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
}
/etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_username_format = %n
auth_mechanisms = plain login
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
readme_directory = no
compatibility_level = 3.6
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mailserver.tne.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, example.com, mailserver.example.com, localhost.example.com, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
message_size_limit = 52428800
mailbox_transport = lmtp:unix:private/dovecot-lmtp
smtputf8_enable = no
Here is the nmap result for the mailserver
.
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp closed pop3
143/tcp open imap
443/tcp closed https
465/tcp closed smtps
587/tcp open submission
993/tcp closed imaps
995/tcp closed pop3s
I think I should add information about users, but I don’t know in which file.