Pagina 1 di 1

Postfix e SASL

Inviato: ven 26 ott 2007, 10:14
da alex.franci
Ciao a tutti!
Ho configurato Postfix per accettare connessioni in ingresso solo tramite autenticazione SASL (ovviamente si eccettua connessioni in ingresso con RCPT del mio dominio).
Le mail esterne mi arrivano benissimo, ma il problema sorge quando invio le mail. Ho messo salsdb2 nel chroot di postfix, gli ho dato i giusti permessi, ma non mi trova l'utente (che ho aggiungto tramite saslpasswd2 -c [user]). Inoltre io non ho scelto sasldb!!! Guardate la conf di saslauthd:

Codice: Seleziona tutto

#
# Settings for saslauthd daemon
#

# Should saslauthd run automatically on startup? (default: no)
START=yes

# 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="sasldb"
#MECHANISMS="getpwent"
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)
# See the saslauthd man page for information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
OPTIONS="-c"
Quando provo a inviare una mail, nel mail.log viene scritto:

Codice: Seleziona tutto

Oct 26 10:10:38 serverone postfix/smtpd[13685]: TLS connection established from portatilone[192.168.1.4]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Oct 26 10:10:40 serverone postfix/smtpd[13685]: warning: SASL authentication failure: Password verification failed
Oct 26 10:10:40 serverone postfix/smtpd[13685]: warning: portatilone[192.168.1.4]: SASL PLAIN authentication failed: authentication failure
Oct 26 10:10:40 serverone postfix/smtpd[13685]: warning: portatilone[192.168.1.4]: SASL LOGIN authentication failed: authentication failure
che non e' assolutamente vero. Inoltre se provo a eliminare salsdb2, mi dice che non trova il Berkeley db /etc/sasldb2 (ma se gli ho detto di usare shadow???).

dove sbaglio? grazie mille[/code]

Inviato: ven 26 ott 2007, 14:55
da krisis

Codice: Seleziona tutto

# Example: MECHANISMS="pam"
MECHANISMS="sasldb"
#MECHANISMS="getpwent"
MECHANISMS="shadow" 
se non vuoi usare sasldb toglilo dai mechanisms
Se vuoi usare sasldb invece (sinceramente fra shadow e sasldb preferisco sasldb) a saslpasswd2 devi aggiungere l'opzione - f /path/sasldb/sotto/postfix perchè sennò ti crea di default sasldb2 sotto /etc. Dopo che hai aggiunto l'utente al db prova a loggarti usando testsaslauth -c utente -p password -f /path/del/mux

[ot] ma tutti a lavorare con postfix e saslauth ultimamente? Ne ho finito uno l'altro ieri :lol:


EDIT : dimenticavo , in smtpd.conf che ci hai messo?

Inviato: ven 26 ott 2007, 21:42
da alex.franci

Codice: Seleziona tutto

serverone:/usr/lib/sasl2# testsaslauthd -u alex -p [passwd] -f /var/spool/mail/var/run/saslauthd/mux
0: OK "Success."
ma quando provo con l'smtp:

Codice: Seleziona tutto

Oct 26 21:41:14 serverone postfix/smtpd[15030]: connect from portatilone[192.168.1.4]
Oct 26 21:41:14 serverone postfix/smtpd[15030]: setting up TLS connection from portatilone[192.168.1.4]
Oct 26 21:41:14 serverone postfix/smtpd[15030]: TLS connection established from portatilone[192.168.1.4]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Oct 26 21:41:16 serverone postfix/smtpd[15030]: warning: SASL authentication failure: Password verification failed
Oct 26 21:41:16 serverone postfix/smtpd[15030]: warning: portatilone[192.168.1.4]: SASL PLAIN authentication failed: authentication failure
Oct 26 21:41:16 serverone postfix/smtpd[15030]: warning: portatilone[192.168.1.4]: SASL LOGIN authentication failed: authentication failure
in smtpd.conf ho

Codice: Seleziona tutto

serverone:/usr/lib/sasl2# cat smtpd.conf 
pwcheck_method: saslauthd
mech_list: plain login
[/code]

Inviato: lun 29 ott 2007, 9:37
da alex.franci
qualcuno ha idee? basta anche una guida, un howto, qualsiasi cosa!
grazie