1 2 3 4 5 6 7 8 9 10 11 12 |
sudo nano /etc/postfix/main.cf myhostname = buyenne.de # 1und1 Anpassung relayhost = smtp.1und1.de smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous # 1und1 Anpassung Ende |
Nun die Zugangsberechtigung für den Mail Account
1 |
sudo nano /etc/postfix/sasl_passwd |
Die Datei sieht dann so aus
1 |
smtp.1und1.de email:password |
Jetzt noch die Berechtigungen anpassen.
1 2 3 4 5 |
chmod 600 sasl_passwd postmap /etc/postfix/sasl_passwd nano /etc/postfix/sender_canonical postmap /etc/postfix/sender_canonical /etc/init.d/postfix reload |
Nun kann man mit
1 |
mail -s "testbetreff" deine@mail.de < messages |
die Funktion testen.
1 |
postqueue -p |
zeigt die Queue an
1 |
postqueue -f |
gibt Postfix den Befehl die Queue jetzt abzuarbeiten
1 |
postsuper -d ALL |
leert die Queue
Bei Proxmox (debian) hatte ich noch Schwierigkeiten mit dem Mailversand.
Zuerst die Datei sasl_passwdf mit smtp.1und1.de:585 konfiguriert.
Immer wieder folgende Fehlermeldung:
1 |
C7B13F0259: to=<mein_name@email.de>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (unknown user: "mein_name") |
Danach entfernte ich den Eintrag 585
Es folgte eine neue Fehlermeldung
1 2 |
proxmox postfix/smtp[473410]: warning: SASL authentication failure: No worthy mechs found proxmox postfix/smtp[473410]: ADC8FF001A: SASL authentication failed; cannot authenticate to server smtp.1und1.de[212.227.15.183]: no mechanism available |
Es stelte sich heraus, daß die libsasl2-modules nicht installiert waren.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
root@proxmox:/var/log# apt-get install libsasl2-modules Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal The following NEW packages will be installed: libsasl2-modules 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 116 kB of archives. After this operation, 269 kB of additional disk space will be used. Get:1 http://ftp.ch.debian.org/debian/ wheezy/main libsasl2-modules amd64 2.1.25.dfsg1-6+deb7u1 [116 kB] Fetched 116 kB in 0s (942 kB/s) Selecting previously unselected package libsasl2-modules:amd64. (Reading database ... 33547 files and directories currently installed.) Unpacking libsasl2-modules:amd64 (from .../libsasl2-modules_2.1.25.dfsg1-6+deb7u1_amd64.deb) ... Setting up libsasl2-modules:amd64 (2.1.25.dfsg1-6+deb7u1) ... |
Und schon läuft alles wieder sauber.