Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nullmailer und Zertifikatsanmeldung?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
TheSmallOne
Guru
Guru


Joined: 22 Jan 2005
Posts: 467
Location: Germany

PostPosted: Tue Dec 31, 2013 12:12 pm    Post subject: Nullmailer und Zertifikatsanmeldung? Reply with quote

Hi,
kennt sich jemand etwas mit Nullmailer aus? Ich habe zur Zeit das Problem, dass die Doku zu diesem Projekt offenbar genauso schlank ist, wie der Dienst selbst, um nicht zu sagen sie ist unbrauchbar.

Kurzfassung: (Wie) kann ich mich mit Nullmailer bei meinem Mailserver mit Zertifikat authentifizieren?

Langfassung:
Ich möchte den Nullmailer auf meiner kleinen Router-Kiste laufen lassen, damit ich ein paar Rückmeldungen per Mail erhalten kann. Die Mails sollen an meinen Mailserver gehen, auf dem ich Postfix laufen habe. Des weiteren möchte ich gerne, dass sich der Router dem Mailserver gegenüber nicht mit SMTP AUTH, sondern mit Zertifikat anmeldet.
Nach ein bisschen googeln habe ich herausgefunden, dass für die Mailweiterleitung das Programm /usr/libexec/nullmailer/smtp zuständig ist und ein Aufruf ohne Parameter förderte auch die Möglichkeiten zu tage:
Code:
# /usr/libexec/nullmailer/smtp
smtp: Too few command-line arguments
usage: smtp [flags] remote-address < mail-file
Send an email message via SMTP
  -p, --port=INT            Set the port number on the remote host to connect to
      --user=VALUE          Set the user name for authentication
      --pass=VALUE          Set the password for authentication
      --auth-login          Use AUTH LOGIN instead of auto-detecting in SMTP
      --ssl                 Connect using SSL (on an alternate port by default)
      --starttls            Use STARTTLS command
      --x509certfile=VALUE  Client certificate file
      --x509cafile=VALUE    Certificate authority trust file
                            (Defaults to /etc/ssl/certs/ca-certificates.crt)
      --x509crlfile=VALUE   Certificate revocation list file
      --x509fmtder          X.509 files are in DER format
                            (Defaults to PEM format)
      --insecure            Don't abort if server certificate fails validation

  -h, --help                Display this help and exit

Es existiert also offensichtlich ein Parameter --x509certfile, um ein Client-Zertifikat zu übergeben.
Wie gesagt ist die Doku ziemlich knapp gehalten; ich musste also ersteinmal eine Weile herumexperimentieren um herauszufinden, welche Art von Datei da überhaupt erwartet wird. Ein reines Zertifikat (startend mit -----BEGIN CERTIFICATE-----) wurde ebensowenig akzeptiert, wie der dazugehörige Private Key (-----BEGIN RSA PRIVATE KEY-----). Erst als ich beide mit cat in eine Datei vereint habe, hat sich nullmailer nicht mehr über die Datei beschwert.

Der Aufruf, den ich jetzt in der /etc/nullmailer/remotes Datei stehen habe sieht folgendermaßen aus:
Code:
mein-mailserver smtp --starttls --x509cafile=/etc/nullmailer/server-zertifikat-CA --x509certfile=/etc/nullmailer/client-zertifikat

Mein Problem ist jedoch, dass nullmailer zwar die Datei zu akzeptieren scheint, sie aber dennoch nicht verwendet um sich dem Postfix-Server gegenüber zu identifizieren.
Das Log des Postfix zeigt folgende Nachricht (nachdem ich das Loglevel mit postconf -e "smtpd_tls_loglevel=1" entsprechend angepasst habe):
Code:
postfix/smtpd[6300]: Anonymous TLS connection established from p5b0fXXXX.dip0.t-ipconnect.de[91.15.XX.XX]: TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)


Die Verbindung wird also ganz offensichtlich hergestellt, ohne dass das Client-Zertifikat verwendet wird. (Anonymous TLS)

Kann mir jemand weiter helfen?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum