Swaks: Unterschied zwischen den Versionen
Erscheinungsbild
| (29 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 41: | Zeile 41: | ||
== Anwendung == | == Anwendung == | ||
=== | === Ohne Authentifizierung === | ||
Einfache E-Mail versenden, um die SMTP-Kommunikation zu prüfen | |||
<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 | swaks --to recipient@example.com --from sender@example.com --server mail.example.com | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks -- | swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Mit Authentifizierung === | |||
Bestimmte Ports oder bestimmte Verschlüsselung | |||
==== SMTP-Authentifizierung ==== | |||
Versand mit SMTP-Authentifizierung | |||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--auth-user username --auth-password password | swaks --to recipient@example.com --from sender@example.com --server mail.example.com --auth LOGIN --auth-user username --auth-password password | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ==== Port 587 mit STARTTLS ==== | ||
Port 587 | ; SMTP mit Authentifizierung (SUBMISSION auf Port 587) | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
swaks --to recipient@example.com --from sender@example.com | swaks --to recipient@example.com --from sender@example.com --server mail.example.com --port 587 --tls | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--server | 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> | ||
; SMTPS auf Port 465 | ==== 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 --to recipient@example.com --from sender@example.com | swaks --to recipient@example.com --from sender@example.com --server mail.example.com --port 465 --smtps | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="1" line copy> | <syntaxhighlight lang="bash" highlight="1" line copy> | ||
--server | 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> | ||
== | ==== 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 | swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Tipps zur Fehlerbehebung === | === Tipps zur Fehlerbehebung === | ||
Swaks liefert detailliertes Feedback zu jedem Schritt der SMTP-Sitzung | [[Swaks]] liefert detailliertes Feedback zu jedem Schritt der SMTP-Sitzung | ||
; | ; Beachten | ||
{| class="wikitable options big" | |||
! !! | |||
|- | |||
| DNS-Auflösungsfehler || Falsche MX- oder A-Einträge | |||
|- | |||
| Authentifizierungsfehler || Falsche Anmeldedaten oder eine deaktivierte SMTP-Authentifizierung | |||
|- | |||
| ''Relay denied'' || Server nicht für die Weiterleitung von E-Mails über Ihre IP-Adresse konfiguriert | |||
|- | |||
| Ablehnung durch den Zielserver || Suchen Sie nach Hinweisen in der SMTP-Fehlerantwort | |||
|} | |||
; Beispiel für einen Auszugsausschnitt | ; Beispiel für einen Auszugsausschnitt | ||
Empfängeradresse existiert auf dem Ziel-Mailserver nicht | |||
<syntaxhighlight lang="bash" highlight="0"> | <syntaxhighlight lang="bash" highlight="0"> | ||
** 550 5.1.1 <recipient@example.com>: Empfängeradresse abgelehnt: Benutzer unbekannt** | ** 550 5.1.1 <recipient@example.com>: Empfängeradresse abgelehnt: Benutzer unbekannt** | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<noinclude> | <noinclude> | ||
| Zeile 126: | Zeile 117: | ||
=== Siehe auch === | === Siehe auch === | ||
<div style="column-count:2"> | <div style="column-count:2"> | ||
<categorytree hideroot=on mode="pages"> | <categorytree hideroot=on mode="pages">E-Mail</categorytree> | ||
</div> | </div> | ||
---- | ---- | ||
| Zeile 137: | Zeile 128: | ||
=== Links === | === Links === | ||
==== Projekt ==== | ==== Projekt ==== | ||
# https://jetmore.org/john/code/swaks/ | |||
# https://github.com/jetmore/swaks | |||
==== Weblinks ==== | ==== Weblinks ==== | ||
Aktuelle Version vom 10. Juli 2026, 10:19 Uhr
swaks - Swiss Army Knife for SMTP
Beschreibung
Installation
sudo apt install swaks
Aufruf
Optionen
| Unix | GNU | Parameter | Beschreibung |
|---|---|---|---|
Parameter
Umgebungsvariablen
Exit-Status
| Wert | Beschreibung |
|---|---|
| 0 | Erfolg |
| >0 | Fehler |
Anwendung
Ohne Authentifizierung
Einfache E-Mail versenden, um die SMTP-Kommunikation zu prüfen
swaks --to recipient@example.com --from sender@example.com --server mail.example.com
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net
Mit Authentifizierung
Bestimmte Ports oder bestimmte Verschlüsselung
SMTP-Authentifizierung
Versand mit SMTP-Authentifizierung
swaks --to recipient@example.com --from sender@example.com --server mail.example.com --auth LOGIN --auth-user username --auth-password password
Port 587 mit STARTTLS
- SMTP mit Authentifizierung (SUBMISSION auf Port 587)
swaks --to recipient@example.com --from sender@example.com --server mail.example.com --port 587 --tls
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
SMTPS auf Port 465
- SMTP mit Authentifizierung (SMTPS auf Port 465)
swaks --to recipient@example.com --from sender@example.com --server mail.example.com --port 465 --smtps
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
PLAIN
swaks --server <server_to_test> --from absender@example.com --to empfaenger@example.net --auth --auth-user absender@example.com --auth-password foobar
Tipps zur Fehlerbehebung
Swaks liefert detailliertes Feedback zu jedem Schritt der SMTP-Sitzung
- Beachten
| DNS-Auflösungsfehler | Falsche MX- oder A-Einträge |
| Authentifizierungsfehler | Falsche Anmeldedaten oder eine deaktivierte SMTP-Authentifizierung |
| Relay denied | Server nicht für die Weiterleitung von E-Mails über Ihre IP-Adresse konfiguriert |
| Ablehnung durch den Zielserver | Suchen Sie nach Hinweisen in der SMTP-Fehlerantwort |
- Beispiel für einen Auszugsausschnitt
Empfängeradresse existiert auf dem Ziel-Mailserver nicht
** 550 5.1.1 <recipient@example.com>: Empfängeradresse abgelehnt: Benutzer unbekannt**
Anhang
Siehe auch
Dokumentation
- Man-Page
Links
Projekt
Weblinks