nikooo777 |
11-15-2010 02:20 PM |
Postfix + saslauthd can't get it to work/(auth?)
Hello,
this is like my 20th time trying to successfully setup a postfix server working, unfortunately, even if i spent many many hours trying and retrying i always failed at it. even google became useless after all the errors i had to deal with.
so here i am hoping my 21st time with the help of an acknowledged community will be successful.
some info you may need:
i am running a box with Debian Lenny 5 installed on it (64bit)
one of the domains pointed at my box and that i want to use as hostname (user@nikooo777.info) is (i'll use something different than the real one as i would like to keep it private) nikooo777.info
my /etc/postfix/main.cf looks like:
PHP 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 (Debian/GNU) 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 = no # 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_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = nikooo777.info smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination smtpd_sasl_security_options = noanonymous # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = nikooo777.info alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = nikooo777.info, 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 home_mailbox = Maildir/ mailbox_command =
my /etc/postfix/master.cf looks like:
PHP 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 #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 ${recipient} # # 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}
my /etc/default/saslauthd looks like:
PHP Code:
# # Settings for saslauthd daemon # Please read /usr/share/doc/sasl2-bin/README.Debian for details. # # Should saslauthd run automatically on startup? (default: no) START=yes # Description of this saslauthd instance. Recommended. # (suggestion: SASL Authentication Daemon) DESC="SASL Authentication Daemon" # Short name of this saslauthd instance. Strongly recommended. # (suggestion: saslauthd) NAME="saslauthd" # Which authentication mechanisms should saslauthd use? (default: pam) # # Available options in this Debian package: # getpwent -- use the getpwent() library function # kerberos5 -- use Kerberos 5 # pam -- use PAM # rimap -- use a remote IMAP server # shadow -- use the local shadow password file # sasldb -- use the local sasldb database file # ldap -- use LDAP (configuration is in /etc/saslauthd.conf) # # Only one option may be used at a time. See the saslauthd man page # for more information. # # Example: MECHANISMS="pam" MECHANISMS="shadow" # Additional options for this mechanism. (default: none) # See the saslauthd man page for information about mech-specific options. MECH_OPTIONS="" # How many saslauthd processes should we run? (default: 5) # A value of 0 will fork a new process for each connection. THREADS=5 # Other options (default: -c -m /var/run/saslauthd) # Note: You MUST specify the -m option or saslauthd won't run! # # WARNING: DO NOT SPECIFY THE -d OPTION. # The -d option will cause saslauthd to run in the foreground instead of as # a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish # to run saslauthd in debug mode, please run it by hand to be safe. # # See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information. # See the saslauthd man page and the output of 'saslauthd -h' for general # information about these options. # # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd" #OPTIONS="-c -m /var/run/saslauthd" OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" PWDIR="/var/spool/postfix/var/run/saslauthd" PARAMS="-m ${PWDIR}" PIDFILE="${PWDIR}/saslauthd.pid"
an info that may be useful:
PHP Code:
products:/var/spool/postfix/var/run/saslauthd# ls cache.flock cache.mmap mux mux.accept saslauthd.pid
i edited line 95 of /etc/init.d/postfix into:
PHP Code:
FILES="etc/localtime etc/services etc/resolv.conf etc/hosts etc/nsswitch.conf etc/sasldb2"
with Microsoft Outlook 2007 when i try to connect it will ask me for the username and the password everytime i press ok,
opening /var/log/mail.info i see this:
PHP Code:
Nov 15 20:11:17 products postfix/master[7407]: daemon started -- version 2.5.5, configuration /etc/postfix Nov 15 20:11:26 products pop3d: LOGIN, user=niko, ip=[::ffff:195.***.***.10], port=[36354] Nov 15 20:11:26 products pop3d: scancur opendir("cur"): No such file or directory Nov 15 20:11:29 products postfix/smtpd[7420]: connect from 195-***-***-10.dclient.hispeed.ch[195.***.***.10] Nov 15 20:11:29 products postfix/smtpd[7420]: warning: SASL authentication failure: no secret in database Nov 15 20:11:29 products postfix/smtpd[7420]: warning: 195-***-***-10.dclient.hispeed.ch[195.***.***.10]: SASL NTLM authentication failed: authentication failure Nov 15 20:11:29 products postfix/smtpd[7420]: warning: SASL authentication failure: realm changed: authentication aborted Nov 15 20:11:29 products postfix/smtpd[7420]: warning: 195-***-***-10.dclient.hispeed.ch[195.***.***.10]: SASL DIGEST-MD5 authentication failed: authentication failure Nov 15 20:11:30 products postfix/smtpd[7420]: warning: 195-***-***-10.dclient.hispeed.ch[195.***.***.10]: SASL LOGIN authentication failed: authentication failure Nov 15 20:11:30 products postfix/smtpd[7420]: lost connection after AUTH from 195-***-***-10.dclient.hispeed.ch[195.***.***.10] Nov 15 20:11:30 products postfix/smtpd[7420]: disconnect from 195-***-***-10.dclient.hispeed.ch[195.***.***.10]
i really hope you can help me making it work!
by the way i also installed courier-pop to retrieve my mails which actually won't work too but this is another problem.
sincerely, Niko.
PS: if you need more data feel free to ask!
|