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

Home » FUDforum » How To » Configuring Postfix to post to FUDforum
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Configuring Postfix to post to FUDforum [message #36112] Mon, 05 March 2007 15:22 Go to next message
ramsey is currently offline  ramsey   United States
Messages: 11
Registered: March 2007
Location: Atlanta, GA
Karma: 0
Junior Member
I've searched these forums and couldn't find an answer for this, so I'm posting a new topic. If it's already been answered, then I'm sorry; please direct me to the answer.

I'd like to know how to configure Postfix to post incoming mailing list messages to FUDforum. FUDforum gives an example of how to do this with Procmail, but I don't know how to do it with Postfix, so if anyone can show me an example of how to do it, I'd greatly appreciate it.


Ben Ramsey
Re: Configuring Postfix to post to FUDforum [message #36113 is a reply to message #36112] Mon, 05 March 2007 18:40 Go to previous messageGo to next message
dardhal is currently offline  dardhal   Spain
Messages: 9
Registered: November 2006
Location: Spain
Karma: 0
Junior Member
ramsey wrote on Mon, 05 March 2007 16:22

I'd like to know how to configure Postfix to post incoming mailing list messages to FUDforum. FUDforum gives an example of how to do this with Procmail, but I don't know how to do it with Postfix, so if anyone can show me an example of how to do it, I'd greatly appreciate it.


One quick and dirty way to accomplish this is to create another email account, and subscribe it to the mailing list. Then, set up an alias under /etc/aliases or whatever, and make it run some script (the one you refer to, for example). It should work, or at least it should be a step in the right direction.
Re: Configuring Postfix to post to FUDforum [message #36115 is a reply to message #36113] Mon, 05 March 2007 20:03 Go to previous messageGo to next message
ramsey is currently offline  ramsey   United States
Messages: 11
Registered: March 2007
Location: Atlanta, GA
Karma: 0
Junior Member
I've set up my box so that it's only for running mailing lists and doesn't host mail for any accounts. So, creating another e-mail address for this purpose may not be possible on this box. That said, I'm also not a pro at working with Postfix. I'm very new at it, so I'm not quite sure how to do what you're suggesting.

Ben Ramsey
Re: Configuring Postfix to post to FUDforum [message #36116 is a reply to message #36115] Mon, 05 March 2007 20:53 Go to previous messageGo to next message
dardhal is currently offline  dardhal   Spain
Messages: 9
Registered: November 2006
Location: Spain
Karma: 0
Junior Member
ramsey wrote on Mon, 05 March 2007 21:03

I've set up my box so that it's only for running mailing lists and doesn't host mail for any accounts. So, creating another e-mail address for this purpose may not be possible on this box. That said, I'm also not a pro at working with Postfix. I'm very new at it, so I'm not quite sure how to do what you're suggesting.


I don't remember for sure, but I think an alias defined in /etc/aliases and linked to a script should work, whenever the box accepts mail for that email address domain. Just try, should be completely non-intrusive.
Re: Configuring Postfix to post to FUDforum [message #36117 is a reply to message #36116] Mon, 05 March 2007 20:56 Go to previous messageGo to next message
ramsey is currently offline  ramsey   United States
Messages: 11
Registered: March 2007
Location: Atlanta, GA
Karma: 0
Junior Member
I just found this thread, which gives some examples for setting up the alias with postfix, so I'll try that. When I get it working, I'll post my example here:

http://fudforum.org/forum/index.php?t=msg&goto=27900&


Ben Ramsey
Re: Configuring Postfix to post to FUDforum [message #36118 is a reply to message #36117] Mon, 05 March 2007 21:37 Go to previous messageGo to next message
ramsey is currently offline  ramsey   United States
Messages: 11
Registered: March 2007
Location: Atlanta, GA
Karma: 0
Junior Member
Got it working, and in a nutshell, here's how:

In /etc/aliases, I added a new alias:
list-bot: "|/usr/local/bin/php /full/path/to/FUDforum/scripts/maillist.php 1"

Then I ran the "newaliases" command as root (sudo newaliases) and reloaded postfix as root (sudo /etc/init.d/postfix reload).

Next, I set permissions on maillist.php to 777 (chmod 777 maillist.php) so that postfix could execute it (755 may also work just fine, but I haven't tested it).

Finally, I used the Mailman admin interface to subscribe list-bot(at)myhost(dot)com to the mailing list. Now, every message sent to the mailing list goes to list-bot and then gets added to the forum.

The beauty in this approach is that, with an announcements mailing list, everything needs to be approved. If you simply add a rule to pipe all messages to your mailing list address to the forum, then it skips the mailing list approval process, but since I'm piping all messages sent to a subscriber of the list to the forum, then only those messages approved to be sent to the mailing list get posted to the forum.


Ben Ramsey
Re: Configuring Postfix to post to FUDforum [message #159397 is a reply to message #36112] Sat, 30 May 2009 00:32 Go to previous messageGo to next message
mountainfreak is currently offline  mountainfreak
Messages: 11
Registered: May 2009
Karma: 0
Junior Member
Nice. Just wish this worked for me. Tried all you did and even rebooted ... still hasn't worked for me. Even added the virtual user...could pam be a stopping point... maybe the user has to be a system user too? Don't know but I can't get this to work.
Re: Configuring Postfix to post to FUDforum [message #159402 is a reply to message #159397] Sun, 31 May 2009 03:04 Go to previous messageGo to next message
mountainfreak is currently offline  mountainfreak
Messages: 11
Registered: May 2009
Karma: 0
Junior Member
Actually now since I've done this mailman has totally stopped working. Help please. How do I figure out what happened ...what's going on?

Thanks in advance!
Re: Configuring Postfix to post to FUDforum [message #159406 is a reply to message #159402] Sun, 31 May 2009 10:09 Go to previous messageGo to next message
Peter Vendike is currently offline  Peter Vendike   Denmark
Messages: 65
Registered: February 2009
Location: Denmark
Karma: 0
Member
Translator
You should ask on a postfix list, study the how to's for postfix.

Try to get postfix to work the simplest way first, and go on from there.

[Updated on: Sun, 31 May 2009 10:10]

Report message to a moderator

Re: Configuring Postfix to post to FUDforum [message #159412 is a reply to message #159406] Sun, 31 May 2009 19:47 Go to previous messageGo to next message
mountainfreak is currently offline  mountainfreak
Messages: 11
Registered: May 2009
Karma: 0
Junior Member
Actually seems like I should hit the mailman lists again. Since postfix is working for mail. Just seems odd that making the changes for fudforum to recieve posts from mailman broke mailman. Which was working until I did this.
Re: Configuring Postfix to post to FUDforum [message #159415 is a reply to message #36112] Mon, 01 June 2009 06:25 Go to previous messageGo to next message
Peter Vendike is currently offline  Peter Vendike   Denmark
Messages: 65
Registered: February 2009
Location: Denmark
Karma: 0
Member
Translator
Postfix has its own mailman, are you using the classic mailman program together with postfix? that should not be neccessary
Re: Configuring Postfix to post to FUDforum [message #159418 is a reply to message #36112] Tue, 02 June 2009 00:56 Go to previous messageGo to next message
mountainfreak is currently offline  mountainfreak
Messages: 11
Registered: May 2009
Karma: 0
Junior Member
Actually not true postfix and mailman are totally seperate software projects. Postfix has no specifc mailing list software, especially none that they make, and postfix is a generic mail software, it has no mail list software built in either. Anyway it was an issue with the multiple resolve conflicts and new configuration options in the new mailman. However, I will note this little piece of info no longer works in postfix. Postfix shows delivery to the script. I have tried it both with the stock owner and group that fudforum works under and the ones postfix works under for the file maillist.php. No luck, I have also tried the procmail rules listed in the admin interface and the ones listed in the forums...yes all done with the proper paths and permissions. Maillog resports sending, no errors in mailman, no errors in apache's logs, no system messages. Nothing ever shows up in the forums. I can import fine with fudbox.php fine. Does anyone else run this on Fedora 10 with mailman and postfix with success?
Re: Configuring Postfix to post to FUDforum [message #159420 is a reply to message #159418] Tue, 02 June 2009 06:32 Go to previous messageGo to next message
Peter Vendike is currently offline  Peter Vendike   Denmark
Messages: 65
Registered: February 2009
Location: Denmark
Karma: 0
Member
Translator
yes you are rigth about they are seperat.

I don't use mailman on my own system, but connect to others.

My postfix calls maillist.php through alias, and it works.

Strange that mailman worked for you before, cant you reverse everything?

[Updated on: Tue, 02 June 2009 06:35]

Report message to a moderator

Re: Configuring Postfix to post to FUDforum [message #159459 is a reply to message #159420] Thu, 04 June 2009 00:54 Go to previous messageGo to next message
mountainfreak is currently offline  mountainfreak
Messages: 11
Registered: May 2009
Karma: 0
Junior Member
There was the lingering universal procmail file that I had to delete. That postfix rule I cannot for the life of me get to work. I will say the procmail rule does work with sudo access as long as the local user and mboxs exist(anotherwords do create the local user through the usual means)...something like this in sudoers, note you don't have to reboot "init 1 && init 5" works fine as root:

Host_Alias HERE=hostalias
User_Alias PRIVILEGED=list-bot

Cmnd_Alias ADMIN=/usr/bin/php

PRIVILEGED HERE=ADMIN, NOPASSWD: ADMIN

and instead of in that users procmail file having:
:0:
* ^TO_.*list(at)domain(dot)net
|/usr/bin/php /home/some-user/forum/scripts/maillist.php 1

you should have:
:0
* ^TO_.*list(at)domain(dot)net
| sudo /usr/bin/php /home/some-user/forum/scripts/maillist.php 1

of course the tail-end "1" of this script should point to the proper list config in FUDforum...see you admin interface and go to your list under "mailing list manager" and click on the list for further details.

Hope those with virtual linux hosting can understand what I was saying... seems virtual hosting buggers the whole mess.

Cheers,
REF
Re: Configuring Postfix to post to FUDforum [message #159463 is a reply to message #159459] Thu, 04 June 2009 10:12 Go to previous message
Peter Vendike is currently offline  Peter Vendike   Denmark
Messages: 65
Registered: February 2009
Location: Denmark
Karma: 0
Member
Translator
So you got it to work.

Just I don't think its good to run any mail programs as root, its not neccessary for me, but my system is a standalone PC, running Opensuse.

The user 'list-bot' should be a alias user on your system, so he is kind of virtual. But 'real' virtual users are defined different. If your domain name is domain.net, his address is list-bot(at)domain(dot)net, and you subscribe him to the mailman list.

So mailman sends messages from the list to him then i think for procmail it should be

* ^TO_.*list-bot(at)domain(dot)net
|/usr/bin/php /home/some-user/forum/scripts/maillist.php 1

But you could also use

* ^Reply_To_.*list-name(at)another-domain(dot)net
|/usr/bin/php /home/some-user/forum/scripts/maillist.php 1 (x for different forums)

(not shure of that, did not try it)

the first solution needs i different user for every list subscribed to (my own solution), with the second, you could just subscribe the same (alias) user to different lists, and senders from other addresses are rejected.



[Updated on: Thu, 04 June 2009 10:36]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FudForum theme and template edition - probleme to have stable css
Next Topic: Impossible to vote poll
Goto Forum:
  

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

Current Time: Wed Nov 27 15:02:48 GMT 2024

Total time taken to generate the page: 0.03477 seconds