ubuntuusers.de

Postfix mit Dovecot mail Empfang nicht möglich

Status: Gelöst | Ubuntu-Version: Ubuntu 10.04 (Lucid Lynx)
Antworten |

byspirit

Anmeldungsdatum:
28. Februar 2012

Beiträge: Zähle...

Hollo alle zusammen.

befor ich mich hier regestriert habe, habe ich schon viele gesucht nach den Antworten für mein Problem. Leider hats mir nichts weiter geholfen.

Bin leider neu was Linux und Mail Server angeht.

Zu meinem Problem:

Habe bei mir Postfix und Dovecot installiert und laut der Beschreibung http://wiki.nefarius.at/linux/der_perfekte_mail-server probiert zu kofigurieren.

Mail versenden ist ohne Probleme Möglich. Bei Empfang aber bekomme ich

<user@mydomain>: host mydomain[IP] said: 554 5.7.1 <user@mydomain>: Relay access denied (in reply to RCPT TO command)

Meine Konfigurationen:

/etc/dovecot/dovecot.conf

  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
base_dir = /var/run/dovecot
# Ich habe nur IMAP(S) in Verwendung, für POP3 einfach noch pop3 bzw. pop3s hinzufügen
protocols = imap imaps managesieve
# IMAP Konfiguration
protocol imap {
   listen = *:143
   # Quota Einstellungen
   mail_plugins = quota imap_quota
}
 
# einkommentieren, falls POP3 benötigt
protocol pop3 {
   listen = *:110
   # ssl_listen = *:995
   mail_plugins = quota
}
 
# managesieve Dienst zum Verwalten der Sieve-Skripte
protocol managesieve {
   listen = *:2000
   login_executable = /usr/lib/dovecot/managesieve-login
   mail_executable = /usr/lib/dovecot/managesieve
   managesieve_max_line_length = 65536
   managesieve_logout_format = bytes=%i/%o
   managesieve_implementation_string = dovecot
}
listen = *
# erzwinge AUTH mit STARTTLS
disable_plaintext_auth = yes
 
# logging Optionen
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
syslog_facility = mail
 
# mailbox Einstellungen
mail_location = maildir:/var/vmail/%d/%u
mail_privileged_group = mail
mail_debug = no
 
# gültig ist nur unser vmail-Besitzer
first_valid_uid = 150
last_valid_uid = 150
 
maildir_copy_with_hardlinks = yes
 
# IMAP Optionen
protocol imap {
  login_executable = /usr/lib/dovecot/imap-login
  mail_executable = /usr/lib/dovecot/imap
  imap_max_line_length = 65536
  mail_plugin_dir = /usr/lib/dovecot/modules/imap
}
 
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
 
# managesieve aktivieren
protocol managesieve {
}
 
# deliver aktivieren
protocol lda {
  postmaster_address = postmaster@example.com
  mail_plugins = quota sieve
  mail_plugin_dir = /usr/lib/dovecot/modules/lda
  deliver_log_format = msgid=%m: %$
  sendmail_path = /usr/lib/sendmail
  auth_socket_path = /var/run/dovecot/auth-master
}
 
auth_verbose = no
auth_debug = no
 
# Authentifizierungs-Info aus Datenbank
auth default {
  mechanisms = plain login
 
  passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }
 
  # steigert Performance mit Datenbank
  userdb prefetch {
  }
 
  userdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }
 
  user = nobody
 
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0660
 
      user = postfix
      group = mail
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}
 
# Quota-Info wird in Datenbank gespeichert
dict {
  quotadict = mysql:/etc/dovecot/dovecot-dict-sql.conf
  mail_debug = yes
}
 
# Quota & Sieve Konfiguration
plugin {
  quota = dict:user::proxy::quotadict
  quota_rule = *:storage=500MB
  sieve=~/dovecot.sieve
  sieve_dir=~/sieve
}

/etc/dovecot/dovecot-sql.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

driver = mysql

connect = "host=localhost dbname=postfix user=postfix password=password"

default_pass_scheme = MD5-CRYPT


user_query = "SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 8 AS gid, CONCAT('*:bytes=', CAST(quota AS CHAR)) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'"

password_query = "SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid, CONCAT('*:bytes=', CAST(quota AS CHAR)) AS  userdb_quota_rule FROM mailbox WHERE username = '%u' AND active = '1'"

/etc/postfix/main.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
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = $mydomain

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.mydomain
mydomain = mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
myorigin = $mydomain
inet_protocols = all

# Virtual mailbox settings
virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = 
    proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf,
    proxy:mysql:$config_directory/mysql_virtual_alias_domain_mailbox_maps.cf,
    proxy:mysql:$config_directory/mysql_virtual_alias_domain_catchall_maps.cf
virtual_alias_maps = 
    proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf,
    proxy:mysql:$config_directory/mysql_virtual_alias_domain_maps.cf
virtual_mailbox_limit = proxy:mysql:$config_directory/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
 
# SASL Authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
 
# No open relay!
smtpd_recipient_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
    permit

etc/postfix/ mysql_virtual_alias_maps.cf, mysql_virtual_domains_maps.cf, mysql_virtual_alias_domain_maps.cf, mysql_virtual_mailbox_limit_maps.cf, mysql_virtual_mailbox_maps.cf, mysql_virtual_alias_domain_mailbox_maps.cf, mysql_virtual_alias_domain_catchall_maps.cf

habe ich so wie in der Beschreibung übernommen. Nur Passwort, User und DB Name angepasst.

/var/vmail hat die Rechte: vmail:mail drwxrwx-– /etc/postfix hat die Rechte: root:root drwxr-xr-x /etc/dovecot hat die Rechte: root:root drwxr-xr-x

hoffe das genügt als Info.

Mit freundlichen Grüßen

byspirit

bodensee

Anmeldungsdatum:
4. November 2006

Beiträge: 1971

byspirit schrieb:

Zu meinem Problem:

Erstes Problem, eine grauenhafte Rechtschreibung........

Habe bei mir Postfix und Dovecot installiert und laut der Beschreibung http://wiki.nefarius.at/linux/der_perfekte_mail-server probiert zu kofigurieren.

Mailserver sind keine Server, die man mal eben so nebenbei aufsetzt und konfiguriert. Da gehört schon bedeutend mehr dazu - heisst also, lies Dich in die Materie ein!

<user@mydomain>: Relay access denied (in reply to RCPT TO command)

Glückwunsch, der Server ist erstmal sicher. Bedeutet aber, dass die ankommende Mail abgewiesen wird, weil der Versender nicht relayen darf. Jetzt wäre die Frage wo sich der Client, der diese Meldung erhält befindet?
Zu Relay access denied gibt es genügend Infos, die man z.B. per Google finden kann.

Meine Konfigurationen: /etc/dovecot/dovecot.conf

Interessiert bei diesem Problem erstmal nicht, da es ein Postfix Problem ist 😉

byspirit

(Themenstarter)

Anmeldungsdatum:
28. Februar 2012

Beiträge: 6

Sorry wegen Rechtschreibung.

Ist schon klar, dass ich Mail Server nicht einfach so mal aufsetzen kann.

Das Problem bei mir ist, dass ich nicht so viel Ahnung davon habe ☹ . Per google habe ich nichts finden können was Mir weiter helfen könnte:(

Ich habe die Email von web.de geschickt und das als Atwort bekommen.

Habe hier die Frage gestellt in der Hoffnung, dass ich nicht wieder auf google verwiesen werde.

TheDarkRose

Avatar von TheDarkRose

Anmeldungsdatum:
28. Juli 2010

Beiträge: 3459

byspirit schrieb:

Sorry wegen Rechtschreibung.

Halb so wild

Ist schon klar, dass ich Mail Server nicht einfach so mal aufsetzen kann.

Lernen, zuhause in einer VM

Ich habe die Email von web.de geschickt und das als Atwort bekommen.

Zeig die entsprechenden auschnitte aus dem logfile, sonst können wir nur rätselraten.

byspirit

(Themenstarter)

Anmeldungsdatum:
28. Februar 2012

Beiträge: 6

 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
Feb 28 00:33:04 u118 postfix/smtpd[19600]: connect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 00:33:04 u118 postfix/smtpd[19600]: connect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 00:33:05 u118 postfix/smtpd[19600]: NOQUEUE: reject: RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]: 554 5.7.1 <smtp@k888.tw>: Relay access denied; from=<k8fj899@kiss99.com> to=<smtp@k888.tw> proto=SMTP helo=<85.114.140.118>
Feb 28 00:33:05 u118 postfix/smtpd[19600]: NOQUEUE: reject: RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]: 554 5.7.1 <smtp@k888.tw>: Relay access denied; from=<k8fj899@kiss99.com> to=<smtp@k888.tw> proto=SMTP helo=<85.114.140.118>
Feb 28 00:33:05 u118 postfix/smtpd[19600]: lost connection after RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 00:33:05 u118 postfix/smtpd[19600]: lost connection after RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 00:33:05 u118 postfix/smtpd[19600]: disconnect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 00:33:05 u118 postfix/smtpd[19600]: disconnect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 00:36:25 u118 postfix/anvil[19603]: statistics: max connection rate 1/60s for (smtp:114.44.96.73) at Feb 28 00:33:04
Feb 28 00:36:25 u118 postfix/anvil[19603]: statistics: max connection rate 1/60s for (smtp:114.44.96.73) at Feb 28 00:33:04
Feb 28 00:36:25 u118 postfix/anvil[19603]: statistics: max connection count 1 for (smtp:114.44.96.73) at Feb 28 00:33:04
Feb 28 00:36:25 u118 postfix/anvil[19603]: statistics: max connection count 1 for (smtp:114.44.96.73) at Feb 28 00:33:04
Feb 28 00:36:25 u118 postfix/anvil[19603]: statistics: max cache size 1 at Feb 28 00:33:04
Feb 28 00:36:25 u118 postfix/anvil[19603]: statistics: max cache size 1 at Feb 28 00:33:04
Feb 28 01:52:03 u118 postfix/smtpd[19734]: connect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 01:52:03 u118 postfix/smtpd[19734]: connect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 01:52:04 u118 postfix/smtpd[19734]: NOQUEUE: reject: RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]: 554 5.7.1 <smtp@k888.tw>: Relay access denied; from=<k8fj899@kiss99.com> to=<smtp@k888.tw> proto=SMTP helo=<85.114.140.118>
Feb 28 01:52:04 u118 postfix/smtpd[19734]: NOQUEUE: reject: RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]: 554 5.7.1 <smtp@k888.tw>: Relay access denied; from=<k8fj899@kiss99.com> to=<smtp@k888.tw> proto=SMTP helo=<85.114.140.118>
Feb 28 01:52:04 u118 postfix/smtpd[19734]: lost connection after RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 01:52:04 u118 postfix/smtpd[19734]: lost connection after RCPT from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 01:52:04 u118 postfix/smtpd[19734]: disconnect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 01:52:04 u118 postfix/smtpd[19734]: disconnect from 114-44-96-73.dynamic.hinet.net[114.44.96.73]
Feb 28 01:55:24 u118 postfix/anvil[19737]: statistics: max connection rate 1/60s for (smtp:114.44.96.73) at Feb 28 01:52:03
Feb 28 01:55:24 u118 postfix/anvil[19737]: statistics: max connection rate 1/60s for (smtp:114.44.96.73) at Feb 28 01:52:03
Feb 28 01:55:24 u118 postfix/anvil[19737]: statistics: max connection count 1 for (smtp:114.44.96.73) at Feb 28 01:52:03
Feb 28 01:55:24 u118 postfix/anvil[19737]: statistics: max connection count 1 for (smtp:114.44.96.73) at Feb 28 01:52:03
Feb 28 01:55:24 u118 postfix/anvil[19737]: statistics: max cache size 1 at Feb 28 01:52:03
Feb 28 01:55:24 u118 postfix/anvil[19737]: statistics: max cache size 1 at Feb 28 01:52:03
Feb 28 09:22:06 u118 postfix/master[10625]: terminating on signal 15
Feb 28 09:22:06 u118 postfix/master[10625]: terminating on signal 15
Feb 28 09:22:06 u118 postfix/master[21516]: daemon started -- version 2.7.0, configuration /etc/postfix
Feb 28 09:22:06 u118 postfix/master[21516]: daemon started -- version 2.7.0, configuration /etc/postfix
Feb 28 09:22:26 u118 postfix/smtpd[21520]: connect from fmmailgate04.web.de[217.72.192.242]
Feb 28 09:22:26 u118 postfix/smtpd[21520]: connect from fmmailgate04.web.de[217.72.192.242]
Feb 28 09:22:26 u118 postfix/smtpd[21520]: NOQUEUE: reject: RCPT from fmmailgate04.web.de[217.72.192.242]: 554 5.7.1 <user@mydomain>: Relay access denied; from=<user@web.de> to=<user@mydomain> proto=ESMTP helo=<fmmailgate04.web.de>
Feb 28 09:22:26 u118 postfix/smtpd[21520]: NOQUEUE: reject: RCPT from fmmailgate04.web.de[217.72.192.242]: 554 5.7.1 <user@mydomain>: Relay access denied; from=<user@web.de> to=<user@mydomain> proto=ESMTP helo=<fmmailgate04.web.de>
Feb 28 09:22:26 u118 postfix/smtpd[21520]: disconnect from fmmailgate04.web.de[217.72.192.242]
Feb 28 09:22:26 u118 postfix/smtpd[21520]: disconnect from fmmailgate04.web.de[217.72.192.242]
Feb 28 09:25:46 u118 postfix/anvil[21523]: statistics: max connection rate 1/60s for (smtp:217.72.192.242) at Feb 28 09:22:26
Feb 28 09:25:46 u118 postfix/anvil[21523]: statistics: max connection rate 1/60s for (smtp:217.72.192.242) at Feb 28 09:22:26
Feb 28 09:25:46 u118 postfix/anvil[21523]: statistics: max connection count 1 for (smtp:217.72.192.242) at Feb 28 09:22:26
Feb 28 09:25:46 u118 postfix/anvil[21523]: statistics: max connection count 1 for (smtp:217.72.192.242) at Feb 28 09:22:26
Feb 28 09:25:46 u118 postfix/anvil[21523]: statistics: max cache size 1 at Feb 28 09:22:26
Feb 28 09:25:46 u118 postfix/anvil[21523]: statistics: max cache size 1 at Feb 28 09:22:26

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Dein Server fühlt sich nicht für mydomain zuständig. Ist mydomain als Ziel in den virtual mailbox domains eingetragen?

byspirit

(Themenstarter)

Anmeldungsdatum:
28. Februar 2012

Beiträge: 6

xabbuh schrieb:

Dein Server fühlt sich nicht für mydomain zuständig. Ist mydomain als Ziel in den virtual mailbox domains eingetragen?

habe die Konfig durchgeguckt.. Erlich gesagt ich weiß nicht was damit gemeit ist

In Postfixadmin ist die Domain eingetragen und User auch

Nefarius

Avatar von Nefarius

Anmeldungsdatum:
11. Dezember 2008

Beiträge: 1275

*Seufz*

byspirit

(Themenstarter)

Anmeldungsdatum:
28. Februar 2012

Beiträge: 6

xabbuh schrieb:

Dein Server fühlt sich nicht für mydomain zuständig. Ist mydomain als Ziel in den virtual mailbox domains eingetragen?

Habe jetzt alles noch mal angeguckt.

Also der Fehler lag daran, dass bei der DB abfrage für die Domain, mx = 0 sein soll und ich hate mx = 1.

Also "mydomain" war nicht richtig angegeben.

Als ich das behoben habe, kammen die Mails nicht an. Jetzt aber läft wie es sein soll.☺

Danke an xabbuh ☺

Mit freudlichen Grüßen

byspirit

bodensee

Anmeldungsdatum:
4. November 2006

Beiträge: 1971

Und wieder eine SPAM Schleuder mehr im Netz.......

byspirit

(Themenstarter)

Anmeldungsdatum:
28. Februar 2012

Beiträge: 6

bodensee schrieb:

Und wieder eine SPAM Schleuder mehr im Netz.......

warum das???

Also erlich... solche Klugscheißer Komentare kann ich nicht abhaben...

Wenn du so schlau bist, sag mir doch einfach wie ich es sicher machen kann... -.-

und wenn du nicht weiter hilffst, dann brauchst du auch nicht schreiben.!

Antworten |