Zum Inhalt springen

Swaks: Unterschied zwischen den Versionen

Aus Foxwiki
 
(11 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 52: Zeile 52:


=== Mit Authentifizierung ===
=== Mit Authentifizierung ===
Versand mit SMTP-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>
swaks --to recipient@example.com --from sender@example.com --server mail.example.com --auth LOGIN --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>


==== Bestimmte Ports oder bestimmte Verschlüsselung ====
==== Port 587 mit STARTTLS ====
==== Port 587 mit STARTTLS ====
; 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 --server mail.example.com --port 587 --tls
swaks --to recipient@example.com --from sender@example.com --server mail.example.com --port 587 --tls
</syntaxhighlight>
</syntaxhighlight>


==== 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 --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 587 -tls
</syntaxhighlight>
</syntaxhighlight>


==== PLAIN ====
==== 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
swaks --to recipient@example.com --from sender@example.com --server mail.example.com --port 465 --smtps
</syntaxhighlight>
</syntaxhighlight>


==== 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
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) ====
==== 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 --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
</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


; Achten Sie bei der Fehlerbehebung auf Folgendes
; Beachten
{| class="wikitable options big"
{| class="wikitable options big"
! !!
! !!
|-
|-
| DNS-Auflösungsfehler || Können auf falsche MX- oder A-Einträge hinweisen
| DNS-Auflösungsfehler || Falsche MX- oder A-Einträge
|-
|-
| Authentifizierungsfehler || Können auf falsche Anmeldedaten oder eine deaktivierte SMTP-Authentifizierung hinweisen
| Authentifizierungsfehler || Falsche Anmeldedaten oder eine deaktivierte SMTP-Authentifizierung
|-
|-
| Meldungen „Relay denied“ || Deuten darauf hin, dass der Server nicht für die Weiterleitung von E-Mails über Ihre IP-Adresse konfiguriert ist
| ''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
| Ablehnung durch den Zielserver || Suchen Sie nach Hinweisen in der SMTP-Fehlerantwort
Zeile 100: Zeile 102:


; 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>
Dies deutet darauf hin, dass die Empfängeradresse auf dem Ziel-Mailserver nicht existiert.


<noinclude>
<noinclude>

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
  1. swaks(1)

Projekt

  1. https://jetmore.org/john/code/swaks/
  2. https://github.com/jetmore/swaks