staging.inyokaproject.org

Postfix als Mailrelay

Status: Ungelöst | Ubuntu-Version: Server 14.04 (Trusty Tahr)
Antworten |

Riste76

Anmeldungsdatum:
13. Juni 2015

Beiträge: 2

Hallo zusammen, ich habe einen Homeserver installiert, nun möchte ich mit diesem auch Mails nach draußen versenden. zu diesem Zweck habe ich Postfix konfiguriert, nur leider will der nicht so wie ich will.

Hier die Eckdaten meiner Konfiguration: - die Mails sollen an den Apple Mailserver übergeben werden - smtp.mail.me.com (SSL; Port 587)

meine Konfiguration:

 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
# 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 = /etc/mailname

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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = server1.rnet.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.rnet.local, localhost.rnet.local, localhost
# relayhost = smtp.rnet.local
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

# eigene Eintraege

relayhost = [smtp.mail.me.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
# smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes

sender_canonical_maps = hash:/etc/postfix/sender_canonical

Ich bekomme die folgende Meldung: local data error while talking to smtp.mail.me.com[17.172.34.225]

hat eventuell jemand eine Idee? bin über jeden Tip dankbar ☺

Gruß Christian

BillMaier Team-Icon

Supporter

Anmeldungsdatum:
4. Dezember 2008

Beiträge: 6497

vermutlich benötigt dein mailrelay eine Authentifizierung.

Zur Benamungs-Klarstellung: Das Mailrelay ist Dein smtp.mail.me.com

und nicht der Postfix.

Vielleicht reicht der Tipp?

tom2thegoat

Anmeldungsdatum:
8. März 2024

Beiträge: Zähle...

zu diesem Zweck habe ich Postfix konfiguriert, nur leider will der nicht so wie ich will.

Dein Wort in Gottes Gehörgang.. Ich habe zwei Tage verzweifelt an Postfix rumgehackt und es trotzdem nicht geschafft, per SMTP auth Mails via smtp.ionos.de zu verschicken.

Schlussendlich bin ich im IRC gelandet und dort hat mir einer empfohlen mir mal OpenSMTPD https://www.opensmtpd.org/ anzuschauen. Das Tool ist WESENTLICH einfacher zu verstehen als Postfix. Nie mehr Postfix, verschwendete Zeit.

Im IRC wurde mir dieser blogpost https://www.blunix.com/blog/secure-smtp-email-relay-on-debian-and-ubuntu-with-opensmtpd-instead-of-postfix.html empohlen, dem ich gefolgt bin, jetzt klappt alles direkt. Steht alles ganz genau beschrieben. Kann ich nur empfehlen das auch so zu machen.

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17531

Kannst du mal das hier machen:

telnet smtp.mail.me.com 587

Das connected, richtig? Kannst du uns auch den Vollständgen Auszug aus der mail.log/mail.err geben?

tom2thegoat

Anmeldungsdatum:
8. März 2024

Beiträge: Zähle...

telnet smtp.mail.me.com 587

Freilich:

user@host:~$ telnet smtp.mail.me.com 587
Trying 17.57.155.28...
Connected to smtp.mail.me.com.
Escape character is '^]'.
220 iCloud SMTP - qs51p00im-qukt01072501.me.com 3.8.5 (2411BSE4-ffc961d34b49)
EHLO ubuntuusers.de
250-qs51p00im-qukt01072501.me.com
250-PIPELINING
250-SIZE 28319744
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
MAIL FROM foobar@ubuntuusers.de
530 5.7.0 Must issue a STARTTLS command first

ab starttls bin ich raus - das kann ich im Kopf nicht ausrechnen x)

Aso ich glaube ich war gar net gemeint x) Anyways, von aussen erreichbar.

@encbladexp der Thread ist schon etwas älter und ich glaube der Ersteller hat sein Problem wahrscheinlich schon gelöst. Ich bin tagelang an Postfix verzweifelt und das hier war einer der Foren-Posts, welche ich beim Postfix Debugging gefunden habe. Daher wollte ich eine einfachere Lösung posten.

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17531

Stimmt 😀

Das passiert wenn Leute Alte Threads aufwaermen.

Antworten |