FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Using maillist.php without procmail?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Using maillist.php without procmail? [message #11379] Thu, 26 June 2003 20:26 Go to next message
stevie is currently offline  stevie   United States
Messages: 35
Registered: May 2003
Location: Boston area, USA
Karma: 0
Member
I'm probably trying to do something similar to this person:

http://fud.prohost.org/forum/index.php?t=msg&th=2390&start=0&ri d=878


I'd like to use maillist.php to process incoming emails into FUDforum without using procmail.

I don't have shell access, but if I did, it sounds like I would want to do something like:

cat mail.txt | /usr/local/bin/php -q /www/forum/data/scripts/maillist.php 1


Questions:

(1) the format of mail.txt - would this be the same as a typical mbox file? (http://www.qmail.org/qmail-manual-html/man5/mbox.html)

(2) what happens if mail.txt contains more than one message?

Thanks very much. And congratulations on the release of v2.5.0!!!

-Steve

Re: Using maillist.php without procmail? [message #11381 is a reply to message #11379] Thu, 26 June 2003 20:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
mail.txt must be a complete message (1 message) including all the headers.

FUDforum Core Developer
icon14.gif  Re: Using maillist.php without procmail? [message #11416 is a reply to message #11381] Fri, 27 June 2003 18:40 Go to previous messageGo to next message
stevie is currently offline  stevie   United States
Messages: 35
Registered: May 2003
Location: Boston area, USA
Karma: 0
Member
Shocked I can't believe it, I actually got it to work!!! Thanks for all your help!

Steps, for the interest of anyone else that might want to try an end-run around procmail:

  • Started with a single message in an "mbox" formatted textfile, on my hosted server
  • Made a php file on my web server with this content: <?php
    echo shell_exec("cat /home/myname/public_html/test/mbox1 | /usr/local/bin/php -q /home/myname/FUDforum/scripts/maillist.php 1");
    ?>
  • accessed the above php file using my browser
  • whammo, the contents of the mbox file was very nicely added to my forum!!!


I understand if you have procmail, and understand how to use procmail, that's a great way to go, but for the rest of us, there is definitely an alternative! Now, I still have to work out how to deal with mbox files with many messages, and how to get this script to execute as often as necessary, but I don't believe those will be big stumbling blocks. Again, thanks to protoss, (and also to Gaėtan for teaching me the shell_exec technique)! -Steve
Re: Using maillist.php without procmail? [message #11470 is a reply to message #11379] Mon, 30 June 2003 09:55 Go to previous message
GaĆ«tan is currently offline  GaĆ«tan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

Unfortunately it doesn't work for me Confused

Stevie could you send me your maillist.php and which fields you have got in your mbox1 file ?

Thank's


Gaƫtan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Peculiar Weirdness
Next Topic: a.CatLink:Hover & a.CatLink:Visited
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 15:32:12 GMT 2024

Total time taken to generate the page: 0.02504 seconds