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