MichaelT
Anmeldungsdatum: 17. Januar 2017
Beiträge: Zähle...
|
Hallo allerseits, ich habe nach dieser Anleitung einen Mailserver auf meinem Ubuntu installiert: https://www.exratione.com/2016/05/a-mailserver-on-ubuntu-16-04-postfix-dovecot-mysql/ Beim Testen ist mir aufgefallen, dass ich im mail.log folgende Meldung finde: | postfix/cleanup[11088]: warning: connect to mysql server 127.0.0.1: Access denied for user 'mail'@'localhost' (using password: NO)
|
Das finde ich doch irgendwie eigenartig. Das bedeutet doch, dass postfix gar kein Passwort an MySQL übergibt, oder? Ich habe in den cf-Dateien, die im Guide erwähnt werden, aber überall die gleichen Angaben gemacht und natürlich auch postfix mehrfach neu gestartet. Ich bin im Moment echt überfragt, wo ich noch weiter gucken soll...
|
misterunknown
Ehemalige
Anmeldungsdatum: 28. Oktober 2009
Beiträge: 4403
Wohnort: Sachsen
|
MichaelT schrieb: Das finde ich doch irgendwie eigenartig. Das bedeutet doch, dass postfix gar kein Passwort an MySQL übergibt, oder?
Richtig.
Ich habe in den cf-Dateien, die im Guide erwähnt werden, aber überall die gleichen Angaben gemacht und natürlich auch postfix mehrfach neu gestartet.
Wie sieht denn deine Konfiguration aus?
|
MichaelT
(Themenstarter)
Anmeldungsdatum: 17. Januar 2017
Beiträge: 6
|
Hey, danke für die schnelle Antwort. Ich habe bei den Configs erst als hosts = 127.0.0.1 drin, danach habe ich das mal auf localhost geändert. Hat aber beides nicht geklappt... Hier sind die Configs main.cf:
(Bei "meinedomain.de" steht meine echte Domain drin) 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184 | # See /usr/share/postfix/main.cf.dist for a commented, more complete version
# The first text sent to a connecting process.
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
readme_directory = no
# ---------------------------------
# SASL parameters
# ---------------------------------
# Use Dovecot to authenticate.
smtpd_sasl_type = dovecot
# Referring to /var/spool/postfix/private/auth
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes
# ---------------------------------
# TLS parameters
# ---------------------------------
# The default snakeoil certificate. Comment if using a purchased
# SSL certificate.
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
# Uncomment if using a purchased SSL certificate.
# smtpd_tls_cert_file=/etc/ssl/certs/example.com.crt
# smtpd_tls_key_file=/etc/ssl/private/example.com.key
# The snakeoil self-signed certificate has no need for a CA file. But
# if you are using your own SSL certificate, then you probably have
# a CA certificate bundle from your provider. The path to that goes
# here.
# smtpd_tls_CAfile=/etc/ssl/certs/ca-bundle.crt
# Ensure we're not using no-longer-secure protocols.
smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# Note that forcing use of TLS is going to cause breakage - most mail servers
# don't offer it and so delivery will fail, both incoming and outgoing. This is
# unfortunate given what various governmental agencies are up to these days.
#
# Enable (but don't force) all incoming smtp connections to use TLS.
smtpd_tls_security_level = may
# Enable (but don't force) all outgoing smtp connections to use TLS.
smtp_tls_security_level = may
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
# ---------------------------------
# TLS Updates relating to Logjam SSL attacks.
# See: https://weakdh.org/sysadmin.html
# ---------------------------------
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
smtpd_tls_dh1024_param_file = /etc/ssl/private/dhparams.pem
# ---------------------------------
# SMTPD parameters
# ---------------------------------
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# will it be a permanent error or temporary
unknown_local_recipient_reject_code = 450
# how long to keep message on queue before return as failed.
maximal_queue_lifetime = 7d
# max and min time in seconds between retries if connection failed
minimal_backoff_time = 1000s
maximal_backoff_time = 8000s
# how long to wait when servers connect before receiving rest of data
smtp_helo_timeout = 60s
# how many address can be used in one message.
# effective stopper to mass spammers, accidental copy in whole address list
# but may restrict intentional mail shots.
smtpd_recipient_limit = 16
# how many error before back off.
smtpd_soft_error_limit = 3
# how many max errors before blocking it.
smtpd_hard_error_limit = 12
# This next set are important for determining who can send mail and relay mail
# to other servers. It is very important to get this right - accidentally producing
# an open relay that allows unauthenticated sending of mail is a Very Bad Thing.
#
# You are encouraged to read up on what exactly each of these options accomplish.
# Requirements for the HELO statement
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
# Requirements for the sender details. Note that the order matters.
# E.g. see http://jimsun.linxnet.com/misc/restriction_order_prelim-03.txt
smtpd_sender_restrictions = permit_mynetworks, reject_authenticated_sender_login_mismatch, permit_sasl_authenticated, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
# Requirements for the connecting server
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl
# Requirement for the recipient address. Note that the entry for
# "check_policy_service inet:127.0.0.1:10023" enables Postgrey.
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, check_policy_service unix:private/policy-spf, check_policy_service inet:127.0.0.1:10023, permit
smtpd_data_restrictions = reject_unauth_pipelining
# This is a new option as of Postfix 2.10, and is required in addition to
# smtpd_recipient_restrictions for things to work properly in this setup.
smtpd_relay_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, check_policy_service unix:private/policy-spf, check_policy_service inet:127.0.0.1:10023, permit
# require proper helo at connections
smtpd_helo_required = yes
# waste spammers time before rejecting them
smtpd_delay_reject = yes
disable_vrfy_command = yes
# ---------------------------------
# General host and delivery info
# ----------------------------------
myhostname = meinedomain.de
myorigin = $mydomain
# Some people see issues when setting mydestination explicitly to the server
# subdomain, while leaving it empty generally doesn't hurt. So it is left empty here.
# mydestination = mail.example.com, localhost
mydestination = $myhostname localhost.$mydomain $mydomain
# If you have a separate web server that sends outgoing mail through this
# mailserver, you may want to add its IP address to the space-delimited list in
# mynetworks, e.g. as 10.10.10.10/32.
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mynetworks_style = host
# This specifies where the virtual mailbox folders will be located.
virtual_mailbox_base = /var/vmail
# This is for the mailbox location for each user. The domainaliases
# map allows us to make use of Postfix Admin's domain alias feature.
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/mysql_virtual_mailbox_domainaliases_maps.cf
# and their user id
virtual_uid_maps = static:150
# and group id
virtual_gid_maps = static:8
# This is for aliases. The domainaliases map allows us to make
# use of Postfix Admin's domain alias feature.
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/mysql_virtual_alias_domainaliases_maps.cf
# This is for domain lookups.
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
# Used in conjunction with reject_authenticated_sender_login_mismatch to
# verify that the sender is sending with their own address, or with one
# of the aliases mapped to that address.
smtpd_sender_login_maps = mysql:/etc/postfix/mysql_virtual_sender_login_maps.cf
# ---------------------------------
# Integration with other packages
# ---------------------------------------
# Tell postfix to hand off mail to the definition for dovecot in master.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
# Use amavis for virus and spam scanning
content_filter = amavis:[127.0.0.1]:10024
# Settings for checking SPF to cut down spam.
policy-spf_time_limit = 3600s
# ---------------------------------
# Header manipulation
# --------------------------------------
# Getting rid of unwanted headers. See: https://posluns.com/guides/header-removal/
header_checks = regexp:/etc/postfix/header_checks
# getting rid of x-original-to
enable_original_recipient = no
|
master.cf:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156 | #
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
smtp inet n - y - - smtpd
#smtp inet n - y - 1 postscreen
#smtpd pass - - y - - smtpd
#dnsblog unix - - y - 0 dnsblog
#tlsproxy unix - - y - 0 tlsproxy
# SMTP with TLS on port 587. Currently commented.
#submission inet n - y - - smtpd
# -o syslog_name=postfix/submission
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_enforce_tls=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject_unauth_destination,reject
# -o smtpd_sasl_tls_security_options=noanonymous
# SMTP over SSL on port 465.
smtps inet n - y - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_tls_auth_only=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject_unauth_destination,reject
-o smtpd_sasl_security_options=noanonymous,noplaintext
-o smtpd_sasl_tls_security_options=noanonymous
#628 inet n - y - - qmqpd
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
#qmgr unix n - n 300 1 oqmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
# The next two entries integrate with Amavis for anti-virus/spam checks.
amavis unix - - y - 3 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
# Integration with Dovecot - hand mail over to it for local delivery, and
# run the process under the vmail user and mail group.
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/dovecot-lda -d $(recipient)
# Integration with the SPF check package.
policy-spf unix - n n - - spawn
user=nobody argv=/usr/bin/policyd-spf
|
mysql_virtual_alias_domainaliases_maps.cf | user = mail
password = passwort
hosts = localhost
dbname = mail
query = SELECT goto FROM alias,alias_domain
WHERE alias_domain.alias_domain = '%d'
AND alias.address=concat('%u', '@', alias_domain.target_domain)
AND alias.active = 1
|
mysql_virtual_alias_maps.cf | user = mail
passwort = passwort
hosts = localhost
dbname = mail
table = alias
select_field = goto
where_field = address
additional_conditions = and active = '1'
|
mysql_virtual_domains_maps.cf | user = mail
password = passwort
hosts = localhost
dbname = mail
table = domain
select_field = domain
where_field = domain
additional_conditions = and backupmx = '0' and active = '1'
|
mysql_virtual_mailbox_domainaliases_maps.cf | user = mail
password = passwort
hosts = localhost
dbname = mail
query = SELECT maildir FROM mailbox, alias_domain
WHERE alias_domain.alias_domain = '%d'
AND mailbox.username=concat('%u', '@', alias_domain.target_domain )
AND mailbox.active = 1
|
mysql_virtual_mailbox_maps.cf | user = mail
password = passwort
hosts = localhost
dbname = mail
table = mailbox
select_field = CONCAT(domain, '/', local_part)
where_field = username
additional_conditions = and active = '1'
|
mysql_virtual_sender_login_maps.cf | user = mail
password = passwort
hosts = localhost
dbname = mail
query = SELECT goto FROM alias WHERE address ='%s'
|
|
misterunknown
Ehemalige
Anmeldungsdatum: 28. Oktober 2009
Beiträge: 4403
Wohnort: Sachsen
|
Ich kann keinen Fehler erkennen. Kommt die Fehlermeldung immer noch?
|
MichaelT
(Themenstarter)
Anmeldungsdatum: 17. Januar 2017
Beiträge: 6
|
Ok, das beruhigt mich zum Teil - andererseits... naja.
Er sagt mir immer noch ein Verbindungsproblem mit MySQL an: Mail.log: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | postfix/anvil[18935]: statistics: max connection rate 1/60s for (smtp:2003:5b:4761:4ab6:f92a:991e:7cb0:cfd) at Jan 18 12:05:45
postfix/anvil[18935]: statistics: max connection count 1 for (smtp:2003:5b:4761:4ab6:f92a:991e:7cb0:cfd) at Jan 18 12:05:45
postfix/anvil[18935]: statistics: max cache size 1 at Jan 18 12:05:45
postfix/smtpd[18994]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
postfix/smtpd[18994]: connect from localhost[::1]
postfix/smtpd[18994]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: Disconnected, session=</7A3e1xGiJUAAAAAAAAAAAAAAAAAAAAB>
postfix/smtpd[18994]: connect from p2003005B47614AB6F92A991E7CB00CFD.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]
postfix/smtpd[18994]: Anonymous TLS connection established from p2003005b47614ab6f92a991e7cb00cfd.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
postfix/trivial-rewrite[19010]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[19010]: warning: virtual_mailbox_domains: mysql:/etc/postfix/mysql_virtual_domains_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains lookup failure
postfix/smtpd[18994]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/smtpd[18994]: warning: mysql:/etc/postfix/mysql_virtual_sender_login_maps.cf lookup error for "info@helfende-energien.de"
postfix/smtpd[18994]: NOQUEUE: reject: RCPT from p2003005B47614AB6F92A991E7CB00CFD.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]: 451 4.3.0 <info@helfende-energien.de>: Temporary lookup failure; from=<info@helfende-energien.de> to=<m.tempel@freenet.de> proto=ESMTP helo=<[IPv6:2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]>
postfix/smtpd[18994]: disconnect from p2003005B47614AB6F92A991E7CB00CFD.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 quit=1 commands=6/7
postfix/smtpd[18994]: connect from mout0.freenet.de[195.4.92.90]
postfix/smtpd[18994]: Anonymous TLS connection established from mout0.freenet.de[195.4.92.90]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
postfix/smtpd[18994]: NOQUEUE: reject: RCPT from mout0.freenet.de[195.4.92.90]: 451 4.3.0 <m.tempel@freenet.de>: Temporary lookup failure; from=<m.tempel@freenet.de> to=<info@helfende-energien.de> proto=ESMTP helo=<mout0.freenet.de>
postfix/smtpd[18994]: disconnect from mout0.freenet.de[195.4.92.90] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
postfix/smtpd[18994]: connect from localhost[::1]
postfix/smtpd[18994]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: Disconnected, session=<OCtfglxG+6kAAAAAAAAAAAAAAAAAAAAB>
postfix/smtpd[19018]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
postfix/smtpd[19018]: connect from localhost[::1]
postfix/smtpd[19018]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: Disconnected, session=<n9eGiVxGm78AAAAAAAAAAAAAAAAAAAAB>
|
Im mysql error.log finde ich spezifisch zu meinem neuesten Versuch vor ein paar Minuten eben gar nichts, allerdings sehe ich alle zwei Minuten | [Note:] Access denied for user ''@'localhost' (using password: NO)
|
|
frechdachs
Anmeldungsdatum: 3. Juni 2013
Beiträge: 120
|
MichaelT schrieb: Ok, das beruhigt mich zum Teil - andererseits... naja.
Er sagt mir immer noch ein Verbindungsproblem mit MySQL an: Mail.log: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | postfix/anvil[18935]: statistics: max connection rate 1/60s for (smtp:2003:5b:4761:4ab6:f92a:991e:7cb0:cfd) at Jan 18 12:05:45
postfix/anvil[18935]: statistics: max connection count 1 for (smtp:2003:5b:4761:4ab6:f92a:991e:7cb0:cfd) at Jan 18 12:05:45
postfix/anvil[18935]: statistics: max cache size 1 at Jan 18 12:05:45
postfix/smtpd[18994]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
postfix/smtpd[18994]: connect from localhost[::1]
postfix/smtpd[18994]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: Disconnected, session=</7A3e1xGiJUAAAAAAAAAAAAAAAAAAAAB>
postfix/smtpd[18994]: connect from p2003005B47614AB6F92A991E7CB00CFD.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]
postfix/smtpd[18994]: Anonymous TLS connection established from p2003005b47614ab6f92a991e7cb00cfd.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
postfix/trivial-rewrite[19010]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[19010]: warning: virtual_mailbox_domains: mysql:/etc/postfix/mysql_virtual_domains_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains lookup failure
postfix/smtpd[18994]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/smtpd[18994]: warning: mysql:/etc/postfix/mysql_virtual_sender_login_maps.cf lookup error for "info@helfende-energien.de"
postfix/smtpd[18994]: NOQUEUE: reject: RCPT from p2003005B47614AB6F92A991E7CB00CFD.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]: 451 4.3.0 <info@helfende-energien.de>: Temporary lookup failure; from=<info@helfende-energien.de> to=<m.tempel@freenet.de> proto=ESMTP helo=<[IPv6:2003:5b:4761:4ab6:f92a:991e:7cb0:cfd]>
postfix/smtpd[18994]: disconnect from p2003005B47614AB6F92A991E7CB00CFD.dip0.t-ipconnect.de[2003:5b:4761:4ab6:f92a:991e:7cb0:cfd] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 quit=1 commands=6/7
postfix/smtpd[18994]: connect from mout0.freenet.de[195.4.92.90]
postfix/smtpd[18994]: Anonymous TLS connection established from mout0.freenet.de[195.4.92.90]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
postfix/smtpd[18994]: NOQUEUE: reject: RCPT from mout0.freenet.de[195.4.92.90]: 451 4.3.0 <m.tempel@freenet.de>: Temporary lookup failure; from=<m.tempel@freenet.de> to=<info@helfende-energien.de> proto=ESMTP helo=<mout0.freenet.de>
postfix/smtpd[18994]: disconnect from mout0.freenet.de[195.4.92.90] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
postfix/smtpd[18994]: connect from localhost[::1]
postfix/smtpd[18994]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: Disconnected, session=<OCtfglxG+6kAAAAAAAAAAAAAAAAAAAAB>
postfix/smtpd[19018]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
postfix/smtpd[19018]: connect from localhost[::1]
postfix/smtpd[19018]: disconnect from localhost[::1] ehlo=1 quit=1 commands=2
dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: Disconnected, session=<n9eGiVxGm78AAAAAAAAAAAAAAAAAAAAB>
|
Im mysql error.log finde ich spezifisch zu meinem neuesten Versuch vor ein paar Minuten eben gar nichts, allerdings sehe ich alle zwei Minuten | [Note:] Access denied for user ''@'localhost' (using password: NO)
|
Hallo MichaelT, im ersten Schritt würde ich mal probieren, ob Du als Benutzer "mail" auf die MySQL-Datenbank zugreifen kannst: mysql -umail -p Dann: use mail;
select * from mailbox; Dann siehst Du schon mal, ob der Benutzer mail auf die Datenbank überhaupt zugreifen darf. Kann es sein, dass Du in der SQL-Konfiguration (mysql_virtual_mailbox_domainaliases_maps.cf und andere) teilweise den Tabellennamen nicht angegeben hast ("table = ....")? Ansonsten noch eine Warnung: Ein Mailserver ist wirklich kein Spielzeug! Kauf Dir lieber ein gutes Buch (z.B. von Peer Heinlein) und arbeite es von Anfang bis Ende in Ruhe durch! Gruß, frechdachs
|
misterunknown
Ehemalige
Anmeldungsdatum: 28. Oktober 2009
Beiträge: 4403
Wohnort: Sachsen
|
MichaelT schrieb: Ok, das beruhigt mich zum Teil
Das sollte es nicht – das heißt ja nicht, dass kein Fehler drin ist.
Er sagt mir immer noch ein Verbindungsproblem mit MySQL an:
postfix/trivial-rewrite[19010]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[19010]: warning: virtual_mailbox_domains: mysql:/etc/postfix/mysql_virtual_domains_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem
postfix/trivial-rewrite[19010]: warning: virtual_alias_domains lookup failure
postfix/smtpd[18994]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/smtpd[18994]: warning: mysql:/etc/postfix/mysql_virtual_sender_login_maps.cf lookup error for "info@helfende-energien.de"
Das hier sieht ungut aus. Offensichtlich kann Postfix sich nicht zum MySQL-Server verbinden. Läuft der Server? Ist der Socket da?
namei -l /var/run/mysqld/mysqld.sock
Im mysql error.log finde ich spezifisch zu meinem neuesten Versuch vor ein paar Minuten eben gar nichts, allerdings sehe ich alle zwei Minuten
| [Note:] Access denied for user ''@'localhost' (using password: NO)
|
Hast du ein Monitoring-System, wie beispielsweise Icinga, laufen? Wenn ja könnte das der MySQL-Check sein.
|
MichaelT
(Themenstarter)
Anmeldungsdatum: 17. Januar 2017
Beiträge: 6
|
Hallo ihr beiden, ob der besagte user darauf zugreifen kann habe ich als erstes probiert. Wenn ich das Ganze manuell ausführe, geht es auch: Befehle der /etc/postfix/mysql_virtual_alias_maps.cf 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | micha@xxx:/etc/postfix$ mysql -umail -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6956
Server version: 5.7.16-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mail;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from alias;
+---------------------------------+----------------------------+----------------------+---------------------+---------------------+--------+
| address | goto | domain | created | modified | active |
+---------------------------------+----------------------------+----------------------+---------------------+---------------------+--------+
| abuse@meinedomain.de | info@meinedomain.de | meinedomain.de | 2017-01-15 20:08:28 | 2017-01-17 13:55:32 | 1 |
| hostmaster@meinedomain.de | info@meinedomain.de | meinedomain.de | 2017-01-15 20:08:28 | 2017-01-17 13:55:42 | 1 |
| postmaster@meinedomain.de | info@meinedomain.de | meinedomain.de | 2017-01-15 20:08:28 | 2017-01-17 13:55:51 | 1 |
| webmaster@meinedomain.de | info@meinedomain.de | meinedomain.de | 2017-01-15 20:08:28 | 2017-01-17 13:55:57 | 1 |
| admin@meinedomain.de | admin@meinedomain.de | meinedomain.de | 2017-01-15 20:12:56 | 2017-01-16 20:39:52 | 1 |
| info@meinedomain.de | info@meinedomain.de | meinedomain.de | 2017-01-16 20:59:42 | 2017-01-16 20:59:42 | 1 |
+---------------------------------+----------------------------+----------------------+---------------------+---------------------+--------+
6 rows in set (0.02 sec)
|
Wenn in der .cf kein "table" hinterlegt ist, lese ich aus den Abfragen, dass er sich die Daten aus mehreren tables holt, weswegen eine bestimmte Tabelle nicht angegeben werden muss. Im Guide ist das jedenfalls genau so hinterlegt und bei vielen hat es so geklappt. ☺
Das sollte es nicht – das heißt ja nicht, dass kein Fehler drin ist.
Naja wenn wir schon zu dritt keinen Fehler in den cfs gefunden haben, ist das doch schon mal was. Heißt zumindest, dass ich keinen Kopierfehler gemacht habe. Dass es immer noch nicht funktioniert ist natürlich wenig befriedigend, so ist der Fehler natürlich schwerer zu finden. Das mit dem Check macht Sinn, ich habe "monit" installiert. Schaue ich mir nochmal an. namei sagt: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | namei -l /var/run/mysqld/mysqld.sock
f: /var/run/mysqld/mysqld.sock
drwxr-xr-x root root /
drwxr-xr-x root root var
lrwxrwxrwx root root run -> /run
drwxr-xr-x root root /
drwxr-xr-x root root run
drwxr-xr-x mysql mysql mysqld
srwxrwxrwx mysql mysql mysqld.sock
xxx@yyy:/var/log# namei -l /run/mysqld/mysqld.sock
f: /run/mysqld/mysqld.sock
drwxr-xr-x root root /
drwxr-xr-x root root run
drwxr-xr-x mysql mysql mysqld
srwxrwxrwx mysql mysql mysqld.sock
|
Ich habe das mal zweimal ausgeführt, weil /var/run ein SymLink auf /run ist. Die Datei ist also vorhanden. Ich habe mal alle mail-beteiligten server inkl. mysql neu gestartet. jetzt bleibt das mail.log leer, ich erhalte immer noch im mailprogramm "temporary lookup failure", und im mysql.log steht wieder Access denied for 'mail'@localhost' (using password: NO) und Access denied for @'localhost' (using password: NO)
Ich habe in monit die überwachung vom MySQL mal deaktiviert und monit neu gestartet. mal sehen, ob die logs später noch Hinweise bereithalten.
|
misterunknown
Ehemalige
Anmeldungsdatum: 28. Oktober 2009
Beiträge: 4403
Wohnort: Sachsen
|
MichaelT schrieb: Ich habe das mal zweimal ausgeführt, weil /var/run ein SymLink auf /run ist. Die Datei ist also vorhanden.
Die Ausgaben von namei sind ok, der Postfix-User müsste auf den Socket zugreifen können.
Ich habe mal alle mail-beteiligten server inkl. mysql neu gestartet. jetzt bleibt das mail.log leer, ich erhalte immer noch im mailprogramm "temporary lookup failure", und im mysql.log steht wieder Access denied for 'mail'@localhost' (using password: NO) und Access denied for @'localhost' (using password: NO)
Du kannst versuchen mal testweise die Datenbankverbindung von "localhost" auf "127.0.0.1" umzustellen. Wenn du das machst, versucht Postfix nicht über den Socket zuzugreifen, sondern macht eine Netzwerkverbindung zu MySQL auf. Du musst natürlich beachten, dass das ein anderer Nutzer ist, ggf. müsstest du ihn erst anlegen (CREATE USER 'mail'@'127.0.0.1' …).
|
MichaelT
(Themenstarter)
Anmeldungsdatum: 17. Januar 2017
Beiträge: 6
|
Klappt leider immer noch nicht. Ich geb's auf... Das kostet mich schon mehr Nerven als ich wollte. Ich werde alles Mailbezogene purgen und mit nem anderen Guide nochmal ganz von vorne anfangen. Ich danke dir trotzdem für die Hilfe, vielleicht komme ich ja nach dem nächsten Guide wieder. 😉
|
misterunknown
Ehemalige
Anmeldungsdatum: 28. Oktober 2009
Beiträge: 4403
Wohnort: Sachsen
|
MichaelT schrieb: Klappt leider immer noch nicht. Ich geb's auf... Das kostet mich schon mehr Nerven als ich wollte.
Nun, das ist so, wenn man einen eigenen Mailserver betreiben will. Das ist nichts triviales, im Gegenteil. Nerven wird das also immer kosten.
|
MichaelT
(Themenstarter)
Anmeldungsdatum: 17. Januar 2017
Beiträge: 6
|
Hehe, ja und weil ich das nicht leichtfertig machen will, mache ich lieber alles nochmal von vorne. Ich bastel ja echt gerne, aber Ergebnisse müssen zwischendurch schon mal sein. 😉
|
VolkerRaschek
Anmeldungsdatum: 19. August 2014
Beiträge: 358
Wohnort: Eifel
|
MichaelT schrieb: Hehe, ja und weil ich das nicht leichtfertig machen will, mache ich lieber alles nochmal von vorne. Ich bastel ja echt gerne, aber Ergebnisse müssen zwischendurch schon mal sein. 😉
Ich habe gesehen, dass du die Datenbank von Postfixadmin nutzt um die Mailkonten zu verwalten, wahrscheinlich dann auch Postfixadmin als Administrationsoberfläche. Wenn du schon alles neu machst, dass nutze kein Tutorial von irgendeinem Blogger sondern das offizielle repo auf github.com Je nach Tutorial ändert der Blogger die mysql.cf Dateien ab. Ich würde jedoch die originalen nutzen die hier beschrieben sind. Das sollte dir später einiges an leid ersparen 😉 Grüße Volker
|