Everything is up and running and answer on calls but the login for postfix doesn't seem to work (it works for Courier IMAP, just not postfix).
Here's the error output:
Jun 30 22:22:10 HOST postfix/smtps/smtpd: Anonymous TLS connection established from unknown[<my ip>]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits) Jun 30 22:22:10 HOST postfix/smtps/smtpd: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory Jun 30 22:22:10 HOST postfix/smtps/smtpd: warning: SASL authentication failure: Password verification failed Jun 30 22:22:10 HOST postfix/smtps/smtpd: warning: unknown[<my ip>]: SASL PLAIN authentication failed: generic failure
pwcheck_method: saslauthd mech_list: PLAIN LOGIN authdaemond_path: /var/run/courier-auth/socket log_level: 7
And the socket has been created:
# ls -l /var/run/courier-auth/
total 4 -rw-r--r-- 1 root wheel 5 Jun 30 22:19 pid -rw------- 1 root wheel 0 Jun 30 22:19 pid.lock srwxrwxrwx 1 root _postfix 0 Jun 30 22:19 socket
[...] authmodulelist="authpwd" [...] authdaemonvar=/var/run/courier-auth [...]
I have no clue why this is going wrong, or where to begin to check for errors since the log doesn't specify which file it's looking for or where the connection is going wrong so i'm in desperate need of some help here.
- OpenBSD 5.3
Note: increasing the log-level of postfix is of not use either, i'm doing the best i can to not annoy you with standard questions like this but i'm bashing my head hard at the moment!
Edit: I've also taken into account that postfix runs in a chrooted environment (tried not chrooting as well just for the sake of it) and thus i created /storage/spool/postfix/var/run/courier-auth/ and placed
socket in that folder without any success. Also tried
symlinking that chroot folder to the actual folder
/var/run/courier-auth/ also without success.
Ok so i've fixed SMTP, postfix can now use SASL2, however.. That ment dropping the support for Couerier IMAP... Eh..
Aparently there was some missing startup parameters in saslauthdaemond via
/etc/rc.d/saslauthd, i had a missing
mux file which worried me since almost every guide except the OpenBSD guide pointed to it.. so i fixed that by adding:
daemon_flags="-a getpwent -m /var/run/courier-auth/"
The startup script had no flags for whatever reason.. so that fixed some issues.
Now SMTP can authenticate, but now
Jul 1 14:08:48 HOST imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:<ip v4>] Jul 1 14:08:48 HOST imapd-ssl: authentication error: Connection refused Jul 1 14:08:52 HOST imapd-ssl: authdaemon: s_connect() failed: Connection refused Jul 1 14:08:52 HOST imapd-ssl: [Hint: perhaps authdaemond is not running?]
After actually starting up the daemon (....) i can now authenticate against SASL2 even with IMAP, however it just says wrong credentials..
Jul 1 14:55:10 HOST imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:<ipv4>] Jul 1 14:55:15 HOST imapd-ssl: LOGIN FAILED, user=MyUser, ip=[::ffff:<ipv4>]
The user is a local user and can login locally but even so the user shouldn't need a actual shell to login to the mail.
so i poked around and found out that
DEFDOMAIN="@domain.se" is messing things up, so i removed that from
/etc/courier/imapd and i got to the point where
SMTP work and i get this from the
Jul 2 13:23:10 HOST authdaemond: Authenticated: sysusername=anton, sysuserid=<null>, sysgroupid=20001, homedir=/storage/vmail/anton, address=anton, fullname=Anton, maildir=<null>, quota=<null>, options=<null> Jul 2 13:23:10 HOST authdaemond: Authenticated: clearpasswd=MyPasswd, passwd=$1b$04$QQQ1c10x0AU3etWCJFrla.Rl22sevNhq24yXYxrq8IN7mEeGI20. Jul 2 13:23:10 HOST imapd-ssl: anton: Account's mailbox directory is not owned by the correct uid or gid
But i'm not sure why because:
# ls -l /storage/vmail/ -rw-r--r-- 1 vmail vmail 22 Mar 13 01:06 .Xdefaults -rw-r--r-- 1 vmail vmail 773 Mar 13 01:06 .cshrc -rw-r--r-- 1 vmail vmail 398 Mar 13 01:06 .login -rw-r--r-- 1 vmail vmail 113 Mar 13 01:06 .mailrc -rw-r--r-- 1 vmail vmail 218 Mar 13 01:06 .profile drwx------ 2 vmail vmail 512 Jun 30 10:44 .ssh drwxr-xr-x 3 anton anton 512 Jun 30 10:44 anton