Szervusztok !
Még régebben felhúztam egy virtualhost-os levelezőrendszert debian alá ez alapján :
http://linux.justinhartman.com/Postfix_and_Courier_Installation_using_M… (azt hiszem ez volt)
majd az etc meg pár könyvtárat elmentettem, mert mert a szerver le lett állítva. Most egy másik helyen megint felhúztam egy debiant, helyreállítottam a levelezést domaineket mindent. A pop3 meg imap fogadja is a klienseket, a postfixadminnal betettem a domaineket postafiókokat, minden működik a levélküldést leszámítva (hehe , nem röhögni :P )
Ez a hibaüzenet :
Nov 2 16:14:17 battleaxe postfix/smtpd[5444]: connect from host-94-248-206-192.kabelnet.hu[94.248.206.192]
Nov 2 16:14:17 battleaxe postfix/smtpd[5444]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 2 16:14:17 battleaxe postfix/smtpd[5444]: warning: SASL authentication failure: Password verification failed
Nov 2 16:14:17 battleaxe postfix/smtpd[5444]: warning: host-94-248-206-192.kabelnet.hu[94.248.206.192] SASL PLAIN authentication failed: generic failure
Nov 2 16:14:17 battleaxe postfix/smtpd[5444]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 2 16:14:17 battleaxe postfix/smtpd[5444]: warning: host-94-248-206-192.kabelnet.hu[94.248.206.192] SASL LOGIN authentication failed: generic failure
Nov 2 16:15:57 battleaxe postfix/smtpd[5444]: lost connection after AUTH from host-94-248-206-192.kabelnet.hu[94.248.206.192]
Nov 2 16:15:57 battleaxe postfix/smtpd[5444]: disconnect from host-94-248-206-192.kabelnet.hu[94.248.206.192]
egy kis forrásanyag :
root@battleaxe:/etc/default# ps ax|grep sasl
4434 ? Ss 0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
4435 ? S 0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
4437 ? S 0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
4438 ? S 0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
4440 ? S 0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
5514 pts/3 R+ 0:00 grep --color=auto sasl
megnéztem a jelszó ami az adatbázisban van jó, a mux-file a helyén van, a konyvtárak root illetve postfix által olvashatóak, a postfix tagla a sasl groupnak stb stb stb... már 4 órája nézem a fórumokat de egyszerűen nem jövök rá hogy mi az ami "no such file or directory"
Lenne valakinek rá valami ötlete ? (igen, átnéztem a hup-os témákat is) Előre is köszi a segítséget!
device
- 4056 megtekintés
Hozzászólások
Szia!
A log a bőbeszédű változatot mutatja?
Nem lehet hogy MD5 vagy SHA1 jelszót várna a saslauthd?
- A hozzászóláshoz be kell jelentkezni
Emeld fel a debug-ot es ki fog derulni.
Meg add meg explicit, h biztosan ott keresse:
$ cat smtpd.conf
saslauthd_path: /var/run/saslauthd/mux
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
t
- A hozzászóláshoz be kell jelentkezni
Ez már az a debug szint ami után már csak az van hogy a jelszavakat is loggolja. Azt azért nem gondoltam hogy kéne. Beírtam a sasl/smtpd.conf -ba a saslauthd_path-t de úgy se talál magára.
- A hozzászóláshoz be kell jelentkezni
A postfix jelszavakat loggol?
Ez? Mit is csinaltal konkretan?
t
- A hozzászóláshoz be kell jelentkezni
Bocs,nem a postfix, hanem az authdameon. Egyébként ahol lehetett bekapcsoltam mindenhol a debuggolást a master.cf-ben is. Egyébként erre gondoltam :
# DEBUG_LOGIN=0 - turn off debugging
# DEBUG_LOGIN=1 - turn on debugging
# DEBUG_LOGIN=2 - turn on debugging + log passwords too
# Note that most information is sent to syslog at level 'debug', so
most nézem hoyg a syslog.conf-ban is lehet debug levelt állítani... csak az a durva hogy /etc-ben nincs syslog.conf...
- A hozzászóláshoz be kell jelentkezni
Gondolom ez már megvolt: ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd
strace-t meleg szívvel tudom ajánlani :)
- A hozzászóláshoz be kell jelentkezni
igen, megvolt . Tyűha ez az strace nem lesz egy sétagalopp, míg beteszem a saslauthd meg a postfix közé...
- A hozzászóláshoz be kell jelentkezni
Nah szívtam én is ezzel jó sokat nemrégen.
És ha minden igaz ez a parancs volt a megoldás, .bash_history-ból kinézve legalábbis:
dpkg-statoverride --force --update --add root sasl 755 /var/spool/postfix/var/run/saslauthd
Így néznek ki most a jogosultságok és minden megy is:
$ ls -la /var/spool/postfix/var/run/saslauthd
total 12
drwxr-xr-x 2 root sasl 4096 2011-08-30 20:53 .
drwxr-xr-x 3 root root 4096 2011-08-30 20:19 ..
srwxrwxrwx 1 root root 0 2011-08-30 20:53 mux
-rw------- 1 root root 0 2011-08-30 20:53 mux.accept
-rw------- 1 root root 6 2011-08-30 20:53 saslauthd.pi
$ ls -la /var/run/saslauthd
lrwxrwxrwx 1 root root 36 2011-08-30 20:54 /var/run/saslauthd -> /var/spool/postfix/var/run/saslauthd
Ezután egy postfix és sasl restart és próba.
Remélem ez így segít.
- A hozzászóláshoz be kell jelentkezni
Sajnos nem, még mindig ez a hibaüzenet:
syslog:
Nov 3 14:04:32 battleaxe postfix/smtpd[16746]: connect from BC9CB527.mobile.pool.telekom.hu[188.156.181.39]
Nov 3 14:04:35 battleaxe postfix/smtpd[16746]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 3 14:04:35 battleaxe postfix/smtpd[16746]: warning: SASL authentication failure: Password verification failed
Nov 3 14:04:35 battleaxe postfix/smtpd[16746]: warning: BC9CB527.mobile.pool.telekom.hu[188.156.181.39] SASL PLAIN authentication failed: generic failure
Nov 3 14:04:35 battleaxe postfix/smtpd[16746]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 3 14:04:35 battleaxe postfix/smtpd[16746]: warning: BC9CB527.mobile.pool.telekom.hu[188.156.181.39] SASL LOGIN authentication failed: generic failure
ahogy nézem az SQL logot ott meg jó minden, mert visszaadja a passwordöt ha a lekérdezést lefuttatom csak simán az adatbázison , továbbá a pop3 meg imap is kiszolgál, ergo két érv is amellett h a password és a lekérdezés az jó.
Azt nem értem hogy miért az a hiba hogy nosuch file or directory ? ha egyszer ott van a mux file, minden ott van a helyén, root postfix illetve sasl jogosultság/ csoportok rendben vannak, akkor mit nem talál meg? Rejtély...
- A hozzászóláshoz be kell jelentkezni
Ha megnézed amit írtam ott postfix jogosultság nincsen, próbálj meg pont olyanra hozni mindent ahogy ott van.
Veszteni nem veszthetsz vele semmit.
Nálam /etc/postfix/sasl/smtpd.conf tartalma:
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: user
sql_passwd: ****************
sql_database: database
sql_select: select password from mailbox where username='%u';
saslauthd_path: /var/run/saslauthd/mux
/etc/default/saslauthd tartalma:
START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="pam"
MECH_OPTIONS=""
THREADS=5
OPTIONS=" -m /var/spool/postfix/var/run/saslauthd -r"
- A hozzászóláshoz be kell jelentkezni
OPTIONS-ban nekem volt egy -c is , de vele nélküle is ugyanaz a helyzet. Egyébként mind2 konfigfile megegyezik az enyémmel. Beleértve a fennt említett root root jogosultságokat is.
- A hozzászóláshoz be kell jelentkezni
Mi? Koze?
Elinditod a service-eket a 'strace -s 5000 -o /tmp/log -p
' paranccsal pedig loggolod a process-t. Majd legeresel, hol nem talal pontosan mit, ill. mi a baja.
De mar irtam, emeld fel a debug szintet.
t
- A hozzászóláshoz be kell jelentkezni
baaaaaaaaaaaaaaaaaaaaaaz tudod mi volt a baj? Hogy a "ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd" a saslauthd-könyvtárba BELE rakta a symlinket, nem pedig helyette csinálta.... ezért nem talált rá a socketra !
Na bumm! Megoldva :D
- A hozzászóláshoz be kell jelentkezni
Kipróbáltam egy tesztet és ezt adja :
testsaslauthd -u device@*****.hu -p jelszo -f /var/spool/postfix/var/run/saslauthd/mux -s smtp
0: NO "authentication failed"
Ebben eddig semmi fura, csak hogy a syslogban viszont ez van :
Nov 3 19:49:51 battleaxe authdaemond: received auth request, service=imap, authtype=login
Nov 3 19:49:51 battleaxe authdaemond: authmysql: trying this module
Nov 3 19:49:51 battleaxe authdaemond: authmysqllib: connected. Versions: header 50051, client 50051, server 50051
Nov 3 19:49:51 battleaxe authdaemond: SQL query: SELECT username, password, "", '111', '115', home, maildir, quota, name, "" FROM mailbox WHERE username = 'de
vice@*****.hu'
Nov 3 19:49:51 battleaxe authdaemond: password matches successfully
Nov 3 19:49:51 battleaxe authdaemond: authmysql: sysusername=, sysuserid=111, sysgroupid=115, homedir=/usr/local/virtual/, address=device@******.hu, full
name=A, maildir=*****.hu/device@*****.hu/, quota=1024000000, options=
Nov 3 19:49:51 battleaxe authdaemond: Authenticated: sysusername=, sysuserid=111, sysgroupid=115, homedir=/usr/local/virtual/, address=device@******.hu,
fullname=A, maildir=*****.hu/device@*****.hu/, quota=1024000000, options=
Tehát azt nem értem, ha a syslogban átmegy az authentikáció, akkor miért adja vissza azt a console-ba hogy authentication failed?
- A hozzászóláshoz be kell jelentkezni
Lehet, hogy nem a te tesztedhez tartozik:
Nov 3 19:49:51 battleaxe authdaemond: received auth request, service=imap, authtype=login
Nálad meg "-s smtp" van a command line-on.
- A hozzászóláshoz be kell jelentkezni
jogos, de nem oda tartozik. Az authdaemon imap-ra meg pop3-ra simán beenged, le tudom rángatni a leveleket stb stb. De smtp-re a saslauthd meg no such file or directory... ez a bosszantó...
Most upgrade-eltem a postfixadmint a legújabbra, ami pár változtatást igényelt a postfix main.cf-jében , de a helyzet ugyanaz maradt.
- A hozzászóláshoz be kell jelentkezni
És hogy néz ki a sikertelen autentikációhoz tartozó ugyanilyen logbejegyzés?
- A hozzászóláshoz be kell jelentkezni
Sikeresek : (imap/pop3)
Nov 4 15:57:37 battleaxe imapd-ssl: Connection, ip=[::ffff:94.248.206.192]
Nov 4 15:57:39 battleaxe authdaemond: received auth request, service=imap, authtype=login
Nov 4 15:57:39 battleaxe authdaemond: authmysql: trying this module
Nov 4 15:57:39 battleaxe authdaemond: authmysqllib: connected. Versions: header 50051, client 50051, server 50051
Nov 4 15:57:39 battleaxe authdaemond: SQL query: SELECT username, password, "", '111', '115', home, maildir, quota, name, "" FROM mailbox WHERE username = 'de
vice@*******.hu'
Nov 4 15:57:39 battleaxe authdaemond: password matches successfully
Nov 4 15:57:39 battleaxe authdaemond: authmysql: sysusername=, sysuserid=111, sysgroupid=115, homedir=/usr/local/virtual/, address=device@*******.hu, fullname=vazer, maildir=*******.hu/device@*******.hu/, quota=0, options=
Nov 4 15:57:39 battleaxe authdaemond: Authenticated: sysusername=, sysuserid=111, sysgroupid=115, homedir=/usr/local/virtual/, address=device@*****.hu, fullname=vazer, maildir=*******.hu/device@*******.hu/, quota=0, options=
Nov 4 15:57:39 battleaxe imapd-ssl: LOGIN, user=device@*******.hu, ip=[::ffff:94.248.206.192], port=[8473], protocol=IMAP
Nov 4 15:57:48 battleaxe imapd-ssl: Connection, ip=[::ffff:94.248.206.192]
Nov 4 15:57:48 battleaxe authdaemond: received auth request, service=imap, authtype=login
Nov 4 15:57:48 battleaxe authdaemond: authmysql: trying this module
Nov 4 15:57:48 battleaxe authdaemond: authmysqllib: connected. Versions: header 50051, client 50051, server 50051
Nov 4 15:57:48 battleaxe authdaemond: SQL query: SELECT username, password, "", '111', '115', home, maildir, quota, name, "" FROM mailbox WHERE username = 'de
vice@*******.hu'
Nov 4 15:57:48 battleaxe authdaemond: password matches successfully
Nov 4 15:57:48 battleaxe authdaemond: authmysql: sysusername=, sysuserid=111, sysgroupid=115, homedir=/usr/local/virtual/, address=device@*******.hu, full
name=s, maildir=*******.hu/device@*******.hu/, quota=1024000000, options=
Nov 4 15:57:48 battleaxe authdaemond: Authenticated: sysusername=, sysuserid=111, sysgroupid=115, homedir=/usr/local/virtual/, address=device@*******.hu,
fullname=s, maildir=*******.hu/device@*******.hu/, quota=1024000000, options=
Nov 4 15:57:48 battleaxe imapd-ssl: LOGIN, user=device@*******.hu, ip=[::ffff:94.248.206.192], port=[8533], protocol=IMAP
Sikertelen :
Nov 4 16:01:15 battleaxe postfix/smtpd[3781]: connect from host-94-248-206-192.kabelnet.hu[94.248.206.192]
Nov 4 16:01:16 battleaxe postfix/smtpd[3781]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 4 16:01:16 battleaxe postfix/smtpd[3781]: warning: SASL authentication failure: Password verification failed
Nov 4 16:01:16 battleaxe postfix/smtpd[3781]: warning: host-94-248-206-192.kabelnet.hu[94.248.206.192] SASL PLAIN authentication failed: generic failure
Nov 4 16:01:16 battleaxe postfix/smtpd[3781]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 4 16:01:16 battleaxe postfix/smtpd[3781]: warning: host-94-248-206-192.kabelnet.hu[94.248.206.192] SASL LOGIN authentication failed: generic failure
Nov 4 16:02:39 battleaxe postfix/smtpd[3781]: disconnect from host-94-248-206-192.kabelnet.hu[94.248.206.192]
- A hozzászóláshoz be kell jelentkezni
testsaslauthd -u device@*****.hu -p jelszo -f /var/spool/postfix/var/run/saslauthd/mux -s smtp
Az ehhez tartozó authdaemond logra gondoltam.
Az ami "Sikertelen:" ott az a postfix logja nem a saslauthd-jé.
- A hozzászóláshoz be kell jelentkezni
Hétfőig pihi van. Kollégával áthelyeztük az optikát, de sajna a forrassztás nem vezetett eredményre. Na meg a 220v-at is kihúzta ("ja, ez a tied volt? :D ") .
- A hozzászóláshoz be kell jelentkezni
selinux? alaposan be tud kavarni, ha mashova rakod a socketet.
- A hozzászóláshoz be kell jelentkezni