SMF Mailing List Mod

Started by pftq, June 24, 2011, 04:01:47 PM

Previous topic - Next topic

Inti31

i tried now another mail addy from my own domain -no success

Log show

DEBUGGER -> Initiating...2012-12-05, 15:45:42

DEBUGGER -> Loading SSI...

DEBUGGER -> Beginning email parse...DEBUGGER -> Nullifying slashes added by SMF...


Analyzing HTTP POST Data

Output:

Variables:

data[0] =>Received: from [10.54.27.151] (unknown [82.113.99.151])
data[1] => (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
data[2] => (No client certificate requested)
data[3] => by vservxx.netboom.net (Postfix) with ESMTPSA id 6A8CF2E0A2
data[4] => for <[email protected]>; Wed,  5 Dec 2012 15:45:36 +0100 (CET)
data[5] =>Message-ID: <[email protected]>
data[6] =>Date: Wed, 05 Dec 2012 15:45:25 +0100
data[7] =>From: mydomain <[email protected]>
data[8] =>User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
data[9] =>MIME-Version: 1.0
data[10] =>To: [email protected]
data[11] =>Subject: TEST v. TESTNICK
data[12] =>Content-Type: text/plain; charset=ISO-8859-15; format=flowed
data[13] =>Content-Transfer-Encoding: 7bit
data[14] =>
data[15] =>mit MAIL-ADDresse von Webhoster
data[16] =>

Raw POST Stream:
Received: from [10.54.27.151] (unknown [82.113.99.151])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by vservxx.netboom.net (Postfix) with ESMTPSA id 6A8CF2E0A2
for <[email protected]>; Wed,  5 Dec 2012 15:45:36 +0100 (CET)
Message-ID: <[email protected]>
Date: Wed, 05 Dec 2012 15:45:25 +0100
From: mydomain <[email protected]>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: [email protected]
Subject: TEST v. TESTNICK
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

mit MAIL-ADDresse von Webhoster

USING POST STREAM...
Header[message-id] = <[email protected]>
Header[from] = mydomain <[email protected]>
Header[to] = [email protected]
Header[subject] = TEST v. TESTNICK
Header[content-type] = text/plain; charset=ISO-8859-15; format=flowed
Header[content-transfer-encoding] = 7bit

Sending to Board: 2, with prefix ``
Non-Default Address Used.  Checking [email protected]
Comparing `[email protected]` to `[email protected]`
Not `[email protected]`.
Comparing `[email protected]` to `[email protected]`
Not `[email protected]`.
Isolated Email From = [email protected], Name = mydomain
DEBUGGER -> User Found: TESTNICK

DEBUGGER -> Message Boundary: 
DEBUGGER -> Attachments Boundary:

DEBUGGER -> Message Body:

mit MAIL-ADDresse von Webhoster

DEBUGGER -> CONTENT-TYPE NOT MULTIPART, USING HEADER: text/plain; charset=ISO-8859-15; format=flowed
CONTENT-TYPE PLAINTEXT and CHARSET ISO-8859-15;



DEBUGGER -> Checking that line break exists between headers and content.



DEBUGGER -> HEADERS PULLED OUT FOR CURRENT MESSAGE FORMAT:



DEBUGGER -> SELECTING EMAIL FORMAT: PLAINTEXT


mit MAIL-ADDresse von Webhoster

DEBUGGER -> ENCODING DETECTED IN HEADER: 7bit



DEBUGGER -> DECODING EMAIL: 7bit


mit MAIL-ADDresse von Webhoster

DEBUGGER -> Converted to post: PLAINTEXT

mit MAIL-ADDresse von Webhoster
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

Kendrall

Looks interesting.  I'll try to implement it on my test forum before I put it into production on the forum that I'm helping out with; play around with it to see how it will fit into the overall scheme of things.

Inti31

@Kendrall  - please let me know if a normal user/global mod could post a topic by mail....

at time, its only me as the admin
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

Kendrall

Quote from: Inti31 on December 06, 2012, 06:43:04 AM
@Kendrall  - please let me know if a normal user/global mod could post a topic by mail....

at time, its only me as the admin

Sure thing, but it'll be some time before I can work on it.  Real life and all that, you know :)

nolageek

#64
This does exactly what I need it to!  One thing though - image attachments always show as downloads under the post because image demention information doesn't get put into the database - therefore SMF doesn't realize it's an image nor does it trigger any other image options (resize, inline, etc...)   Any way to get the Mailing Mod to analyze images and put this info in?


pftq

Sorry for the late reply.  Was kind of off the grid for a bit. -_-

@Inti31: Regarding posting permissions - it should be the same as topic permissions.  If the user could post to the topic, the user will be able to reply by email.  I'm not sure why it'd behave otherwise.  The log looks fine.  Are you getting any error messages?

@nolageek: I'll see about updating the mod to identify images later later this week.

ChaosEnergy

Hi

i m trying to get this mod working

message log says, email delivered to script ok

but nothign happens, so i tried the script local on console
then i get a lot of messages from bad behavior mod, assuming a conflict in compatibility between both
Chaos Empire ®

pftq

Possible.  This mod modifies a lot of the post-related functions.  Do you have a link to the mod?

paudax

Noting the disclaimer:
      ** This mod does not check for email spoofing when matching addresses to existing members.  It is designed for smaller forum communities where this is less likely to be an issue.

Can somebody explain the issues arising here?

Thanks,


Kindred

what this means is that ---  if your community gets big enough to be noticed - someone COULD spoof the email address and load your forum full of spam from any of your users, because the emails are not acutally CHECKED to validated that they come from the real user.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

libengine

Hi all,

first of all: I really love this mod!    :D

I've got a problem using it with cloudmailin:
emailpost.php doesn't handle the german Umlauts correctly.

data[14] =>Content-Type: text/plain; charset=ISO-8859-15
data[15] =>Content-Transfer-Encoding: 8bit

That should work, but it doesn't when I choose 'Original Format (depreceated)' in the target of cloudmailin.
I checked your online-demo. Umlauts get handled correctly, but the line-feeds get killed along with same mail-header.

greetings,
Holger

libengine

 I checked the targets 'JSON Format' and 'Raw Format'
'Raw Format' scrambles the Umlauts the same way like 'Original Format'
'JSON Format' in cloudmailin doesn't work at all. Here is the test.txt, result of 'JSON Format':


DEBUGGER -> Initiating...2013-12-14, 22:15:26

DEBUGGER -> Loading SSI...

DEBUGGER -> Beginning email parse...DEBUGGER -> Nullifying slashes added by SMF...


Analyzing HTTP POST Data

Output:

Variables:


Attempting to Parse Post Stream:

data[0] =>{

data[1] =>  "headers": {

data[2] =>    "Received": "from [31.19.27.23] (helo=[192.168.178.98]) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from <[email protected]>) id 1VrwYW-0003Dy-Rw for [email protected]; Sat, 14 Dec 2013 22:15:24 +0100",

data[3] =>    "Date": "Sat, 14 Dec 2013 22:15:25 +0100",

data[4] =>    "From": "Holger Nassenstein <[email protected]>",

data[5] =>    "To": "Forum Liegeradstammtisch Hamburg <[email protected]>",

data[6] =>    "Message-ID": "<[email protected]>",

data[7] =>    "Subject": "Neues Forum2",

data[8] =>    "Mime-Version": "1.0",

data[9] =>    "Content-Type": "text/plain; charset=ISO-8859-15",

data[10] =>    "Content-Transfer-Encoding": "8bit",

data[11] =>    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0",

data[12] =>    "X-Enigmail-Version": "1.6",

data[13] =>    "X-Con-Id": "176075",

data[14] =>    "X-Con-U": "0-mail",

data[15] =>    "X-Originating-IP": "31.19.27.23"

data[16] =>  },

data[17] =>  "envelope": {

data[18] =>    "to": "[email protected]",

data[19] =>    "recipients": [

data[20] =>      "[email protected]"

data[21] =>    ],

data[22] =>    "from": "[email protected]",

data[23] =>    "helo_domain": "ms-10.1blu.de",

data[24] =>    "remote_ip": "178.254.4.101",

data[25] =>    "spf": {

data[26] =>      "result": "none",

data[27] =>      "domain": "nassenstein.net"

data[28] =>    }

data[29] =>  },

data[30] =>  "plain": "Hi,\n\nich habe ein neues Forum installiert, das einige zusätzliche Features\nbietet, u.A. integriert es eine Mailing Liste. :)\n\nWas ändert sich?\n\n* Du gehörst zu den auserwählten Teilnehmern für die sich fast nichts\nändert, da Du bereits registriert bist.\n* Der Content des bisherigen Forums wurde übernommen. Lediglich das\nErstellungs-Datum der Beiträge stimmt nicht.\n* Evtl. musst Du ein neues Avatar in Dein Profil einstellen und Deine\nProfildaten nachsehen. Dein sichtbarer Benutzername im Forum kann jetzt\nvon Dir editiert werden.\n* Natürlich ändert sich die Adresse der Mailing Liste:\[email protected]. Diese Adresse kannst Du auch für einen\nMail-Filter in Deinem eMail-Programm nutzen. Es ist die Absender- und\nEmpfänger-Adresse der Mailing Liste.\n\nEs geht noch ein zweites Mail an alle über die alte Mailing Liste, die\nDich aber nicht betrifft.\n\nBeste Grüße,\n\nHolger\n",

data[31] =>  "html": null,

data[32] =>  "reply_plain": "Hi,\n\nich habe ein neues Forum installiert, das einige zusätzliche Features\nbietet, u.A. integriert es eine Mailing Liste. :)\n\nWas ändert sich?\n\n* Du gehörst zu den auserwählten Teilnehmern für die sich fast nichts\nändert, da Du bereits registriert bist.\n* Der Content des bisherigen Forums wurde übernommen. Lediglich das\nErstellungs-Datum der Beiträge stimmt nicht.\n* Evtl. musst Du ein neues Avatar in Dein Profil einstellen und Deine\nProfildaten nachsehen. Dein sichtbarer Benutzername im Forum kann jetzt\nvon Dir editiert werden.\n* Natürlich ändert sich die Adresse der Mailing Liste:\[email protected]. Diese Adresse kannst Du auch für einen\nMail-Filter in Deinem eMail-Programm nutzen. Es ist die Absender- und\nEmpfänger-Adresse der Mailing Liste.\n\nEs geht noch ein zweites Mail an alle über die alte Mailing Liste, die\nDich aber nicht betrifft.\n\nBeste Grüße,\n\nHolger\n",

data[33] =>  "attachments": [

data[34] =>

data[35] =>  ]

data[36] =>}

Raw POST Stream:
{

  "headers": {

    "Received": "from [31.19.27.23] (helo=[192.168.178.98]) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from <[email protected]>) id 1VrwYW-0003Dy-Rw for [email protected]; Sat, 14 Dec 2013 22:15:24 +0100",

    "Date": "Sat, 14 Dec 2013 22:15:25 +0100",

    "From": "Holger Nassenstein <[email protected]>",

    "To": "Forum Liegeradstammtisch Hamburg <[email protected]>",

    "Message-ID": "<[email protected]>",

    "Subject": "Neues Forum2",

    "Mime-Version": "1.0",

    "Content-Type": "text/plain; charset=ISO-8859-15",

    "Content-Transfer-Encoding": "8bit",

    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0",

    "X-Enigmail-Version": "1.6",

    "X-Con-Id": "176075",

    "X-Con-U": "0-mail",

    "X-Originating-IP": "31.19.27.23"

  },

  "envelope": {

    "to": "[email protected]",

    "recipients": [

      "[email protected]"

    ],

    "from": "[email protected]",

    "helo_domain": "ms-10.1blu.de",

    "remote_ip": "178.254.4.101",

    "spf": {

      "result": "none",

      "domain": "nassenstein.net"

    }

  },

  "plain": "Hi,\n\nich habe ein neues Forum installiert, das einige zusätzliche Features\nbietet, u.A. integriert es eine Mailing Liste. :)\n\nWas ändert sich?\n\n* Du gehörst zu den auserwählten Teilnehmern für die sich fast nichts\nändert, da Du bereits registriert bist.\n* Der Content des bisherigen Forums wurde übernommen. Lediglich das\nErstellungs-Datum der Beiträge stimmt nicht.\n* Evtl. musst Du ein neues Avatar in Dein Profil einstellen und Deine\nProfildaten nachsehen. Dein sichtbarer Benutzername im Forum kann jetzt\nvon Dir editiert werden.\n* Natürlich ändert sich die Adresse der Mailing Liste:\[email protected]. Diese Adresse kannst Du auch für einen\nMail-Filter in Deinem eMail-Programm nutzen. Es ist die Absender- und\nEmpfänger-Adresse der Mailing Liste.\n\nEs geht noch ein zweites Mail an alle über die alte Mailing Liste, die\nDich aber nicht betrifft.\n\nBeste Grüße,\n\nHolger\n",

  "html": null,

  "reply_plain": "Hi,\n\nich habe ein neues Forum installiert, das einige zusätzliche Features\nbietet, u.A. integriert es eine Mailing Liste. :)\n\nWas ändert sich?\n\n* Du gehörst zu den auserwählten Teilnehmern für die sich fast nichts\nändert, da Du bereits registriert bist.\n* Der Content des bisherigen Forums wurde übernommen. Lediglich das\nErstellungs-Datum der Beiträge stimmt nicht.\n* Evtl. musst Du ein neues Avatar in Dein Profil einstellen und Deine\nProfildaten nachsehen. Dein sichtbarer Benutzername im Forum kann jetzt\nvon Dir editiert werden.\n* Natürlich ändert sich die Adresse der Mailing Liste:\[email protected]. Diese Adresse kannst Du auch für einen\nMail-Filter in Deinem eMail-Programm nutzen. Es ist die Absender- und\nEmpfänger-Adresse der Mailing Liste.\n\nEs geht noch ein zweites Mail an alle über die alte Mailing Liste, die\nDich aber nicht betrifft.\n\nBeste Grüße,\n\nHolger\n",

  "attachments": [



  ]

}
USING POST STREAM...

Cyberm@rmotte

Where can we get the latest testing version?

pftq

This is already in the mods directory (it's not a work-in-progress).
http://custom.simplemachines.org/mods/index.php?mod=2843

Cyberm@rmotte

Yeah but I tried on 2.0.8 and it doesn't work. I'm using not the email piping but the other method with the service you provide...

pftq

The service might have changed.  I personally use the email piping - that would be the ideal if you can set up your server to use that.  I'll check later when I have a chance.

Cyberm@rmotte

Yes but I checked on 1and1 and they do not support email piping.... ******.

mnn2

@pftq

thanks for your mod. Please let me know where to make changes if I want 'Email to Edit' post functionality.  :)

pftq

emailpost.php is where incoming emails are handled.  Adding a case for calling SMF's modify functions will be the way to go.  Feel free to share if you get a generalizable update to the mod.

mnn2

Hi pftq,

again thanks for your mod, although my usage is to enable posting to SMF forum via WinForm executable (an MS .net application). Here is how I do to modify existing SMF post.

Here is my code:


// Setup the variables.
$msgOptions = array(
'id' => (int)$_POST['MyyPostId'],//the SMF message id you want to modify
'subject' => $Subject200, //the post subject
'body' =>  $TopicContent201,//this is the content of your post
'smileys_enabled' => $EnableSmiley202, // put in 1 if you want to activate smiley, otherwise 0
'attachments' => $attachIDs,//this part I am not using
'modify_name' => $_POST['MyyPosterName'],//NOTE: will show the name as in  « Last Edit: Today at 08:04:00 pm by Administrator »
'modify_time' => time(),//NOTE: will show the time as in  « Last Edit: Today at 08:04:00 pm by Administrator »
);
$topicOptions = array(
'id' => $TopicId202,//the topic id you wanted to modify
'board' => $BoardId203,//board id of that topic
'mark_as_read' => false,//leave it as is
);
$posterOptions = array(
'id' => 2,//your SMF user id
'name' => 'Administrator',//your SMF user's real name
'email' => '[email protected]',//email address
'update_post_count' => 1,//leave it as is
'ip' => '120.0.0.1',//the ip address or simply put it '120.0.0.1'
);

$user_info['name']=$posterOptions['name'];

// now attempt to modify the post.
modifyPost($msgOptions, $topicOptions, $posterOptions);



Advertisement: