SocketMail Knowledge Base  

Home / Browse Categories / Socketmail Lite / Implementation / Setting pipe based fetchmail mechanism

 Setting pipe based fetchmail mechanism Page Tools

Background
 
By using this 'Pipe' fetchmail mechanism, mails are delivered to user mailbox as and when they arrived. Unlike the cron mechanism which runs at certain time, this method depends on when the mail been received by the SMTP and processed by the MTA (Mail Transfer Agent). Using Pipe mechanism, mails seems to be delivered instantly.

Make sure the file ../system-files/mx.php has 755 permission. If not, chmod the file to have 755 permission.
 
 
Your server using Qmail?
 
If your server is using Qmail, you need to specify a special flag in /system-files/mx.php
 
Open /system-files/mx.php file and find the following statement (around line #23):
define('__QMAIL__', 0);
change the value zero (0) to 1 to indicate that your server is using Qmail. Example :
define('__QMAIL__', 1);
 
Save the file.

Integration with Control Panel system
 
cPanel 9.x

From your cPanel screen, you will need to set the default address for your domain, so all unrouted mails (email not sent to known POP3 accounts) are sent to SocketMail. Click the Mail link from the main page. Click Default Address on the resulting page. Then click Set Default Address .

Select the domain that you want SocketMail to handle. In the input field, enter a pipe (the | character) followed by the full path to your mx.php file. Example:
 
 | /usr/bin/php -f /path/to/system-files/mx.php
 
Other control panel system
 
From customer holden, the way to set-up Pipeh mechanism from SSH/Telnet.

I wasnt able to setup the PIPE using the link provided, because I dont have cPanel. But I did find a nice little guide on setting it up with Sendmail via Telnet/SSH. Found it on other forums of all places So I dont know if this has been posted before or not.. but just in case .. here's how ya do it...


***************************************

Firstly, you need to create an alias in sendmail to socketmail. You can do this by editing /etc/aliases and adding:
socketmail: |/path/to/system-files/mx.php
or
socketmail: | php -q /path/to/system-files/mx.php
Make sure the permissions on mx.php are right (CHMOD 755).
Next you need to add a connection from smrsh to mx.php.php:
ln -s /path/to/system-files/mx.php /etc/smrsh/mx.php
Now, you need to add the catchall account to sendmail. Edit /etc/mail/virtusertable and add:
@domainname.com socketmail
You'll need to add any exemptions BEFORE this line so if you want marc@domainname.com to be delivered to his POP account, you would need:
Now, you need to reload sendmail with the new configuration settings:
newaliases makemap dbm /etc/mail/virtusertable < /etc/mail/virtusertable


Viewer Comments [add comment]
There are no viewer comments for this article/topic.

General Information
Article ID: 71
Author: KB Support
Created: 23 Feb, 2005
Modified: 17 Sep, 2005
Views: 5711

Average Visitor Rating:

1.00 (out of 5)
(1 Votes)
Cast Your Vote

Attachment Files:
None

Related Articles
Fetch-mail mechanism
I've installed but I cant received mails from other mail services such as hotmail or yahoo, etc.



Powered by SocketKB version 1.1.5
Copyright © 2004 Creative Digital Resources Sdn Bhd. All rights reserved.