3: Jeg er nu nået til hvor jeg skal teste systemt og det virker ikke, jeg kigger log filer, syslog, mail.log og mail.err Det syslog skriver er : courierpop3login: Connection, ip=[::ffff:192.168.1.1] courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.1.1] mail.log skriver det samme og det siger mail.err også
4: Jeg vil så gerne vide hvad der ellers kan ses igennem, og om der er andrer der har erfaring med opsætning af postfix med mysql styring/understøttelse
5: Håber jeg denne gang har skrevet så det kan læses og forståes hvad jeg mener :-)
Note: This document covers Postfix 1.x, there are several changes in Postfix 2.x which i will document in the future, but haven't found the time to test this setup on Postfix 2.x yet.
anyway så ville jeg gætte på at du skal rette i din authdaemonrc-fil (hos mig ligger den i /usr/lib/courier-imap/etc)
der er en linie som hedder:
authmodulelist="authcustom authcram authuserdb authldap authmysql authpam" den skal du nok rette til at hedde authmodulelist="authmysql"
##NAME: authmodulelist:0 # # The authentication modules that are linked into authdaemond. The # default list is installed. You may selectively disable modules simply # by removing them from the following list. The available modules you # can use are: authcustom authcram authuserdb authldap authmysql authpam
jeg har selv et projekt hvor jeg skal have en postfix til at spille med en mysql - men det er desværre en lavtprioriteret opgave så jeg kan ikke lige sige hvornår jeg bliver færdig med den. Men jeg regner med at have lidt flere erfaringer bagefter.
well - jeg synes at postfix er godt og stabilt. Udover at det er en opgave jeg skal løse, så vil det yderligere være en interessant øvelse at få den til at spille sammen med mysql.
Jeg tænkte blot at jeg lige ville skrive det for at du ikke skulle fortvivle helt over at der ingen svar kom. Det hjælper selvfølgeligt ikke det store hvis din server skulle have været oppe og køre "i går" ...
det er rart at høre :-) Nej heldigvis har jeg qmail kørende, som kører godt, men jo flere domæner der kommer, jo mere uoverskuligt bliver det, og så ville jeg gerne have det i mysql det hele, synes jeg er mere overskueligt.
det er min mail server antivirus, undskyld jeg ikke lige fik det med, men postfix-mysql er lidt underlig, man skal have fået en mail før man kan logge ind, men hvis antivirus programmet blokker mailen, så kan man ikke logge ind og se efter mail, ehm var det forståligt hehe
ok - det kan selvfølgeligt være noget med at man skal poppe for at authentikere sig selv; men ok - det vigtigste er vel også at det kommer til at køre.
jeg har ikke opgivet, prøver stadig, og er da kommet så meget længere nu, at jeg ikke får antivirus fejl, kun, men også nok, at jeg ikke kan logge på, og det er den eneste fejl jeg får, knokler videre i aften og nat :-)
Så vender jeg tilbage, nu er jeg kommet så lang at mine mails dog kommer til min mail server, men jeg kan logge ind via outlook eller andrer programmer, den eneste fejl jeg får er stadig : May 18 03:19:45 mail courierpop3login: Connection, ip=[::ffff:192.168.1.1] May 18 03:19:50 mail courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.1.1]
så er det lidt svært at se hvad fejlen er, her er mine main.cf fil : # see /usr/share/postfix/main.cf.dist for a commented, fuller # version of this file.
# Do not change these directory settings - they are critical to Postfix # operation. command_directory = /usr/sbin daemon_directory = /usr/lib/postfix program_directory = /usr/lib/postfix
og så min authmysqlrc : ##VERSION: $Id: authmysqlrc,v 1.10 2002/04/02 23:41:41 mrsam Exp $ # # Copyright 2000 Double Precision, Inc. See COPYING for # distribution information. # # Do not alter lines that begin with ##, they are used when upgrading # this configuration. # # authmysqlrc created from authmysqlrc.dist by sysconftool # # DO NOT INSTALL THIS FILE with world read permissions. This file # might contain the MySQL admin password! # # Each line in this file must follow the following format: # # field[spaces|tabs]value # # That is, the name of the field, followed by spaces or tabs, followed by # field value. Trailing spaces are prohibited.
##NAME: LOCATION:0 # # The server name, userid, and password used to log in.
##NAME: MYSQL_SOCKET:0 # # MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the # filesystem pipe used for the connection # # MYSQL_SOCKET /var/mysql/mysql.sock
##NAME: MYSQL_PORT:0 # # MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to # connect to.
MYSQL_PORT 3306
##NAME: MYSQL_OPT:0 # # Leave MYSQL_OPT as 0, unless you know what you're doing.
MYSQL_OPT 0
##NAME: MYSQL_DATABASE:0 # # The name of the MySQL database we will open:
MYSQL_DATABASE postfix
##NAME: MYSQL_USER_TABLE:0 # # The name of the table containing your user data. See README.authmysqlrc # for the required fields in this table.
MYSQL_USER_TABLE users
##NAME: MYSQL_CRYPT_PWFIELD:0 # # Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both # are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext # passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow # CRAM-MD5 authentication to be implemented.
##NAME: MYSQL_DEFAULT_DOMAIN:0 # # If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user', # we will look up 'user@DEFAULT_DOMAIN' instead. # # # DEFAULT_DOMAIN example.com
##NAME: MYSQL_UID_FIELD:0 # # Other fields in the mysql table: # # MYSQL_UID_FIELD - contains the numerical userid of the account # MYSQL_UID_FIELD uid
##NAME: MYSQL_GID_FIELD:0 # # Numerical groupid of the account
MYSQL_GID_FIELD gid
##NAME: MYSQL_LOGIN_FIELD:0 # # The login id, default is id. Basically the query is: # # SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid' #
MYSQL_LOGIN_FIELD email
##NAME: MYSQL_HOME_FIELD:0 #
MYSQL_HOME_FIELD homedir
##NAME: MYSQL_NAME_FIELD:0 # # The user's name (optional)
MYSQL_NAME_FIELD name
##NAME: MYSQL_MAILDIR_FIELD:0 # # This is an optional field, and can be used to specify an arbitrary # location of the maildir for the account, which normally defaults to # $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD). # # You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this # out. # MYSQL_MAILDIR_FIELD maildir
##NAME: MYSQL_QUOTA_FIELD:0 # # Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally # specify a maildir quota. See README.maildirquota for more information # # MYSQL_QUOTA_FIELD quota
##NAME: MYSQL_WHERE_CLAUSE:0 # # This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary # fixed string that is appended to the WHERE clause of our query # # MYSQL_WHERE_CLAUSE server='mailhost.example.com'
##NAME: MYSQL_SELECT_CLAUSE:0 # # (EXPERIMENTAL) # This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database, # which is structuraly different from proposed. The fixed string will # be used to do a SELECT operation on database, which should return fields # in order specified bellow: # # username, cryptpw, uid, gid, clearpw, home, maildir, quota, fullname # # Enabling this option causes ignorance of any other field-related # options, excluding default domain. # # There are two variables, which you can use. Substitution will be made # for them, so you can put entered username (local part) and domain name # in the right place of your query. These variables are: # $(local_part) and $(domain) # # If a $(domain) is empty (not given by the remote user) the default domain # name is used in its place. # # This example is a little bit modified adaptation of vmail-sql # database scheme: # # MYSQL_SELECT_CLAUSE SELECT popbox.local_part, \ # CONCAT('{MD5}', popbox.password_hash), \ # popbox.clearpw, \ # domain.uid, \ # domain.gid, \ # CONCAT(domain.path, '/', popbox.mbox_name), \ # '', \ # domain.quota, \ # '', \ # FROM popbox, domain \ # WHERE popbox.local_part = '$(local_part)' \ # AND popbox.domain_name = '$(domain)' \ # AND popbox.domain_name = domain.domain_name # ##NAME: MYSQL_CHPASS_CLAUSE:0 # # (EXPERIMENTAL) # This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database, # which is structuraly different from proposed. The fixed string will # be used to do an UPDATE operation on database. In other words, it is # used, when changing password. # # There are four variables, which you can use. Substitution will be made # for them, so you can put entered username (local part) and domain name # in the right place of your query. There variables are: # $(local_part) , $(domain) , $(newpass) , $(newpass_crypt) # # If a $(domain) is empty (not given by the remote user) the default domain # name is used in its place. # $(newpass) contains plain password # $(newpass_crypt) contains its crypted form # # MYSQL_CHPASS_CLAUSE UPDATE popbox \ # SET clearpw='$(newpass)', \ # password_hash='$(newpass_crypt)' \ # WHERE local_part='$(local_part)' \ # AND domain_name='$(domain)' #
ved ikke om det kan hjælpe lidt på om der er noget galt nogensteder ??
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.