Configuring Postfix to post to FUDforum [message #36112] |
Mon, 05 March 2007 10:22 |
ramsey
Messages: 11 Registered: March 2007 Location: Atlanta, GA
Karma: 0
|
Junior Member |
add to buddy list ignore all messages by this user
|
|
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 13:40 |
dardhal
Messages: 9 Registered: November 2006 Location: Spain
Karma: 0
|
Junior Member |
add to buddy list ignore all messages by this user
|
|
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 16:37 |
ramsey
Messages: 11 Registered: March 2007 Location: Atlanta, GA
Karma: 0
|
Junior Member |
add to buddy list ignore all messages by this user
|
|
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] |
Fri, 29 May 2009 20:32 |
|
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 #159418 is a reply to message #36112] |
Mon, 01 June 2009 20:56 |
|
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 #159459 is a reply to message #159420] |
Wed, 03 June 2009 20:54 |
|
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 06:12 |
Peter Vendike
Messages: 65 Registered: February 2009 Location: Denmark
Karma: 0
|
Member Translator |
remove from buddy list ignore all messages by this user
|
|
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 06:36] Report message to a moderator
|
|
|