Herr Bert
19.03.08, 10:17
Hallo.
Ich möchte einen MTA auf einem Server aufsetzen und habe mich für postfix entschieden.
Server ist ein Debian Etch 32-Bit.
Nun habe ich natürlich nach Anleitungen gesucht, und bin auf diese beiden gestoßen, nach denen ich mich gerichtet habe:
http://workaround.org/articles/ispmail-sarge/index.shtml.de
http://www.huschi.net/4_111_de.html
Ich habe es erst mit dem Ersten versucht und dann Änderungen vom 2. vorgenommen, aber keins von beiden funktioniert mit meiner Konfiguration.
Mein Problem ist nun, dass ich immer Fehlermeldungen bekomme.
D.h. Wenn ich mich mit telnet einklinke und eine mail versenden möchte. Ich zeige mal beide Beispiele mit den Ergebnissen:
(Überall wo xxx steht habe ich den domainnamen ersetzt)
1.
127:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxx ESMTP Postfix (Debian/GNU)
ehlo workaround.org
250-xxx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
250-AUTH=CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<test@workaround.org>
250 2.1.0 Ok
rcpt to:<user@virtual.test>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
testinhalt
.
250 2.0.0 Ok: queued as 056EC238814E
quit
221 2.0.0 Bye
Connection closed by foreign host.
/var/log/mail.log zu 1.:
Mar 19 10:45:30 127 postfix/smtpd[24284]: connect from localhost[127.0.0.1]
Mar 19 10:45:55 127 postfix/smtpd[24284]: 056EC238814E: client=localhost[127.0.0.1]
Mar 19 10:46:00 127 postfix/cleanup[24288]: 056EC238814E: message-id=<20080319094555.056EC238814E@xxx>
Mar 19 10:46:00 127 postfix/qmgr[24282]: 056EC238814E: from=<test@workaround.org>, size=345, nrcpt=1 (queue active)
Mar 19 10:46:00 127 postfix/virtual[24289]: warning: valid_hostname: numeric hostname: 127.0.0.1
Mar 19 10:46:00 127 postfix/virtual[24289]: fatal: unable to use my own hostname
Mar 19 10:46:01 127 postfix/qmgr[24282]: warning: premature end-of-input on private/virtual socket while reading input attribute name
Mar 19 10:46:01 127 postfix/qmgr[24282]: warning: private/virtual socket: malformed response
Mar 19 10:46:01 127 postfix/qmgr[24282]: warning: transport virtual failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 19 10:46:01 127 postfix/master[24276]: warning: process /usr/lib/postfix/virtual pid 24289 exit status 1
Mar 19 10:46:01 127 postfix/master[24276]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Mar 19 10:46:01 127 postfix/qmgr[24282]: 056EC238814E: to=<user@virtual.test>, relay=none, delay=11, delays=9.7/1.1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 19 10:46:01 127 postfix/smtpd[24284]: disconnect from localhost[127.0.0.1]
valid_hostname: numeric hostname: 127.0.0.1
Was ist damit gemient? in der config ist hostname auf den Domainnamen als String gesetzt.
2.
127:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxx ESMTP Postfix (Debian/GNU)
ehlo workaround.org
250-xxx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<test@workaround.org>
250 2.1.0 Ok
rcpt to:<user@virtual.test>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
testinhalt
.
250 2.0.0 Ok: queued as F1F05238814D
quit
221 2.0.0 Bye
Connection closed by foreign host.
/var/log/mail.log zu 2.:
Mar 19 10:34:39 127 postfix/smtpd[24063]: connect from localhost[127.0.0.1]
Mar 19 10:34:54 127 postfix/smtpd[24063]: F1F05238814D: client=localhost[127.0.0.1]
Mar 19 10:35:02 127 postfix/cleanup[24071]: F1F05238814D: message-id=<20080319093454.F1F05238814D@xxx>
Mar 19 10:35:02 127 postfix/qmgr[7944]: F1F05238814D: from=<test@workaround.org>, size=345, nrcpt=1 (queue active)
Mar 19 10:35:02 127 postfix/qmgr[7944]: F1F05238814D: to=<user@virtual.test>, relay=none, delay=12, delays=12/0/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 19 10:35:04 127 postfix/smtpd[24063]: disconnect from localhost[127.0.0.1]
Zum Vergleich poste ich mal die relevanten Unterschiede:
Methode der ersten Anleitung in /etc/postfix/sasl/smtpd.conf:
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
Methode der 2.:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
saslauthd_path: /var/run/saslauthd/mux
autotransition:true
hier mal die configs:
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
smtpd_use_tls=yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_alias_domains =
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
inet_interfaces = all
myhostname = xxx
mydestination = xxx, 127.0.0.1, localhost.0.0.1, localhost
myorigin = /etc/mailname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
/etc/courier/authdaemonrc
authmodulelist="authmysql"
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
daemons=5
authdaemonvar=/var/run/courier/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""
/etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD pw
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE users
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
/etc/postfix/sasl/smtpd.conf
#pwcheck_method: saslauthd
#mech_list: PLAIN LOGIN
#saslauthd_path: /var/run/saslauthd/mux
#autotransition:true
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: pw
sql_database: postfix
sql_select: select password from users where email='%u@%r'
log_level: 7
/etc/pam.d/smtp
#%PAM-1.0
@include common-auth
@include common-account
#@include common-password
auth required /lib/security/pam_unix_auth.so
account required /lib/security/pam_unix_acct.so
password required /lib/security/pam_unix_passwd.so
session required /lib/security/pam_unix_session.so
In /home/vmail existiert auch kein Verzeichnis namens "virtual.test".
vmail hat die ID 5000, ebenso die Gruppe und 5000 sind Benutzer und Gruppenbesitzer von /home/vmail.
Den Benutzer sasl habe ich der postfix Gruppe zugeordnet.
Kann jemand schätzen oder weiss jemand wo der Fehler liegt?
Welche der beiden Konfigurationen ist prinzipiell besser?
Wenn ich versuche mich mit thunderbird einzuloggen und mails abzurufen, bekomme ich folgendes in de mail.log:
Mar 19 11:08:39 127 courierpop3login: Connection, ip=[::ffff:91.15.143.6]
Mar 19 11:08:48 127 courierpop3login: LOGIN, user=test@xxx, ip=[::ffff:91.15.143.6]
Mar 19 11:08:48 127 courierpop3login: scancur opendir("cur"): No such file or directory
Die Ordner xxx und test darin habe ich von Hand angelegt, sonst sagt er mir no such file or directory.
Heisst das, ich muss die Ordner cur usw. alle von Hand anlegen?
Danke im Vorraus.
PS: Vorher bekam ich oft die Meldung "Relay Access Denied", die jetzt allerdings nicht mehr auftaucht.
Ich möchte einen MTA auf einem Server aufsetzen und habe mich für postfix entschieden.
Server ist ein Debian Etch 32-Bit.
Nun habe ich natürlich nach Anleitungen gesucht, und bin auf diese beiden gestoßen, nach denen ich mich gerichtet habe:
http://workaround.org/articles/ispmail-sarge/index.shtml.de
http://www.huschi.net/4_111_de.html
Ich habe es erst mit dem Ersten versucht und dann Änderungen vom 2. vorgenommen, aber keins von beiden funktioniert mit meiner Konfiguration.
Mein Problem ist nun, dass ich immer Fehlermeldungen bekomme.
D.h. Wenn ich mich mit telnet einklinke und eine mail versenden möchte. Ich zeige mal beide Beispiele mit den Ergebnissen:
(Überall wo xxx steht habe ich den domainnamen ersetzt)
1.
127:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxx ESMTP Postfix (Debian/GNU)
ehlo workaround.org
250-xxx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
250-AUTH=CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<test@workaround.org>
250 2.1.0 Ok
rcpt to:<user@virtual.test>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
testinhalt
.
250 2.0.0 Ok: queued as 056EC238814E
quit
221 2.0.0 Bye
Connection closed by foreign host.
/var/log/mail.log zu 1.:
Mar 19 10:45:30 127 postfix/smtpd[24284]: connect from localhost[127.0.0.1]
Mar 19 10:45:55 127 postfix/smtpd[24284]: 056EC238814E: client=localhost[127.0.0.1]
Mar 19 10:46:00 127 postfix/cleanup[24288]: 056EC238814E: message-id=<20080319094555.056EC238814E@xxx>
Mar 19 10:46:00 127 postfix/qmgr[24282]: 056EC238814E: from=<test@workaround.org>, size=345, nrcpt=1 (queue active)
Mar 19 10:46:00 127 postfix/virtual[24289]: warning: valid_hostname: numeric hostname: 127.0.0.1
Mar 19 10:46:00 127 postfix/virtual[24289]: fatal: unable to use my own hostname
Mar 19 10:46:01 127 postfix/qmgr[24282]: warning: premature end-of-input on private/virtual socket while reading input attribute name
Mar 19 10:46:01 127 postfix/qmgr[24282]: warning: private/virtual socket: malformed response
Mar 19 10:46:01 127 postfix/qmgr[24282]: warning: transport virtual failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 19 10:46:01 127 postfix/master[24276]: warning: process /usr/lib/postfix/virtual pid 24289 exit status 1
Mar 19 10:46:01 127 postfix/master[24276]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Mar 19 10:46:01 127 postfix/qmgr[24282]: 056EC238814E: to=<user@virtual.test>, relay=none, delay=11, delays=9.7/1.1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 19 10:46:01 127 postfix/smtpd[24284]: disconnect from localhost[127.0.0.1]
valid_hostname: numeric hostname: 127.0.0.1
Was ist damit gemient? in der config ist hostname auf den Domainnamen als String gesetzt.
2.
127:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 xxx ESMTP Postfix (Debian/GNU)
ehlo workaround.org
250-xxx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<test@workaround.org>
250 2.1.0 Ok
rcpt to:<user@virtual.test>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
testinhalt
.
250 2.0.0 Ok: queued as F1F05238814D
quit
221 2.0.0 Bye
Connection closed by foreign host.
/var/log/mail.log zu 2.:
Mar 19 10:34:39 127 postfix/smtpd[24063]: connect from localhost[127.0.0.1]
Mar 19 10:34:54 127 postfix/smtpd[24063]: F1F05238814D: client=localhost[127.0.0.1]
Mar 19 10:35:02 127 postfix/cleanup[24071]: F1F05238814D: message-id=<20080319093454.F1F05238814D@xxx>
Mar 19 10:35:02 127 postfix/qmgr[7944]: F1F05238814D: from=<test@workaround.org>, size=345, nrcpt=1 (queue active)
Mar 19 10:35:02 127 postfix/qmgr[7944]: F1F05238814D: to=<user@virtual.test>, relay=none, delay=12, delays=12/0/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 19 10:35:04 127 postfix/smtpd[24063]: disconnect from localhost[127.0.0.1]
Zum Vergleich poste ich mal die relevanten Unterschiede:
Methode der ersten Anleitung in /etc/postfix/sasl/smtpd.conf:
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
Methode der 2.:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
saslauthd_path: /var/run/saslauthd/mux
autotransition:true
hier mal die configs:
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
smtpd_use_tls=yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_alias_domains =
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
inet_interfaces = all
myhostname = xxx
mydestination = xxx, 127.0.0.1, localhost.0.0.1, localhost
myorigin = /etc/mailname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
/etc/courier/authdaemonrc
authmodulelist="authmysql"
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
daemons=5
authdaemonvar=/var/run/courier/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""
/etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD pw
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE users
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
/etc/postfix/sasl/smtpd.conf
#pwcheck_method: saslauthd
#mech_list: PLAIN LOGIN
#saslauthd_path: /var/run/saslauthd/mux
#autotransition:true
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: pw
sql_database: postfix
sql_select: select password from users where email='%u@%r'
log_level: 7
/etc/pam.d/smtp
#%PAM-1.0
@include common-auth
@include common-account
#@include common-password
auth required /lib/security/pam_unix_auth.so
account required /lib/security/pam_unix_acct.so
password required /lib/security/pam_unix_passwd.so
session required /lib/security/pam_unix_session.so
In /home/vmail existiert auch kein Verzeichnis namens "virtual.test".
vmail hat die ID 5000, ebenso die Gruppe und 5000 sind Benutzer und Gruppenbesitzer von /home/vmail.
Den Benutzer sasl habe ich der postfix Gruppe zugeordnet.
Kann jemand schätzen oder weiss jemand wo der Fehler liegt?
Welche der beiden Konfigurationen ist prinzipiell besser?
Wenn ich versuche mich mit thunderbird einzuloggen und mails abzurufen, bekomme ich folgendes in de mail.log:
Mar 19 11:08:39 127 courierpop3login: Connection, ip=[::ffff:91.15.143.6]
Mar 19 11:08:48 127 courierpop3login: LOGIN, user=test@xxx, ip=[::ffff:91.15.143.6]
Mar 19 11:08:48 127 courierpop3login: scancur opendir("cur"): No such file or directory
Die Ordner xxx und test darin habe ich von Hand angelegt, sonst sagt er mir no such file or directory.
Heisst das, ich muss die Ordner cur usw. alle von Hand anlegen?
Danke im Vorraus.
PS: Vorher bekam ich oft die Meldung "Relay Access Denied", die jetzt allerdings nicht mehr auftaucht.