Hi Ken, Thank you very much !!! I have tried your first suggestion and it's working perfectly well now :) All I had to do was to edit this file; /usr/share/squirrelmail/functions/imap_general.php comment out the line below; // $imap_stream = @fsockopen($imap_server_address, $imap_port, $error_number, $error_string, 15); and add the following new section instead; ........................................................................ ............... if (function_exists('stream_context_create') && function_exists('stream_socket_client')) { $socket_options = array('socket' => array('bindto' => 'X.X.X.X:0')); $socket_context = stream_context_create($socket_options); $imap_stream = stream_socket_client("$imap_server_address:$imap_port", $error_number,$error_string, 15, STREAM_CLIENT_CONNECT, $socket_context); } else { $imap_stream = @fsockopen($imap_server_address, $imap_port, $error_number, $error_string, 15); } ........................................................................ ............... Where X.X.X.X is my specific IP address that I want the Squirrelmail to bind to. That's it :) Thank you very much indeed, Best Regards Pawel -----Original Message----- From: Ken A [mailto:ka@xxxxxxxxxxx] Sent: 7 March 2011 23:41 To: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx Subject: Re: How to enforce Squirrelmail to use a specific source IP address? one possible solution - http://blog.nachtarbeiter.net/2008/08/21/binding-phps-fsockopen-to-a-spe cific-ip-address/ So, you'd need to make some changes in: functions/imap_general.php and test to see if it worked.. Or, if you don't mind all of your outgoing traffic to your imap server going out this virtual interface, just use the route command. route add aaa.bbb.ccc.ddd dev eth0:1 and drop that into rc.local so it persists on restart.. Ken On 3/7/2011 10:24 AM, Pawel Szczuka wrote: > Hi Guys, > > This is probably a simple question - but I'm not sure if there is a > simple answer :) > Basically I have a RedHat box running Squirrelmail with one primary > network interface (eth0) > and multiple logical interfaces (eth0:1, eth0:2, etc.) with separate IP > addresses assigned to each > of them. > Is there an easy way - to configure Squirrelmail to use a specific > source IP address from one > of the logical interfaces while connecting to the remote IMAP (TCP/143) > server ? > The issue I have is that it always tries to use the IP address of the > primary (eth0) interface, > no matter what I put in the<VirtualHost X.X.X.X:443> section in the > Apache configuration file. > Thank you very much for any suggestions. > > Best Regards > Pawel > > > > > > The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). > Please direct any additional queries to: communications@xxxxxxxxxxxx > Thank You. > Silicon and Software Systems Limited (S3 Group). Registered in Ireland no. 378073. > Registered Office: South County Business Park, Leopardstown, Dublin 18 > > > > ------------------------------------------------------------------------ ------ > What You Don't Know About Data Connectivity CAN Hurt You > This paper provides an overview of data connectivity, details > its effect on application quality, and explores various alternative > solutions. http://p.sf.net/sfu/progress-d2d > > > > ----- > squirrelmail-users mailing list > Posting guidelines: http://squirrelmail.org/postingguidelines > List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx > List archives: http://news.gmane.org/gmane.mail.squirrelmail.user > List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users -- Ken Anderson Pacific Internet - http://www.pacific.net ------------------------------------------------------------------------ ------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d ----- squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). Please direct any additional queries to: communications@xxxxxxxxxxxx Thank You. Silicon and Software Systems Limited (S3 Group). Registered in Ireland no. 378073. Registered Office: South County Business Park, Leopardstown, Dublin 18 ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d ----- squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users