Portál AbcLinuxu, 14. května 2025 08:49
A saslauth a saslauth s databází máte nainstalovaný a nakonfigurovaný? Co je to za distribuci?
postfix/smtpd[19858]: sql_select option missing
May 4 18:28:32 firewall postfix/smtpd[19858]: auxpropfunc error no mechanism available
May 4 18:28:32 firewall postfix/smtpd[19858]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Musíte si nainstalovat balík libsasl2-modules-sql. Pak bude možné autentizovat uživatele z MySQL, samozřejmě je potřeba saslauth nakonfigurovat. Taková poznámka, postfix běží v chrootu, takže to budete muset zohlednit.
cat /etc/courier/authmysqlrc MYSQL_SERVER 127.0.0.1 #your mysql server MYSQL_USERNAME uname MYSQL_PASSWORD postfix MYSQL_SOCKET /var/run/mysqld/mysqld.sock # if you are on localhost MYSQL_DATABASE maildb MYSQL_USER_TABLE users MYSQL_CRYPT_PWFIELD crypt MYSQL_CLEAR_PWFIELD clear MYSQL_UID_FIELD uid MYSQL_GID_FIELD gid MYSQL_LOGIN_FIELD id MYSQL_HOME_FIELD home MYSQL_NAME_FIELD name MYSQL_MAILDIR_FIELD maildir MYSQL_WHERE_CLAUSE imapok=1 AND bool1=1 AND bool2=1
less /etc/courier/authdaemonrc authmodulelist="authmysql authpam" version="authdaemond.mysql"
cat /etc/postfix/sasl/smtpd.conf log_level: 10 pwcheck_method: saslauthd auxprop_plugin: mysql mech_list: plain login allow_plaintext: true sql_hostnames: 127.0.0.1 sql_user: uname sql_passwd: postfix sql_database: maildb sql_statement: SELECT clear FROM users WHERE id = '%u' sql_verbose: yes
TAdy je How To, které je přesně pro to, co chcete, tak se podívejte jeslti máte vše, tak jak to tam je.
http://howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-debian-lenny-p2
postfix check postfix/postfix-script: warning: /var/spool/postfix/etc/passwd and /etc/passwd differ
A v databázi to id je e-mailová adresa nebo číslo?
authtest user
Authentication succeeded.
Authenticated: user (uid 5000, gid 5000)
Home Directory: /
Maildir: domain.cz/user/
Quota: (none)
Encrypted Password: r9uHWtlphUbek
Cleartext Password: test
Options: (none)
describe users;
+---------+----------------------+------+-----+----------------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+----------------------+------+-----+----------------------------+-------+
| id | varchar(128) | NO | PRI | | |
| address | varchar(128) | NO | UNI | | |
| crypt | varchar(128) | NO | | | |
| clear | varchar(128) | NO | | | |
| name | varchar(128) | NO | | | |
| uid | smallint(5) unsigned | NO | | 1000 | |
| gid | smallint(5) unsigned | NO | | 1000 | |
| home | varchar(128) | NO | | /var/spool/postfix/virtual | |
| domain | varchar(128) | NO | | | |
| maildir | varchar(255) | NO | | | |
| imapok | tinyint(3) unsigned | NO | | 1 | |
| bool1 | tinyint(3) unsigned | NO | | 1 | |
| bool2 | tinyint(3) unsigned | NO | | 1 | |
+---------+----------------------+------+-----+----------------------------+-------+
13 rows in set (0.00 sec)
select * from users where id like 'user';
+-------+------------------+---------------+-------+-------------+------+------+------+------------+-------------------+--------+-------+-------+
| id | address | crypt | clear | name | uid | gid | home | domain | maildir | imapok | bool1 | bool2 |
+-------+------------------+---------------+-------+-------------+------+------+------+------------+-------------------+--------+-------+-------+
| user | user@domain.cz | r9uHWtlphUbek | test | user user | 5000 | 5000 | / | domain.cz | domain.cz/user/ | 1 | 1 | 1 |
+-------+------------------+---------------+-------+-------------+------+------+------+------------+-------------------+--------+-------+-------+
1 row in set (0.00 sec)
postfix check
postfix/postfix-script: warning: /var/spool/postfix/etc/passwd and /etc/passwd differ
btw: k cemu je sifrovani kdyz spojeni jestli to dobre chapu je
ssl_client--->ssl_smtp_muj_server-->smtp_server_nakterydorucijizpravu-->ssl_2clientTakze zpravu si servery predavaji nesifrovanou pokud to nejsou moje servery a nemam nastaveno sifrovani je to tak?
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.