Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter atesin

    (@atesin)

    weee, yes now it works!

    i had to do some minor modifications to my script to add my “From: ” header and discard original, because when mail comes with 2 From headers, mails are discarded too

    echo -e “From: $MFROM\n’grep -Pv “^From: “‘”|$MCMD >>$MDEBUG 2>&1
    # ‘ = tilt quote

    sorry i feel a bit stupid for not to read the documentation, but the truth is i didnt find it

    anyway your plugin is terrific, i hope someday you add an *additional parameters* field so php can log it, that i think is the ONLY thing it lacks cause is very complete

    thanks

    Thread Starter atesin

    (@atesin)

    i send you my wrapper so you can watch or use,
    i use MSMTP as smtp client

    #!/bin/bash
    # sendmail program wrapper by atesin may2013
    # usage: cat mail.txt|sendmail-t authtoken
    # is recommended to enable php mail.log to get referer script

    # config
    MCMD=’/path/to/real/smtp-client -parms’
    MAUTH=myCustomAuthTokenXxx
    MFROM='”John Doe” <jdoe@example.com>’
    MDEBUG=/var/log/smtp-client/debug.log

    # write header on the log
    echo -e “***\ndate“>>$MDEBUG

    # try to validate
    for i in $*
    do
    if [ “$i” != “$MAUTH” ]
    then
    continue
    else
    # send mail and exit
    # if you not include a ‘From’ header some mails arrives weird
    echo -e “From: $MFROM\ncat“|$MCMD 2>&1 >>$MDEBUG
    exit 0
    fi
    done

    # could not send mail
    echo -e “failed validation\nparameters: $*\nmessage:\ncat“>>$MDEBUG
    exit 255

    Thread Starter atesin

    (@atesin)

    hi .. your new *send test mail* function had resulted incredible useful 🙂

    however i tried what you suggested using *sendmail program* but seems it discards any parameter introduced, i tried with: sendmail-wrapper myCustomTokenXxxxx, “sendmail-wrapper myCustomTokenXxxxx”, sendmail-wrapper\ myCustomTokenXxxxx, etc

    .. i also tried with *custom header* option, but when i send test mail wordpress window becomes blank (bug?), maybe i am doing something wrong.. i tried with various formats like: Xheader: value, Xheader, “Xheader”, ‘Xheader’, ‘Xheader: value’ but is the same

    since php mail format is: mail(to,subj,msg,add-heads,add-parms) i though i could do some injection with additional headers specifying as “‘,’myToken” ..

    but would be better if there would be an *additional parameters* field as other blog/forum software (mybb), that way the path to sendmail would be safer; or at least if would accept parameters in *sendmail program* field

    thanks and sorry for the inconveniences

    Thread Starter atesin

    (@atesin)

    … For example, you set “Sender” to “xxx@yyy.com my_specific_token”,

    yes it authenticate successful and tries to send the message, but it sends with the non standard header

    sendmail -oi -f myadmin@email.cl myCustomTokenJgofwbvsxxxx
    > From: myadmin@email.cl
    > Return-Path: myadmin@email.cl myCustomTokenJgofwbvsxxxx
    > …
    < 250 Mail accepted

    and i am afraid recipient servers will reject it

    i made a test *with your new function* and logs says the message was ok and sended, but the mail yet doesnt reach my inbox 🙁

    another issue is my secret token IS SENDED ON THE EMAIL HEADERS

    please help .. could you add an -additional parameters- field to your plugin?, should be helpful 🙂

    Thread Starter atesin

    (@atesin)

    can i use your plugin to pass additional parameters to configured sendmail bin ?

    php mail function usage is:

    bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

    i have a bash script configured in php as sendmail bin to obfuscate and log real sendmail, i must use mail() passing a specific token trought additional parameters to work

    if any hacker/spammer reaches to upload a php script and tries to use it to use my server to send spam, he will not able unless he knows the token, anyway he will get logged

Viewing 5 replies - 1 through 5 (of 5 total)