Just a thought in the back of my mind... While I'm posting bits and pieces of log files and conf files during this process are there security issues to bear in mind about stuff that shouldn't be posted..? I notice how sometimes posters' replace IP addresses and other things with 'X's' or '***'s'... any thoughts..? (hopefully that doesn't turn out to be an ironically dumb question after the fact...)
Also I see this when using apt-get...
I've had a search about this and there are differing solutions that have not changed anything on my server..?
Code:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_MESSAGES = "en_AU.UTF-8",
LC_COLLATE = "en_AU.UTF-8",
LC_CTYPE = "en_AU.UTF-8",
LANG = "en_AU.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Quote:
Originally Posted by cbj4074
This bit is a good sign; it indicates that Dovecot was configured correctly (and explains the warning you received and that I pointed-out earlier):
Code:
Jan 20 13:26:31 25612-21212 groupadd[9365]: group added to /etc/group: name=dovecot, GID=120
Jan 20 13:26:31 25612-21212 groupadd[9365]: group added to /etc/gshadow: name=dovecot
Jan 20 13:26:31 25612-21212 groupadd[9365]: new group: name=dovecot, GID=120
Jan 20 13:26:31 25612-21212 useradd[9369]: new user: name=dovecot, UID=115, GID=120, home=/usr/lib/dovecot, shell=/bin/false
Jan 20 13:26:31 25612-21212 usermod[9374]: change user 'dovecot' password
Jan 20 13:26:31 25612-21212 chage[9379]: changed password expiry for dovecot
Jan 20 13:26:31 25612-21212 chfn[9382]: changed user 'dovecot' information
|
I thought I'd post some of what's happening before and after the timestamps you identified because I'm new to this - trying to get a bit of understanding of what's going on around the said timestamps...
/var/log/mail.log at 13:26:**
Code:
Jan 20 13:25:29 25612-21212 postfix/pipe[7752]: 219932F81CE2: to=<root@xanderit.com>, relay=maildrop, delay=403524, delays=403524/0.27/0/0, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/bin/maildrop: Home directory owned by wrong user. )
Jan 20 13:26:31 25612-21212 dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan 20 13:26:31 25612-21212 dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Jan 20 13:26:31 25612-21212 dovecot: Killed with signal 15 (by pid=9515 uid=0 code=kill)
Jan 20 13:26:31 25612-21212 dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan 20 13:26:31 25612-21212 dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Jan 20 13:26:31 25612-21212 dovecot: Killed with signal 15 (by pid=9553 uid=0 code=kill)
Jan 20 13:26:31 25612-21212 dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan 20 13:26:31 25612-21212 dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Jan 20 13:30:02 25612-21212 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:30:02 25612-21212 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:30:02 25612-21212 postfix/smtpd[9624]: connect from localhost.localdomain[127.0.0.1]
Jan 20 13:30:02 25612-21212 postfix/smtpd[9624]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jan 20 13:30:02 25612-21212 postfix/smtpd[9624]: disconnect from localhost.localdomain[127.0.0.1]
Jan 20 13:32:23 25612-21212 dovecot: imap-login: Waiting for SSL parameter file ssl-parameters.dat
Jan 20 13:35:01 25612-21212 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:35:01 25612-21212 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:35:01 25612-21212 postfix/smtpd[9722]: connect from localhost.localdomain[127.0.0.1]
Jan 20 13:35:01 25612-21212 postfix/smtpd[9722]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jan 20 13:35:01 25612-21212 postfix/smtpd[9722]: disconnect from localhost.localdomain[127.0.0.1]
Quote:
Each failed login attempt was indeed logged:
Code:
Jan 20 13:47:10 25612-21212 dovecot-auth: pam_unix(dovecot:auth): check pass; user unknown
Jan 20 13:47:10 25612-21212 dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=cbj4074@xanderit.com rhost=XXX.XXX.XXX.XXX
Jan 20 13:47:19 25612-21212 dovecot-auth: pam_unix(dovecot:auth): check pass; user unknown
Jan 20 13:47:19 25612-21212 dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=cbj4074@xanderit.com rhost=XXX.XXX.XXX.XXX
So, the message is always "check pass; user unknown", followed by "authentication failure".
Unfortunately, that on its own doesn't tell us much.
There should be corresponding log entries in /var/log/mail.log. See if you can find any entry that corresponds to the above (use the timestamp).
I expect you to find something like this:
Code:
Jan 20 10:07:19 hostname dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<cbj4074@xanderit.com>, method=PLAIN, rip=XXX.XXX.XXX.XXX, lip=XXX.XXX.XXX.XXX, TLS
|
/var/log/mail.log at 13:47:**
Code:
Jan 20 13:44:41 25612-21212 dovecot: imap-login: Disconnected (no auth attempts): rip=76.179.0.31, lip=202.130.46.114, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
Jan 20 13:45:01 25612-21212 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:45:01 25612-21212 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:45:01 25612-21212 postfix/smtpd[10214]: connect from localhost.localdomain[127.0.0.1]
Jan 20 13:45:01 25612-21212 postfix/smtpd[10214]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jan 20 13:45:01 25612-21212 postfix/smtpd[10214]: disconnect from localhost.localdomain[127.0.0.1]
Jan 20 13:45:05 25612-21212 dovecot: imap-login: Aborted login (no auth attempts): rip=76.179.0.31, lip=202.130.46.114, TLS
Jan 20 13:45:06 25612-21212 dovecot: imap-login: Disconnected (no auth attempts): rip=76.179.0.31, lip=202.130.46.114, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
Jan 20 13:47:07 25612-21212 dovecot: imap-login: Aborted login (no auth attempts): rip=76.179.0.31, lip=202.130.46.114, TLS
Jan 20 13:47:33 25612-21212 dovecot: imap-login: Disconnected (auth failed, 2 attempts): user=<cbj4074@xanderit.com>, method=PLAIN, rip=76.179.0.31, lip=202.130.46.114, TLS
Jan 20 13:49:09 25612-21212 postfix/qmgr[9995]: 759BEC74A61B: from=<smmsp@xanderit.com>, size=1244, nrcpt=1 (queue active)
Jan 20 13:49:09 25612-21212 postfix/pipe[11311]: 759BEC74A61B: to=<root@xanderit.com>, relay=maildrop, delay=547, delays=547/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/bin/maildrop: Home directory owned by wrong user. )
Jan 20 13:50:01 25612-21212 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:50:01 25612-21212 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 20 13:50:01 25612-21212 postfix/smtpd[11341]: connect from localhost.localdomain[127.0.0.1]
Jan 20 13:50:01 25612-21212 postfix/smtpd[11341]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jan 20 13:50:01 25612-21212 postfix/smtpd[11341]: disconnect from localhost.localdomain[127.0.0.1]
Jan 20 13:50:53 25612-21212 postfix/master[9993]: terminating on signal 15
Jan 20 13:50:53 25612-21212 postfix/master[11496]: daemon started -- version 2.8.5, configuration /etc/postfix
Jan 20 13:52:24 25612-21212 dovecot: imap-login: Aborted login (no auth attempts): rip=76.179.0.31, lip=202.130.46.114, TLS
Jan 20 13:52:49 25612-21212 dovecot: imap-login: Disconnected (auth failed, 2 attempts): user=<cbj4074@xanderit.com>, method=PLAIN, rip=76.179.0.31, lip=202.130.46.114, TLS
Quote:
We're making progress. At least now the logs are reflecting what is actually happening.
It seems that there may be a disconnect between ISPConfig's virtual mailbox DB tables and the authentication mechanism that Dovecot is attempting to use.
I also want to point-out that I don't have these messages in /var/log/auth.log:
Code:
Jan 20 12:35:01 25612-21212 postfix/smtpd[5188]: sql auxprop plugin using mysql engine
You have this message in your log quite frequently. It is probably safe to assume that this message is related or in addition to the IMAP/POP issue.
Can you please post the full contents of /etc/postfix/main.cf and /etc/postfix/master.cf?
|
/etc/postfix/main.cf
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = /usr/share/doc/postfix
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = 25612-21212.vps.digitalpacific.com.au
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
message_size_limit = 0
/etc/postfix/master.cf
Code:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
#smtp inet n - - - 1 postscreen
#smtpd pass - - - - - smtpd
#dnsblog unix - - - - 0 dnsblog
#tlsproxy unix - - - - 0 tlsproxy
submission inet n - - - - smtpd
# -o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1