Postfix: from localhost (ip6-localhost [127.0.0.1]) by mail.myDomain.com

lordfritte

Lieutenant
Registriert
Juli 2006
Beiträge
955
Hallo, ich habe folgendes Problem: Ich habe einen E-Mail-Server aufgesetzt.

Wenn ich eine E-Mail verschicken steht im header:

Received: from localhost (ip6-localhost [127.0.0.1]) by mail.myDomain.com (Postfix) with ESMTP id 4C9457F997 for <lordfritte@googlemail.com>; Thu,
...
Received: from mail.myDomain.com ([127.0.0.1]) by localhost (mail.myDomain.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8MLvZKFWnD-r for <lordfritte@googlemail.com>; Thu,

/etc/hosts:
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
xxx.xxx.xxx.xxx mail.myDomain.com
127.0.1.1 mail.myDomain.com localhost
#127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
abcd:abcd:abcd:abcd::1 mail.myDomain.com
::1 mail.myDomain.com ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/hostname:
mail.myDomain.com

/etc/postfix/main.cf:
# This file was automatically installed on 2019-11-06T14:27:59.630834
inet_interfaces = all
inet_protocols = ipv4
myhostname = mail.myDomain.com
myorigin = $myhostname
mydestination = $myhostname
#mynetworks = 127.0.0.0/8
mynetworks = meineIpV4/32
smtpd_banner = $myhostname ESMTP
biff = no
unknown_local_recipient_reject_code = 550
unverified_recipient_reject_code = 550

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

readme_directory = no

mailbox_size_limit = 0
message_size_limit = 11534336
recipient_delimiter = +

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

## Proxy maps
proxy_read_maps =
proxy:unix:passwd.byname
proxy:mysql:/etc/postfix/sql-domains.cf
proxy:mysql:/etc/postfix/sql-domain-aliases.cf
proxy:mysql:/etc/postfix/sql-aliases.cf
proxy:mysql:/etc/postfix/sql-relaydomains.cf
proxy:mysql:/etc/postfix/sql-maintain.cf
proxy:mysql:/etc/postfix/sql-relay-recipient-verification.cf
proxy:mysql:/etc/postfix/sql-sender-login-map.cf
proxy:mysql:/etc/postfix/sql-spliteddomains-transport.cf
proxy:mysql:/etc/postfix/sql-transport.cf

## TLS settings
#
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_CApath = /etc/ssl/certs
smtpd_tls_key_file = /etc/letsencrypt/live/mail.myDomain.com/privkey.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.myDomain.com/fullchain.pem
smtpd_tls_dh1024_param_file = ${config_directory}/dh2048.pem
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_database = btree:$data_directory/smtpd_tls_session_cache
smtpd_tls_security_level = may
smtpd_tls_received_header = yes

# Disallow SSLv2 and SSLv3, only accept secure ciphers
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
smtpd_tls_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL

# Enable elliptic curve cryptography
smtpd_tls_eecdh_grade = strong

# Use TLS if this is supported by the remote SMTP server, otherwise use plaintext.
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_loglevel = 1
smtp_tls_exclude_ciphers = EXPORT, LOW

## Virtual transport settings
#
virtual_transport = lmtp:unix:private/dovecot-lmtp

virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql-domains.cf
virtual_alias_domains = proxy:mysql:/etc/postfix/sql-domain-aliases.cf
virtual_alias_maps =
proxy:mysql:/etc/postfix/sql-aliases.cf

## Relay domains
#
relay_domains =
proxy:mysql:/etc/postfix/sql-relaydomains.cf
transport_maps =
proxy:mysql:/etc/postfix/sql-transport.cf
proxy:mysql:/etc/postfix/sql-spliteddomains-transport.cf

## SASL authentication through Dovecot
#
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous

## SMTP session policies
#

# We require HELO to check it later
smtpd_helo_required = yes

# We do not let others find out which recipients are valid
disable_vrfy_command = yes

# MTA to MTA communication on Port 25. We expect (!) the other party to
# specify messages as required by RFC 821.
strict_rfc821_envelopes = yes

# Verify cache setup
address_verify_map = proxy:btree:$data_directory/verify_cache

proxy_write_maps =
$smtp_sasl_auth_cache_name
$lmtp_sasl_auth_cache_name
$address_verify_map

# OpenDKIM setup
smtpd_milters = inet:127.0.0.1:12345
non_smtpd_milters = inet:127.0.0.1:12345
milter_default_action = accept
milter_content_timeout = 30s

# List of authorized senders
smtpd_sender_login_maps =
proxy:mysql:/etc/postfix/sql-sender-login-map.cf

# Recipient restriction rules
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
check_recipient_access
proxy:mysql:/etc/postfix/sql-maintain.cf
proxy:mysql:/etc/postfix/sql-relay-recipient-verification.cf
reject_unverified_recipient
reject_unauth_destination
reject_non_fqdn_sender
reject_non_fqdn_recipient
reject_non_fqdn_helo_hostname

## Postcreen settings
#
postscreen_access_list =
permit_mynetworks
cidr:/etc/postfix/postscreen_spf_whitelist.cidr
postscreen_blacklist_action = enforce

# Use some DNSBL
postscreen_dnsbl_sites =
zen.spamhaus.org*3
bl.spameatingmonkey.net*2
dnsbl.habl.org
bl.spamcop.net
dnsbl.sorbs.net
postscreen_dnsbl_threshold = 3
postscreen_dnsbl_action = enforce

postscreen_greet_banner = Welcome, please wait...
postscreen_greet_action = enforce

postscreen_pipelining_enable = yes
postscreen_pipelining_action = enforce

postscreen_non_smtp_command_enable = yes
postscreen_non_smtp_command_action = enforce

postscreen_bare_newline_enable = yes
postscreen_bare_newline_action = enforce

Vielleicht bin ich ja auch auf dem Holzweg, das eigentlich Problem ist: ich habe bei mail-tester.com eine 10 von 10 und dennoch landen meine E-Mails bei Anbietern wie outlook/microsoft und gmail im Spam-Verzeichnis. Jetzt habe ich hier https://www.digitalocean.com/community/questions/email-sent-to-gmail-is-flagged-as-spam gelesen, es könnte am "Received: from localhost" liegen.

Achja beim spf habe ich ein softFail.
 
Mach mal via Telnet eine HELO test und überprüfe, worauf der Mailserver antwortet.
Der sollte vom Namen korrket sein und nicht mit Localhost oder so antwroten
HELO sollte dann mail.myDomain.com lauten
 
seluce schrieb:
Mach mal via Telnet eine HELO test und überprüfe, worauf der Mailserver antwortet.
Der sollte vom Namen korrket sein und nicht mit Localhost oder so antwroten
HELO sollte dann mail.myDomain.com lauten

Hallo, ja antwortet richtig..
telnet mail.myDomain.com 25
220 mail.myDomain.com ESMTP
HELO mail.myDomain.com
250 mail.myDomain.com
 
Zurück
Oben