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

Home » FUDforum » How To » Qmail Piping to mailing list does not work.
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Qmail Piping to mailing list does not work. [message #21742] Mon, 13 December 2004 23:17 Go to next message
sirroot is currently offline  sirroot   United States
Messages: 5
Registered: December 2004
Karma: 0
Junior Member
ok...
so when i do cat /tmp/somemmail | maillist.php 1
that will work....i get the message in the forums(EGW) this is after heavily modifying the maillist.php to get it to work in EGW...(there was a problem with mysql and the fud_sql_lnk)

well now when i put a bash script of mallist.php directly into .qmail-mymaillist it doesnt work...the bash script will write to /tmp/pipe but it wont pipe to maillist.php....i dont know why it doesnt work....someone please help me trouble shoot...

Re: Qmail Piping to mailing list does not work. [message #21744 is a reply to message #21742] Tue, 14 December 2004 00:10 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 may need to pipe the message to "php maillist.php"

FUDforum Core Developer
Re: Qmail Piping to mailing list does not work. [message #21746 is a reply to message #21742] Tue, 14 December 2004 01:11 Go to previous messageGo to next message
sirroot is currently offline  sirroot   United States
Messages: 5
Registered: December 2004
Karma: 0
Junior Member
nope that doesnt work...
just so you know my setup...
here is my .qmail-mylist file
|/home/mygroup/groupfiles/fudforum/3814588639/scripts/maillist.php 1
|preline /home/mailman/mail/mailman post karyakars-test

this doesnt work an causes the mail to get stuck...i think its because qmail require you to exit(0); i put that in the maillist.php but that didnt work either...

so i created a shell script to simply pipe...here is my shell script called fudtrap.sh
#`(cat > /tmp/pipe)`
`(cat |/usr/bin/php $1 $2)`
#/bin/cat /tmp/pipe| $1 $2 > /tmp/pipe2
#`(cat /tmp/pipe |$1 $2)`
exit 0

change my .qmail-mylist to
|/path/to/my/fudtrap.sh /home/mygroup/groupfiles/fudforum/3814588639/scripts/maillist.php 1
|preline /home/mailman/mail/mailman post karyakars-test

that doesnt work..however the mail goes throuigh and doesnt get stuck in queue...it also registers in my mailman but for some wierd reson it doesnt pipe to maillist.php correct.....
however if i pipe to /tmp/pipe instead of maillist.php it works...also ifi run this command from shell it workd... if i run for example cat /tmp/pipe | /path/to/my/fudtrap.sh /home/mygroup/groupfiles/fudforum/3814588639/scripts/maillist.php 1

it works....

its so wierd i dont know whats wrong....

im pulling my hair out...although i did fix the common errors for maillist.php and egw (the db.inc error) Smile

[Updated on: Tue, 14 December 2004 01:21]

Report message to a moderator

Re: Qmail Piping to mailing list does not work. [message #21750 is a reply to message #21746] Tue, 14 December 2004 17:56 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
Could it be you are having a permissions issue, when it is ran automatically is it being ran by the same user?

FUDforum Core Developer
Re: Qmail Piping to mailing list does not work. [message #21751 is a reply to message #21746] Tue, 14 December 2004 17:57 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
I've got it working with qmail using a different approach.

I subscribe an addtional user to my mailing list, lets call him fudlist1(at)mylistdomain(dot)com, and I direct my mail through procmail.

In .procmailrc I have:

:0:
* ^TO_.*fudlist1(at)mylistdomain(dot)com
{
EXITCODE=99
:0
| /path/to/scripts/maillist.php 8
}

In this way mail is forwarded to the forum only after it has been through the mailing list (ezmlm in my case) and so is subject to restrictions on subscribers etc imposed there.

Your way would, I think, mean that any emails to the list address, even non-subscribers to your list or forum, would automatically be forwarded to maillist.php, which may not be what you want if a spammer gets hold of your list address...


Simon Child
Re: Qmail Piping to mailing list does not work. [message #21752 is a reply to message #21750] Tue, 14 December 2004 18:13 Go to previous messageGo to next message
sirroot is currently offline  sirroot   United States
Messages: 5
Registered: December 2004
Karma: 0
Junior Member
Ilia wrote on Tue, 14 December 2004 12:56

Could it be you are having a permissions issue, when it is ran automatically is it being ran by the same user?


no it s bieng ran by a different user(vpopmail)....but i did sudo vpopmail and it still works...also the permissions are 755...which means it should run regardless..
Re: Qmail Piping to mailing list does not work. [message #21753 is a reply to message #21751] Tue, 14 December 2004 18:46 Go to previous messageGo to next message
sirroot is currently offline  sirroot   United States
Messages: 5
Registered: December 2004
Karma: 0
Junior Member
srchild wrote on Tue, 14 December 2004 12:57

I've got it working with qmail using a different approach.

I subscribe an addtional user to my mailing list, lets call him fudlist1(at)mylistdomain(dot)com, and I direct my mail through procmail.

In .procmailrc I have:

:0:
* ^TO_.*fudlist1(at)mylistdomain(dot)com
{
EXITCODE=99
:0
| /path/to/scripts/maillist.php 8
}

In this way mail is forwarded to the forum only after it has been through the mailing list (ezmlm in my case) and so is subject to restrictions on subscribers etc imposed there.

Your way would, I think, mean that any emails to the list address, even non-subscribers to your list or forum, would automatically be forwarded to maillist.php, which may not be what you want if a spammer gets hold of your list address...



i have vpopmail...where do u put .procmailrc?..what line did u put in .qmail-fudlist1
Re: Qmail Piping to mailing list does not work. [message #21756 is a reply to message #21753] Tue, 14 December 2004 20:51 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
sirroot wrote on Tue, 14 December 2004 18:46


i have vpopmail...where do u put .procmailrc?..what line did u put in .qmail-fudlist1


in .qmail-fudlist1 I have:

|/var/qmail/bin/preline /usr/local/bin/procmail -t

This tells qmail to pass the message to procmail.

The code I posted earlier tells procmail to pass it to maillist.php

Exitcode is 99 there since I don't want any more processing after maillist.php has finished with it.

If that was exitcode 0 then, as well as maillist.php doing its work, procmail would also put a copy in the default mailbox (unless any later rules said to do something different).

Be careful if you don't know procmail - you can lose mail if you set it up incorrectly.

Having said all that, I wonder now if another way is not to use procmail at all. Perhaps it could all be done in .qmail-fudlist1, something like (untested):

| /path/to/scripts/maillist.php 8 || exit 99

So if you leave your .qmail-mylist without any maillist.php line, and subscribe fudlist1 to your mailing list, .qmail-fudlist1 will send the message to the forum (maybe Smile ).



Simon Child
Re: Qmail Piping to mailing list does not work. [message #21781 is a reply to message #21742] Wed, 15 December 2004 21:39 Go to previous messageGo to next message
sirroot is currently offline  sirroot   United States
Messages: 5
Registered: December 2004
Karma: 0
Junior Member
Where did u put .procmailrc....i have virtual domains with vpopmail...will that work?
Re: Qmail Piping to mailing list does not work. [message #21782 is a reply to message #21781] Wed, 15 December 2004 21:43 Go to previous message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
sirroot wrote on Wed, 15 December 2004 21:39

Where did u put .procmailrc....i have virtual domains with vpopmail...will that work?


The usual place for .procmailrc is your home directory.

I don't know vpopmail and I don't know about virtual domains.




Simon Child
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Error Deleting Forums
Next Topic: Show all users email address by default in registration?
Goto Forum:
  

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

Current Time: Fri Nov 22 09:21:30 GMT 2024

Total time taken to generate the page: 0.02480 seconds