0

I'm trying to rebuild a debian based internet mail server running Postfix + Dovecot using mysql as a virtual mailbox backend. The server turned into confetti after an update broke a lot of things.

Currently, I'm able to send email from mutt and squirrelmail from the server to a gmail address. There are no errors reported, and I can see the email I sent from both in my gmail. When I send from gmail to my server, I never see the email using either mutt or squirrel.

I can also send emails from mutt/squirrel on the server to another virtual mailbox on the server. No errors reported during sending. Again, I never see the email show up in my inbox.

I cd'd over to the path where my Inbox email files are stored. For my setup, the path is hwsrv-890039:/var/vmail/nostalgicmail.com/brad/Maildir/cur and I don't see the email there. I see existing emails that I haven't deleted or moved yet. The email isn't in ../new either.

I rebooted the server as a last ditch effort that maybe something is cached, or service not restarted. I wanted to rule out any possibility of "staleness" somewhere.

I'm confused as to how to troubleshoot further or what's causing it. I do see a postfix/lmtp Connection refused message. Logs and configs posted below.

/var/log/syslog

Feb  6 23:02:16 hwsrv-890039 systemd[1857]: Reached target Main User Target.
Feb  6 23:02:16 hwsrv-890039 systemd[1857]: Startup finished in 141ms.
(END)

/var/log/postfix.log

Feb 06 23:04:03 hwsrv-890039 postfix/smtpd[1893]: connect from mail-qv1-f41.google.com[209.85.219.41]
Feb 06 23:04:03 hwsrv-890039 postfix/smtpd[1893]: A473025245: client=mail-qv1-f41.google.com[209.85.219.41]
Feb 06 23:04:03 hwsrv-890039 postfix/cleanup[1900]: A473025245: message-id=<CA+BfPHTAmE3bS4a9eftnwooS+fBoqnsqqOroG7oh08b5Lz3cbQ@mail.gmail.com>
Feb 06 23:04:03 hwsrv-890039 postfix/qmgr[1712]: A473025245: from=<[email protected]>, size=3328, nrcpt=1 (queue active)
Feb 06 23:04:03 hwsrv-890039 postfix/lmtp[1901]: A473025245: to=<[email protected]>, relay=none, delay=0.05, delays=0.03/0.01/0/0, dsn=4.4.1, status=deferred (connect to hwsrv-890039.nostalgicmail.com[private/dovecot-lmtp]: Connection refused)
Feb 06 23:04:03 hwsrv-890039 postfix/smtpd[1893]: disconnect from mail-qv1-f41.google.com[209.85.219.41] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=1 quit=1 commands=7
Feb 06 23:07:23 hwsrv-890039 postfix/anvil[1895]: statistics: max connection rate 1/60s for (smtp:209.85.219.41) at Feb  6 23:04:03
Feb 06 23:07:23 hwsrv-890039 postfix/anvil[1895]: statistics: max connection count 1 for (smtp:209.85.219.41) at Feb  6 23:04:03
Feb 06 23:07:23 hwsrv-890039 postfix/anvil[1895]: statistics: max cache size 1 at Feb  6 23:04:03
(END)

/var/log/dovecot_info,log

Feb 06 22:35:30 master: Info: Dovecot v2.3.13 (89f716dc2) starting up for imap, lmtp (core dumps disabled)
(END)

/var/log/dovecot_debug.log

Feb 06 23:04:03 auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/lib20_auth_var_expand_crypt.so
Feb 06 23:04:03 auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Feb 06 23:04:03 auth: Debug: Read auth token secret from /run/dovecot/auth-token-secret.dat
Feb 06 23:04:03 auth: Debug: auth client connected (pid=0)
(END)

/var/log/dovecot_errors_warnings.log

Feb 06 22:35:07 master: Warning: Killed with signal 15 (by pid=104901 uid=0 code=kill)
(END)

output of netstat -tulpn | grep LISTEN

tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1709/master         
tcp        0      0 0.0.0.0:xxxxx           0.0.0.0:*               LISTEN      683/sshd: /usr/sbin 
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      472/dovecot         
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      634/mariadbd        
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      1709/master         
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      901/perl            
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      472/dovecot         
tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      1709/master         
tcp6       0      0 :::443                  :::*                    LISTEN      710/apache2         
tcp6       0      0 :::xxxxx                :::*                    LISTEN      683/sshd: /usr/sbin 
tcp6       0      0 :::993                  :::*                    LISTEN      472/dovecot         
tcp6       0      0 ::1:783                 :::*                    LISTEN      901/perl            
tcp6       0      0 :::143                  :::*                    LISTEN      472/dovecot         
tcp6       0      0 :::80                   :::*                    LISTEN      710/apache2 

output of postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
maillog_file = /var/log/postfix.log
mydestination = $myhostname localhost.$mydomain localhost
mydomain = nostalgicmail.com
myhostname = hwsrv-890039.nostalgicmail.com
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/nostalgicmail.com/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/nostalgicmail.com/privkey.pem
smtpd_tls_security_level = may
smtpd_use_tls = yes
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp

output of doveconf -n

# 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.13 (cdd19fe3)
# OS: Linux 5.10.0-11-cloud-amd64 x86_64 Debian 11.2 ext4
# Hostname: hwsrv-890039.nostalgicmail.com
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = plain
debug_log_path = /var/log/dovecot_debug.log
first_valid_uid = 100
info_log_path = /var/log/dovecot_info.log
log_path = /var/log/dovecot_error_warnings.log
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%n/Maildir
mail_privileged_group = mail
mail_uid = vmail
namespace 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 = 
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
postmaster_address = [email protected]
protocols = imap lmtp
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service lmtp {
  unix_listener lmtp {
    group = postfix
    mode = 0666
    user = postfix
  }
}
ssl_cert = </etc/letsencrypt/live/nostalgicmail.com/cert.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_ssl = yes

1 Answer 1

0

I finally found an answer that works for me at:

https://workaround.org/ispmail/jessie/postfix-dovecot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .