0

two domains configured as virtual domains and ubuntu 14.4 installed:

I need to configure smtp authentication for dovecot, without authentication it is working I have go through several docs but non of these are suit for my solution

regards Kanchana

###################### refer the doveconf -n

root@mail:/var/log# doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-32-generic x86_64 Ubuntu 14.04.1 LTS ext4
auth_mechanisms = plain cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
passdb {
  args = /etc/dovecot/passwd
  driver = passwd-file
}
protocols = imap pop3
service auth {
  executable = /usr/lib/dovecot/auth
  user = root
}
service imap-login {
  chroot = login
  executable = /usr/lib/dovecot/imap-login
  user = dovecot
}
service imap {
  executable = /usr/lib/dovecot/imap
}
service pop3-login {
  chroot = login
  executable = /usr/lib/dovecot/pop3-login
  user = dovecot
}
service pop3 {
  executable = /usr/lib/dovecot/pop3
}
ssl = no
userdb {
  args = /etc/dovecot/users
  driver = passwd-file
}
valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
douggro
  • 2,537

1 Answers1

0

Based on the output of doveconf -n, Dovecot is not set to handle SMTP SASL authorizations from Postfix. You can try adding the following to your /etc/dovecot/conf.d/10-master.conf file:

# Add SMTP SASL authorizations from Postfix:
service auth{
unix_listener auth-userdb{
}
inet_listener {
port=12555
}
}

And in your /etc/postfix/main.cf file, add the following:

# Add Dovecot listener for SASL authorizations:
smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth
smtpd_sasl_path=inet:127.0.0.1:12555

The # at the start of a line to add comments about the changes so you can keep track of what you changed - I recommend you do this in case you need to go back and remove the edits.

The port number 12555 is arbitrary, but make sure to use a port that is not being used for any services. Port 12555 isn't used for any common services which is why I selected it.

Restart Postfix and Dovecot with sudo service postfix restart and sudo service dovecot restart. See if this allows SMTP authorizations through Dovecot.

douggro
  • 2,537
  • thanks Mr Douggro finaly I have got through I have did below on the dovecot.conf with your help and it works thanks ##### disable_plaintext_auth = no auth default { socket listen { client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } mechanisms = plain cram-md5 } – Kanchana Nilupa Jan 15 '15 at 07:31
  • Did you get it working? – douggro Jan 15 '15 at 07:33
  • I hope forward to get more help from you thanks any further info please post reply on this configuration – Kanchana Nilupa Jan 15 '15 at 07:35
  • HI douggro Please check if you know below issue I am facing now cannot ping real ip address from the LAN users, this is ubuntu mail server with two network cards and they can send mail using only LAN interface ip as outgoing / incoming mail server IPs

    but cannot send and receives mail using real IP addresess

    – Kanchana Nilupa Jan 15 '15 at 08:28
  • yes the config I mentioned it works – Kanchana Nilupa Jan 15 '15 at 08:33
  • @KanchanaNilupa If this all works, don't forget to click the grey check-mark under the "0" at the left of this text, which means "yes, this answer is valid"! ;-) – Fabby Jan 22 '15 at 01:18