Swaks: Unterschied zwischen den Versionen
Erscheinungsbild
Keine Bearbeitungszusammenfassung |
|||
| Zeile 40: | Zeile 40: | ||
== Anwendung == | == Anwendung == | ||
=== Einfacher SMTP-Test (ohne Authentifizierung) === | |||
= | |||
Hiermit wird eine einfache E-Mail von Ihrem Server versendet, um zu überprüfen, ob die SMTP-Kommunikation funktioniert: | Hiermit wird eine einfache E-Mail von Ihrem Server versendet, um zu überprüfen, ob die SMTP-Kommunikation funktioniert: | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --to recipient@example.com --from sender@example.com --server mail.example.com | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== SMTP-Authentifizierungstest === | |||
=== | |||
Testen Sie den Versand mit SMTP-Authentifizierung (ersetzen Sie die Werte entsprechend): | Testen Sie den Versand mit SMTP-Authentifizierung (ersetzen Sie die Werte entsprechend): | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --to recipient@example.com --from sender@example.com | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--server mail.example.com --auth LOGIN | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--auth-user username --auth-password password | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === Testen eines bestimmten Ports oder einer bestimmten Verschlüsselung === | ||
So testen Sie die Verwendung von Port 587 mit STARTTLS: | So testen Sie die Verwendung von Port 587 mit STARTTLS: | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --to recipient@example.com --from sender@example.com | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--server mail.example.com --port 587 --tls | |||
</syntaxhighlight> | </syntaxhighlight> | ||
So testen Sie SMTPS auf Port 465: | So testen Sie SMTPS auf Port 465: | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --to recipient@example.com --from sender@example.com | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--server mail.example.com --port 465 --smtps | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== SMTP ohne Authentifizierung testen === | === SMTP ohne Authentifizierung testen === | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== SMTP mit Authentifizierung (PLAIN) === | === SMTP mit Authentifizierung (PLAIN) === | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== SMTP mit Authentifizierung (SMTPS auf Port 465) === | === SMTP mit Authentifizierung (SMTPS auf Port 465) === | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar --port 465 -tlsc | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== SMTP mit Authentifizierung (SUBMISSION auf Port 587) === | === SMTP mit Authentifizierung (SUBMISSION auf Port 587) === | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar --port 587 -tls | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Tipps zur Fehlerbehebung mit Swaks === | === Tipps zur Fehlerbehebung mit Swaks === | ||
| Zeile 113: | Zeile 109: | ||
; Beispiel für einen Auszugsausschnitt | ; Beispiel für einen Auszugsausschnitt | ||
<syntaxhighlight lang="bash" highlight="1 | <syntaxhighlight lang="bash" highlight="0"> | ||
** 550 5.1.1 <recipient@example.com>: Empfängeradresse abgelehnt: Benutzer unbekannt** | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Dies deutet darauf hin, dass die Empfängeradresse auf dem Ziel-Mailserver nicht existiert. | Dies deutet darauf hin, dass die Empfängeradresse auf dem Ziel-Mailserver nicht existiert. | ||
<noinclude> | <noinclude> | ||
| Zeile 124: | Zeile 121: | ||
---- | ---- | ||
--> | --> | ||
== Anhang == | == Anhang == | ||
=== Siehe auch === | === Siehe auch === | ||
Version vom 10. Juli 2026, 09:20 Uhr
swaks - Swiss Army Knife for SMTP
Beschreibung
Installation
Aufruf
Optionen
| Unix | GNU | Parameter | Beschreibung |
|---|---|---|---|
Parameter
Umgebungsvariablen
Exit-Status
| Wert | Beschreibung |
|---|---|
| 0 | Erfolg |
| >0 | Fehler |
Anwendung
Einfacher SMTP-Test (ohne Authentifizierung)
Hiermit wird eine einfache E-Mail von Ihrem Server versendet, um zu überprüfen, ob die SMTP-Kommunikation funktioniert:
swaks --to recipient@example.com --from sender@example.com --server mail.example.com
SMTP-Authentifizierungstest
Testen Sie den Versand mit SMTP-Authentifizierung (ersetzen Sie die Werte entsprechend):
swaks --to recipient@example.com --from sender@example.com
--server mail.example.com --auth LOGIN
--auth-user username --auth-password password
Testen eines bestimmten Ports oder einer bestimmten Verschlüsselung
So testen Sie die Verwendung von Port 587 mit STARTTLS:
swaks --to recipient@example.com --from sender@example.com
--server mail.example.com --port 587 --tls
So testen Sie SMTPS auf Port 465:
swaks --to recipient@example.com --from sender@example.com
--server mail.example.com --port 465 --smtps
SMTP ohne Authentifizierung testen
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net
SMTP mit Authentifizierung (PLAIN)
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar
SMTP mit Authentifizierung (SMTPS auf Port 465)
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar --port 465 -tlsc
SMTP mit Authentifizierung (SUBMISSION auf Port 587)
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar --port 587 -tls
Tipps zur Fehlerbehebung mit Swaks
Swaks liefert detailliertes Feedback zu jedem Schritt der SMTP-Sitzung.
- Achten Sie bei der Fehlerbehebung auf Folgendes
- DNS-Auflösungsfehler: Können auf falsche MX- oder A-Einträge hinweisen.
- Authentifizierungsfehler: Können auf falsche Anmeldedaten oder eine deaktivierte SMTP-Authentifizierung hinweisen.
- Meldungen „Relay denied“: Deuten darauf hin, dass der Server nicht für die Weiterleitung von E-Mails über Ihre IP-Adresse konfiguriert ist.
- Ablehnung durch den Zielserver: Suchen Sie nach Hinweisen in der SMTP-Fehlerantwort.
- Beispiel für einen Auszugsausschnitt
** 550 5.1.1 <recipient@example.com>: Empfängeradresse abgelehnt: Benutzer unbekannt**
Dies deutet darauf hin, dass die Empfängeradresse auf dem Ziel-Mailserver nicht existiert.
Anhang
Siehe auch
Dokumentation
- Man-Page
Links
Projekt
Weblinks