tutorials.de Buch-Aktion 05/2012
ERLEDIGT
NEIN
ANTWORTEN
1
ZUGRIFFE
679
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    WerOLF WerOLF ist offline Mitglied Bronze
    Registriert seit
    Aug 2007
    Beiträge
    28
    Hallo liebe Gemeinde

    es soll anscheindend so einfach gehen...
    Nach diesem Tutorial sind es nicht mehr als 10 Minuten, und der Postfix soll wie ein normaler eMail Client eine Verbindung zum Relay Host (mx.cyconf.de) aufbauen und dort über den extra angelegten POP3 Account die eMails versenden.

    Was mache ich dann bitte flasch ?!

    Daten zum Mailserver meines ISP:

    Mailserver: mx.cyconf.de
    - Braucht eine SSL Verbindung beim senden
    - Ist anscheindend AUTH=PLAIN ( steht so zumindest wenn man telnet mx.cyconf.de 25 macht)

    Ich habe ein POP 3 Fach mit eMail Adresse angelegt :

    webxxxp7
    pa$$wort


    Das Szenario:

    Mein Homeserver hat eine dynamische IP, und wird somit wenn er selbst eMail sendet unter generellen "Spamverdacht" gestellt. Daher möchte ich mit meinem Homeserver die eMails über ein normales Postfach meines ISP versenden - dies ist ja eigentlich nichts anderes als wenn ich mit meinem eMail Client eine eMail schreibe, denn dann nutze ich ja auch den mx.cyconf.de als relay.
    Ich will eigentlich nur, das die eMails wie zum Beispiel passwort vergessen über den postfix an den mx.cyconf.de übergeben werden, und dann zugestellt werden.

    Hier die Configs meines Postfix:

    main.cf
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname = werwolf.ath.cx
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = philippwolf.com, localhost, localhost.localdomain, localhost, cyconf.de
    mynetworks = 127.0.0.0/8, 192.168.0.0/24
    #mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 51200
    recipient_delimiter = +
    inet_interfaces = all

    relay = mx.cyconf.de
    default_transport = smtp
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
    smtp_sasl_type = cyrus
    smtp_sasl_mechanism_filter = AUTH
    relayhost = mx.cyconf.de
    unknown_local_recipient_reject_code = 450
    mailbox_command = procmail -a "$EXTENSION"
    inet_protocols = all

    (Anmerkung zu "main.cf" : mein Server heißt mit Hostnamen eigentl. Wolfi (steht so auch in der phpinfo). Von außen ist er ansprechbar mit werwolf.ath.cx)

    master.cf:
    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - n - - smtpd -v
    submission inet n - - - - smtpd
    -o smtpd_enforce_tls=yes
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    smtps inet n - - - - smtpd
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #628 inet n - - - - qmqpd
    pickup fifo n - - 60 1 pickup
    cleanup unix n - - - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - - 300 1 oqmgr
    tlsmgr unix - - - 1000? 1 tlsmgr
    rewrite unix - - - - - trivial-rewrite
    bounce unix - - - - 0 bounce
    defer unix - - - - 0 bounce
    trace unix - - - - 0 bounce
    verify unix - - - - 1 verify
    flush unix n - - 1000? 0 flush
    proxymap unix - - n - - proxymap
    smtp unix - - - - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - - - - smtp
    -o fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - - - - showq
    error unix - - - - - error
    discard unix - - - - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - - - - lmtp
    anvil unix - - - - 1 anvil
    scache unix - - - - 1 scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail unix - n n - - pipe
    flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp unix - n n - - pipe
    flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix - n n - 2 pipe
    flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman unix - n n - - pipe
    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    ${nexthop} ${user}

    sasl_passwd:
    Nach diesem Schema:

    mx.cyconf.de webxxxp7@philippwolf.coma$$wort


    Wenn ich nun eine eMail senden möchte an info (at) philippwolf.com (über ein PHP Formular) dann kommt dies dazu in der mail.log:


    Dec 17 20:01:40 Wolfi postfix/postfix-script: starting the Postfix mail system
    Dec 17 20:01:41 Wolfi postfix/master[18037]: daemon started -- version 2.3.8, configuration /etc/postfix
    Dec 17 20:01:41 Wolfi postfix/qmgr[18039]: E0B101E407E: from=<vu2002@werwolf.ath.cx>, size=428, nrcpt=1 (queue active)
    Dec 17 20:01:41 Wolfi postfix/local[18041]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
    Dec 17 20:01:41 Wolfi postfix/qmgr[18039]: 4B7D71E407F: from=<vu2002@werwolf.ath.cx>, size=429, nrcpt=1 (queue active)
    Dec 17 20:01:41 Wolfi postfix/qmgr[18039]: 5A41D1E4080: from=<vu2002@werwolf.ath.cx>, size=430, nrcpt=1 (queue active)
    Dec 17 20:01:41 Wolfi postfix/qmgr[18039]: A9D9C1E407D: from=<vu2002@werwolf.ath.cx>, size=400, nrcpt=1 (queue active)
    Dec 17 20:01:42 Wolfi postfix/master[18037]: warning: process /usr/lib/postfix/local pid 18041 exit status 1
    Dec 17 20:01:42 Wolfi postfix/master[18037]: warning: /usr/lib/postfix/local: bad command startup -- throttling
    Dec 17 20:02:12 Wolfi postfix/pickup[18038]: A25571E4081: uid=33 from=<vu2002>
    Dec 17 20:02:12 Wolfi postfix/cleanup[18048]: A25571E4081: message-id=<20071217190212.A25571E4081@werwolf.ath.cx>
    Dec 17 20:02:12 Wolfi postfix/qmgr[18039]: A25571E4081: from=<vu2002@werwolf.ath.cx>, size=444, nrcpt=1 (queue active)
    Anmerkung: habe kurz zuvor erst postfix gestartet

    Hat jemand eine Lösung für mein seit 5 Monaten bestehendes Problem ?

    Danke an euch


    //EDIT:

    Achso, ich sollte vielleicht auch erwähnen das auf dem Server das ispCP läuft.
    Geändert von WerOLF (18.12.07 um 16:22 Uhr)
     

  2. #2
    WerOLF WerOLF ist offline Mitglied Bronze
    Registriert seit
    Aug 2007
    Beiträge
    28
    *tür auf mach*
    *auf boden Klatsch*
    *mhmm.. warum ist die Tür an der Decke ? Und warum bin ich von der Decke gefallen?!*

    okay.. ich weiß... derbe Unlustig...

    egal.. also ich habe jetzt einen POP3 Server als relay genutzt, welcher kein SSL braucht zum senden.

    Ich bin jetzt bereits ein ganzes stückchen weiter.

    Inzwischen nimmt der Mailserver erfolgreich (gegenserver Log bestätigt dies) Verbindung zum Relayserver auf.

    Folgendes Szenario:

    Ich sende über ein PHP Formular auf meiner Webseite eine eMail. Diese wird an 'max@mustermann.de' gesendet.

    In den Logs meines Servers steht dann allerdings, das die eMail an v2002@werwolf.ath.cx geht.

    Anscheinend überschreibt Postfix also den Empfänger. Demenstsprechend kommt auch die email nicht an.

    Hier der Auszug aus der /var/log/mail.log:

    -SCHNIPP-

    Dec 19 15:22:56 Wolfi postfix/smtp[350]: 35DAE1E40D0: to=<vu2002@werwolf.ath.cx>, relay=mail.xxxxxxxx.de[212.72.184.185]:25, delay=1649, delays=1643/1.9/3.3/0.76, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5A86B8E445E)
    Dec 19 15:22:56 Wolfi postfix/qmgr[305]: 35DAE1E40D0: removed

    -SCHNAPP-
    Jemand eine idee ?
     

Ähnliche Themen

  1. Postfix relay via googlemail - From: falsch
    Von Bratkartoffel im Forum Linux & Unix
    Antworten: 4
    Letzter Beitrag: 30.08.10, 09:25
  2. [postfix] Relay access denied
    Von Sebastian Wramba im Forum Linux & Unix
    Antworten: 1
    Letzter Beitrag: 15.04.08, 10:12
  3. Antworten: 1
    Letzter Beitrag: 03.06.05, 00:56
  4. Freie SMTP-Server die Relay unterstützen
    Von Robert Steichele im Forum Internet, DSL & Flatrate
    Antworten: 2
    Letzter Beitrag: 24.05.05, 17:22
  5. Relay access denied - SMTP Problem
    Von schleckerbeck im Forum Linux & Unix
    Antworten: 3
    Letzter Beitrag: 09.05.05, 20:28