The Mailing List Manager admin control panel allows the administrator to define mailing list rules that allow FUDforum to archive messages from a mailing list as well as allow the forum's own messages to be sent to the mailing list.
Enter the following fields to configure a new mailing list and click on the "Add Mailing List Rule" button when done:
The E-mail address of the mailing list. If you specify that messages posted in the forum are to be sent to the mailing list as well, those messages will be sent to this email address.
Mailbox from which to load and delete E-mail messages. Enter a server name and optional port where the mailbox is located. For example: imap.gmail.com:993
|IMPORTANT: These Mailbox settings are only available if PHP's IMAP module is enabled. Leave them empty if you intend to pipe messages into the forum (recommended for heavy duty processing).
User name to login to the mailbox.
Password to login to the mailbox.
Is this a POP3 or IMAP mailbox? Pick TLS for Transport Layer Security or SSL to use the Secure Sockets Layer protocol. Available choices:
Choose a forum, which will be associated with this particular mailing list, meaning that messages from the mailing list will be imported into this forum.
|IMPORTANT: You can only assign 1 mailing list per forum, therefore the forum select will ONLY show you the forums that are not yet associated with any other mailing lists or newsgroups.
This option specifies whether or not the moderator(s) will be required to approve messages imported from the mailing list before they are made visible on the forum to the general public.
Whether or not to forward messages that were posted on the forum to the mailing list. If selected when a user posts a message, the forum will send the messages to the mailing list on behalf of the user.
|IMPORTANT: Many mailing lists will require people to be signed up before being able to post to the list, which is most often done to prevent spammers from spamming the list. Therefore, the user unless already subscribed, may receive an email from the list asking them to subscribe as a prerequisite to their messages appearing on the mailing list.
Whether or not moderator(s) of this forum will be required to approve posts made by forum members before those posts are synchronized to the mailing list.
If enabled, ANY file attachment attached to a message on the mailing list will be imported into the forum regardless of any limitations imposed on file attachments within the forum.
Certain mail clients do not send the necessary headers to determine if a message is a reply to an existing message. If this option is enabled, and the normal reply headers are absent, the forum will try to determine if the message is a reply by comparing its subject to subjects of messages in the forum.
For example: if an E-mail message with subject Re: xyz is received, FUDforum will look for a forum topic with title xyz (without the Re:) to add it to.
When importing messages from the mailing list, should a new user be created for every mailing list author, who cannot be matched against an existing forum user. If this option is set to 'No', then all imported mailing list messages who's authors can not be matched against existing forum members will be attributed to the anonymous user.
When importing messages, should the messages posted from users who cannot be matched to existing forum members be ignored.
E-mail address to use as the "From" address when sending messages to the mailing list. If left empty, messages will be sent to the mailing list with the user's e-mail as the "From" address.
|E-mail address supplied
|Mail will be sent from this fixed from e-mail address -> mailing list's e-mail address.
|Mail will be sent from the user's e-mail address -> mailing list's e-mail address.
This option is available starting from FUDforum 3.0.3.
Some mailing list prepends a special string to the subject of every message so that it is easy to identify the messages coming from the mailing list. In the forum environment those are quite useless, this option allows administrator to specify a regular expression that will be applied to the subject, allowing the administrator to change and/or filter certain strings from the subject.
The replacement is performed by PHP's preg_replace.
In most cases mailing lists will append some sort of a string to the bottom of the message, this usually contains information on the mailing list itself as well as how to subscribe/unsubscribe from the list. In the forum that text is not really needed, so you can use this option to use regular expression to remove and/or change this or any other data from the message body.
The replacement is performed by PHP's preg_replace.
The string you wish to alter and/or replace.
Replace the string that matches above regular expression with this.
For example, to remove everything after "---" (the signature), enter
This field allows you to specify custom headers, that will be appended to any existing headers sent by the forum when posting a message to the mailing list. To avoid problems, enter each header on a separate line and do not place blank lines.
A string of text to append to the end of every message sent from the forum back to the mailing list.
At the bottom of the control panel there is a list of existing mailing list rules. Each entry shows 3 pieces of information about the mailing list:
Options are presented to either edit or delete each of the listed mailing list rules.
E-mail messages can simply be piped into the maillist.php script to load them into the designated forum. For example, on Windows systems, one can simply run the following commands from the command prompt (Start -> Run, cmd, OK):
type 0471.msg | c:\lamp\php\bin\php.exe maillist.php 1
and on Linux/Unix systems:
cat 0471.msg | /usr/bin/php maillist.php 1
|>>> Use Procmail to pipe messages into the forum
Sample Procmail Mailing List Catcher:
Users who have procmail installed can use it to pipe messages into the maillist.php script. The following is an example rule that can be used to catch all E-mails coming from the php-general mailing list, which is identified by having firstname.lastname@example.org in the To, Cc or Resent-To headers.
:0: * ^TO_.*email@example.com | /home/FUDdata/scripts/maillist.php 1
|>>> Use Postfix to pipe messages into the forum
Sample Postfix Mailing List Catcher:
Users who have Postfix installed can use it to pipe messages into the maillist.php script. Start by defining an alias in /etc/aliases, for example:
list-bot: "|/usr/bin/php /full/path/to/FUDforum/scripts/maillist.php 1 | logger"
Run the newaliases command as root (sudo newaliases) and reload postfix as root (sudo /etc/init.d/postfix reload).
Next, set permissions on maillist.php to 777 (chmod 777 maillist.php) so that postfix could execute it (755 may also work).
Finally, use the Mailman admin interface to subscribe firstname.lastname@example.org to the mailing list. Now, every message sent to the mailing list goes to list-bot and then gets added to the forum.
|>>> Use system scheduler (like cron) to run import messages
When messages must be fetched from a mailbox, you will have to schedule a job to periodically import messages into the forum. Here is a sample crontab line to load messages associated with rule #1 every 2 minutes:
*/2 * * * * /home/forum/forum/scripts/maillist.php 1
|IMPORTANT: maillist.php is a PHP script, that requires you to have a PHP binary (cgi/cli). On most Linux systems, this binary can be found in /usr/bin/php. If your PHP binary is not in /usr/bin/php, you may need to change the first line of the maillist.php script from #!/usr/bin/php to #!/path/to/your/php/binary.
Please monitor the Error Log Viewer for problems (FUDforum 3.0.2 and later releases). Users running older releases can view the errors/.mlist/error_log file for problems (this file was moved to errors/mlist_errors in 3.0.2).
Also note that invalid messages that could not be loaded will be copied to the forum's errors/.mlist/ directory.
If you use cron (or any other system scheduler for that matter), ensure you write the errors somewhere. For example, append this to the crontab line:
If you get an error "Certificate failure" and you are using unsecure pop3, change the line 122 in the maillist.php script like this (will be fixed in FUDforum 3.0.3):
$flags = '/novalidate-cert';
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can't contact the database server: Cannot return last error, no db connection)