Configuring Postfix to post to FUDforum [message #36112] |
Mon, 05 March 2007 15:22  |
ramsey
 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   |
dardhal
 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 #36118 is a reply to message #36117] |
Mon, 05 March 2007 21:37   |
ramsey
 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 #159463 is a reply to message #159459] |
Thu, 04 June 2009 10:12  |
Peter Vendike
 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
|
|
|