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

Home » FUDforum » How To » Maillist connections
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Maillist connections [message #7691] Wed, 11 December 2002 14:32 Go to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
When I try to connect my forum with an email address I get
(from my .procmailrc)

--- Logging /home/devlist/procmail.log for devlist, From test(at)test(dot)com Wed Dec 11 16:49:16 2002
Subject: TESTING Folder: /var/..../forum/data/scripts/maillist.php 1 2600
/var/..../forum/data/scripts/maillist.php: ?php: No such file or directory
/var/..../forum/data/scripts/maillist.php: /bin: is a directory
/var/..../forum/data/scripts/maillist.php: line 5: syntax error near unexpected token `(C'
/var/..../forum/data/scripts/maillist.php: line 5: `* copyright : (C) 2001,2002 Advanced Internet Desi
gns Inc.'

It seems like the php translation fails... Any suggestions?
Re: Maillist connections [message #7694 is a reply to message #7691] Wed, 11 December 2002 17:19 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
check line #1 of the maillist.php script make sure it has
#!/path/to/you/php/binary


FUDforum Core Developer
Re: Maillist connections [message #7702 is a reply to message #7694] Wed, 11 December 2002 18:27 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
Yep, first line is:
#!/usr/local/bin/php -d register_argc_argv=1 -q
if I try
>which php
I get
/usr/local/bin/php

so it seems like that path is correct.
Trying
>php /var/.../forum/data/scripts/maillist.php
returns
Missing Forum ID Paramater
so the .php seems fine.
Re: Maillist connections [message #7704 is a reply to message #7702] Wed, 11 December 2002 18:51 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
does the script start witrh <?php the < could be missing or there may be a space between < & ?

FUDforum Core Developer
Re: Maillist connections [message #7708 is a reply to message #7704] Thu, 12 December 2002 08:37 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
My maillist.php begins with:

#!/usr/local/bin/php -d register_argc_argv=1 -q
<?php

/************************************************************************** *
* copyright : (C) 2001,2002 Advanced Internet Designs Inc.
* email : forum(at)prohost(dot)org
*
* $Id: maillist.php,v 1.21 2002/11/21 21:42:45 hackie Exp $
**
Re: Maillist connections [message #7710 is a reply to message #7708] Thu, 12 December 2002 15:05 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
It looks like instead of PHP parsing the file it is being parsed by sh. Try doing this:
echo '<?php phpinfo(); ?>' | /usr/local/bin/php -q


FUDforum Core Developer
Re: Maillist connections [message #7711 is a reply to message #7710] Thu, 12 December 2002 15:13 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
I get
phpinfo()
PHP Version => 4.3.0-dev

System => Linux aw***.**.com 2.4.9-34 #1 Sat Jun 1 06:25:16 EDT 2002 i686
Build Date => Dec 4 2002 18:10:03
Configure Command => './configure' '--with-mysql'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp


This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
.....

[Updated on: Thu, 12 December 2002 15:14]

Report message to a moderator

Re: Maillist connections [message #7712 is a reply to message #7711] Thu, 12 December 2002 15:16 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
Not sure, I am running PHP 4.2.3 & 4.3.0RC3 on the dev server here and both work correctly.

FUDforum Core Developer
Re: Maillist connections [message #7713 is a reply to message #7712] Thu, 12 December 2002 15:49 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
I think I got the same kind of problem when I tried to install some other PHP aplications. It seems like the PHP engine isn't invoked, but rather the shell tries to run the php as a batch file.

Is there another way to call maillist.php from my .procmailrc?

[Updated on: Thu, 12 December 2002 15:50]

Report message to a moderator

Re: Maillist connections [message #7714 is a reply to message #7713] Thu, 12 December 2002 15:52 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
You can try running it like this:
/usr/local/bin/php -d register_argc_argv=1 script_name.php


FUDforum Core Developer
Re: Maillist connections [message #7715 is a reply to message #7714] Thu, 12 December 2002 16:22 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
Now the procmail log is clean, but I don't get any threads in my forum. Is there a way to log the indata to maillist.php?
Re: Maillist connections [message #7716 is a reply to message #7715] Thu, 12 December 2002 16:24 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
Make procmail log all data, read up on procmail docs on how to make it do that. Make sure that you set logging to verbose so that you can see any errors if they occur.

FUDforum Core Developer
Re: Maillist connections [message #7717 is a reply to message #7716] Thu, 12 December 2002 16:34 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
Ok, I already have my .procmailrc log everything it does.
The log say
procmail: Bypassed locking "/var/spool/mail/devlist.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/devlist"
procmail: Opening "/var/spool/mail/devlist"
procmail: Acquiring kernel-lock
procmail: Executing "/usr/local/bin/php,-d,register_argc_argv=1,/var/www/html/ma
ngo/forum/data/scripts/maillist.php"
procmail: Notified comsat: "devlist@2597:/var/spool/mail/devlist"
From user(at)mail(dot)com Thu Dec 12 18:55:59 2002
Subject: Test Folder: /var/spool/mail/devlist

which to me looks like the call to maillist.php is ok.
No I wonder why or where maillist.php fails. My forum id
matches the id in .procmailrc, the mailaddress is the same as in the FUD admin.
Re: Maillist connections [message #7718 is a reply to message #7717] Thu, 12 December 2002 16:41 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
Did you unlock the forum as advised in the manual & the maillist control panel?

FUDforum Core Developer
Re: Maillist connections [message #7719 is a reply to message #7718] Thu, 12 December 2002 17:04 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
Yes, I did. I tried to do it again and got
ERROR: /var/www/html/mango/adm/GLOBALS.php -> f (777)
ERROR: /var/www/html/mango/FUDforum21 -> d (777)
ERROR: /var/www/html/mango/FUDforum21/README -> f (777)
ERROR: /var/www/html/mango/FUDforum21/COPYING -> f (777)
...
ERROR: /var/www/html/mango/forum/data/include/ext.inc -> f (777)
ERROR: /var/www/html/mango/forum/data/include/announce_adm.inc -> f (777)
ERROR: /var/www/html/mango/forum/data/include/core.inc -> f (777)
ERROR: /var/www/html/mango/forum/data/include/mlist.inc -> f (777)
ERROR: /var/www/html/mango/forum/data/include/adm.inc -> f (777)
ERROR: /var/www/html/mango/forum/data/include/mlist_post.inc -> f (777)
ERROR: /var/www/html/mango/forum/data/include/static -> d (777)

on all (I think) the files in my lib. I looked
in ...../forum/data/error/.mlist and found
ERROR :: Wed, 11 Dec 2002 19:01:27 +0100 :: no name or email for :: /var/www/html/mango/forum/data/errors/.mlist/1039629687_d41d8cd98f00b204e98 00998ecf8427e



[Updated on: Thu, 12 December 2002 17:06]

Report message to a moderator

Re: Maillist connections [message #7720 is a reply to message #7719] Thu, 12 December 2002 17:05 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
Looks likes the message you've tried to 'import' didn't have all the necessary headers needed.

FUDforum Core Developer
Re: Maillist connections [message #7721 is a reply to message #7720] Thu, 12 December 2002 17:07 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
ok.
I will try to forward a copy of the mail to another mail address and check the result.
Re: Maillist connections [message #7722 is a reply to message #7721] Thu, 12 December 2002 17:14 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
No, the mail headers look ok. The error message is from before I changed to
/usr/local/bin/php -d register_argc_argv=1 script_name.php
and may have to do with that error.
Re: Maillist connections [message #7729 is a reply to message #7722] Fri, 13 December 2002 00:29 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
Unsual, first time I see this kinda error.

FUDforum Core Developer
Re: Maillist connections [message #7748 is a reply to message #7729] Fri, 13 December 2002 15:27 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
ok...
which headers are needed? Is it possible that this is a configuration problem from within the system, i.e the admin tool?
is there a way to run maillist.php from the prompt to see if it is possible to "force" a new topic?
Re: Maillist connections [message #7749 is a reply to message #7748] Fri, 13 December 2002 15:29 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
You can run it manually by doing the following:
1) write a complete e-mail message include headers to a file
2) cat email_message | php maillist.php rule_id


FUDforum Core Developer
Re: Maillist connections [message #7862 is a reply to message #7749] Wed, 18 December 2002 15:43 Go to previous messageGo to next message
sorha2   Sweden
Messages: 23
Registered: December 2002
Karma: 0
Junior Member
That worked. By doing that I get the message inserted into my forum and a new user is created. Does this indicate that there is something wrong with my .procmailrc?
Re: Maillist connections [message #7875 is a reply to message #7862] Fri, 20 December 2002 03:23 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
yes.

FUDforum Core Developer
Re: Maillist connections [message #9012 is a reply to message #7691] Thu, 06 March 2003 16:07 Go to previous messageGo to next message
jgbutler is currently offline  jgbutler   United States
Messages: 19
Registered: March 2003
Location: Northport, AL
Karma: 0
Junior Member
Was this thread (from three months ago) ever fully resolved? Does maillist.php need to be hacked, or is there a patch?

I've just installed FUDforum and am trying to use it as a gateway to several mailing lists. Procmail appears to recognize the pipe I've put in procmailrc, but it fails while running the maillist.php.

I'm using FUDforum 2.3.7 and PHP 4.3.0 on Red Hat 8.

Thanks for any additional info.

--My Procmail log--

procmail: [23912] Thu Mar 6 10:00:49 2003
procmail: Assigning "MAILDIR=/home/archive/mail"
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)? )-To)Sad.*[^-a-zA-Z0-9_.]$
procmail: Couldn't determine implicit lockfile from "/www/html/forum/data/scripts/maillist.php"
procmail: Locking ".lock"
procmail: Executing "/www/html/forum/data/scripts/maillist.php,1"
/www/html/forum/data/scripts/maillist.php: line 2: ?php: No such file or directory
/www/html/forum/data/scripts/maillist.php: line 4: /bin: is a directory
/www/html/forum/data/scripts/maillist.php: line 5: syntax error near unexpected token `('
/www/html/forum/data/scripts/maillist.php: line 5: `* copyright : (C) 2001,2002 Advanced Internet De$
procmail: [23912] Thu Mar 6 10:00:50 2003
procmail: Non-zero exitcode (2) from "/www/html/forum/data/scripts/maillist.php"
procmail: Assigning "LASTFOLDER=/www/html/forum/data/scripts/maillist.php 1"
procmail: Unlocking ".lock"
Re: Maillist connections [message #9089 is a reply to message #9012] Thu, 13 March 2003 14:31 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
Show me the 1st 3 lines from that script.

FUDforum Core Developer
Re: Maillist connections [message #9120 is a reply to message #9089] Thu, 13 March 2003 15:04 Go to previous messageGo to next message
jgbutler is currently offline  jgbutler   United States
Messages: 19
Registered: March 2003
Location: Northport, AL
Karma: 0
Junior Member
Actually, a PHP-programmer friend and I resolved this issue by deleting the first line from maillist.php:

#!/usr/local/bin/php -d register_argc_argv=1 -q

AND changing the pipe in .procmailrc from

| /www/html/forum/data/scripts/maillist.php 1

to

| /usr/local/bin/php /www/html/forum/data/scripts/maillist.php 1

I don't know exactly why this worked, but my friend said something about running PHP as a CLI.

Is there a better solution?

Thanks,

Jeremy
Re: Maillist connections [message #9130 is a reply to message #9120] Thu, 13 March 2003 15:22 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
Either way should work fine. But in the original way the maillist.php script needs to be executable.

FUDforum Core Developer
Re: Maillist connections [message #9134 is a reply to message #9130] Thu, 13 March 2003 15:37 Go to previous messageGo to next message
jgbutler is currently offline  jgbutler   United States
Messages: 19
Registered: March 2003
Location: Northport, AL
Karma: 0
Junior Member
Hmmmm . . . I wonder why the original didn't work, then, cuz it was set to

-rwxrwxrwx    1 nobody   nobody      20000 Mar  8 13:27 maillist.php


Re: Maillist connections [message #9137 is a reply to message #9134] Thu, 13 March 2003 15:40 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
Don't know, I've never encountered this problem or at least noticed that the fix you've mentioned did anything...



FUDforum Core Developer
Re: Maillist connections [message #9242 is a reply to message #7691] Tue, 18 March 2003 14:45 Go to previous messageGo to next message
forrie is currently offline  forrie   United States
Messages: 47
Registered: August 2002
Location: Derry, NH
Karma: 0
Member

I've been testing the maillist.php feature via sendmail aliases, and am unable to get it working properly. It seems this should work, since doing this via procmail is the same method (a pipe).

I have:

myalias: "| /usr/local/apache/htdocs/forumdata/scripts/maillist.php 1"

The sendmail log shows it's being processed correctly, but it does not show up in the forum.

However, if I take a raw file and do (from the shell):

# cat filename | /usr/local/apache/htdocs/forumdata/scripts/maillist.php 1

then it works. So I'm curious if something is broken or if I'm overlooking something in the configuration.

I tried this in LOCKED and UNLOCKED modes, to no avail.

Now, what I'm trying to do in this case is to pipe some emails that are being sent inbound - it's not being run by a "mailing list package" it's just a simple email alias... is this something that maillist.php won't handle? It doesn't appear to in this case though.



Thanks.
Re: Maillist connections [message #9243 is a reply to message #9242] Tue, 18 March 2003 19:13 Go to previous messageGo to next message
forrie is currently offline  forrie   United States
Messages: 47
Registered: August 2002
Location: Derry, NH
Karma: 0
Member
I was able to get this working by first UNLOCKING the forum (bad) and by altering the script's first #! line as mentioned above.

This is a BUG, and I hope the coders fix this - I was trying to demo this to a customer, and how embarrassing.

What is the fix forthcoming, perhaps spiff up maillist.php to be "better" at picking up headers, etc. Maybe even a way to configure it.. or don't use php, use Perl?

Then... magically, this stopped working for some reason. Procmail is logging this error:

procmail: Couldn't determine implicit lockfile from "/usr/local/apache/virtual/anemsys.com/forumdata/scripts/maillist.php& quot;

Which it did -not- coplain about previously.




[Updated on: Tue, 18 March 2003 19:34]

Report message to a moderator

Re: Maillist connections [message #9286 is a reply to message #9243] Thu, 20 March 2003 18:36 Go to previous messageGo to next message
forrie is currently offline  forrie   United States
Messages: 47
Registered: August 2002
Location: Derry, NH
Karma: 0
Member
Perhaps a better solution to this issue is to have certain auxiliary programs like maillist.php and nntp.php installed in a different location that will not be modified or accessed directly by the Fudforum installation. This would resolve the problem of having these scripts changed (perms) when you lock/unlock, etc.



Re: Maillist connections [message #9326 is a reply to message #9286] Mon, 24 March 2003 15:16 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
Cannot be done, because they need to access forum files & directory to write messages as well as deal with file uploads. These files also depend on numerous forum libraries that they need to access.

FUDforum Core Developer
Re: Maillist connections [message #9887 is a reply to message #7691] Wed, 07 May 2003 05:25 Go to previous message
RacerxDiscussions is currently offline  RacerxDiscussions   United States
Messages: 2
Registered: May 2003
Location: Ohio
Karma: 0
Junior Member
I was having the Same issue.
The problem seems to be the path and file permissions on my box.

I'm running Mandrake 8.2 and using postfix
I had to change the path in the first line from
usr/local/bin/php
to
usr/bin/php
and I had to ensure I set permissions to rwxrwxrwx on maillist.php before the script would execute.

2 things to note.

  1. there is a symlink from usr/bin/php to usr/local/bin/php on my system, but for whatever reason it was puking using the symlink
  2. for whatever reason, the alias via postfix did not execute properly either. I wound up creating a .procmailrc and following the program.

It makes no sense that the postfix alias didn't work and no sense that the symlink didn't work, but there HAS to be some little nuance that is causing the error above.

Greg S
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: about Body Mangling
Next Topic: How do I move topic (no move topic link)
Goto Forum:
  

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

Current Time: Sat Nov 30 06:01:25 GMT 2024

Total time taken to generate the page: 0.02692 seconds