Can imapd listen on multiple ports?

For historical reasons, we've got some multiplexors that expect to make the back-end imap connecto to port 993, and some others that want to talk to 994. Is it possible to configure imapd to listen on multiple ports?
Thanks!

I just realized this would be doable if the MMP would do STARTTLS to the back-end (since then I could enable STARTTLS on the default port and keep SSL on connect on the other port).
If only.....

Similar Messages

  • SocketServer Listen on Multiple Ports

    What is the optimal way to have a SocketServer listen on more than one IP/port combination? I'm looking for various ways of doing this including a quick and easy way and the best-practices way.
    Thanks.

    There is no way to 'have a SocketServer listen on more than one IP/port combination'. A SocketServer can only listen at one port. You need multiple SocketServer objects, and you should use multiple threads executing accept loops.

  • How can I listen on 2 ports in 1 app

    Here's a synapse of what I'm doing. I'm working on a graphical console program. Basically, I created a GUI interface, for a command prompt program. I'm basically trying to create a command prompt for the new millennium. It allows for multi-connections, has drop-down auto completes, syntax highlighting, object-oriented design, etc. I created it as a multi-threaded server and allows for remote and local connections. The way I have it designed is there are 2 main programs. The graphical client program and the server program. The server program is started whenever the client is started and accepts connections on port 9671. The graphical client can connect to local and remote machines. The client also can store information for multiple sessions in a single window which the user can juggle between. I decided that the server will consist of multiple programs similar to a Linux shell. Rather than build all the commands into the server I can create multiple programs for the server. Once the user needs to do something like copy a file I can call the File program, pass it the info, and have it handle the routine. I decided to have it where once the program is called it will connect to the main server on port 9672 so they can communicate. So what I'm wondering is how can I start my main server on 9671 and allow for connections on port 9672? Remember since I allow for multiple connections I need to be able to find out which thread started the session. I'm thinking either when I call the File program I can pass some thread id so it knows which program called it or I can create another program which runs on port 9672 and I can use the main program as a buffer between itself and the other server? Sorry for the long winded explanation but when I give too little info I usually get people asking me why I'm trying to do it:
    <CODE>
    package directlinkserver;
    import java.io.*;
    import java.sql.*;
    import java.net.*;
    import java.util.*;
    public class DirectLinkServer {
    static int portOpen1 = 9671;
    public static void main(String[] args) {
    try {
    ServerSocket portListener1 = new ServerSocket(portOpen1);
    DirectLinkServer userThreads = new DirectLinkServer();
    while (1 == 1) {
    Socket userConnection = portListener1.accept();
    userThreads.new PortConnection(userConnection);
    catch (Exception e) {
    System.out.println (
    "The server encountered a serious error. Server shut down.");
    e.printStackTrace();
    System.exit(0);
    class PortConnection extends Thread {
    Socket ourConnection;
    BufferedReader serverInput;
    PrintWriter serverOutput;
    PortConnection(Socket userConnection) {
    try {
    ourConnection = userConnection;
    serverInput = new BufferedReader(new InputStreamReader(userConnection.getInputStream()));
    serverOutput = new PrintWriter(userConnection.getOutputStream(),true);
    start();
    } catch (Exception e) { System.out.println("An error occurred when a user attempted a connection."); }
    public void run() {
    serverOutput.println("Welcone to the Server.");
    try {
    serverOutput.close();
    serverInput.close();
    ourConnection.close();
    } catch (Exception ex1) {}
    public void commandConnect() {
    </CODE>

    Well, I'm still going to ask that. What's wrong with just using the one port? Also, your design seems questionable. How will the server know to start when the client starts, if the server isn't running already and listening on the appropriate port? It's a chicken and egg problem, and generally (every single case I can think of) the server just sits and runs, whether or not there are any clients.

  • Listen on multiple ports for smtp?

    Traditionally, we've provided setup smtp to listen on an additional port to 25 for travellers who find themselves on an ISP which blocks that port. We used a line in master.cf like:
    <newportnumber> inet n - y - - smtpdproxywrite unix - - n - 1 proxymap
    This seems to make snow leopard's postfix unhappy. It also doesn't work. I'd be grateful if anybody could tell me:
    * what is or where to look for info on setting up postfix to do multiple ports? I've tried Apple docs and found nothing and only old-style in postfix docs -- though I could be missing something obvious as always.
    * is this the modern and preferred way to get around the blocked port 25 problem or is it better to do some fancy-schmancy port redirection eg at the firewall to map multiple ports on to port 25 for postfix?
    thanks and allbests,

    In the past I've used the following with great success. Add the following line to /etc/postfix/master.cf file:
    2525 inet n - n - - smtpd
    Stop and start the mail service. Then test with telnet to ensure that the port is responding. Sadly, this still appears to be the best way, sans the use of a VPN, to get around ISP blocking.
    Obviously port 25 needs to be open to receive mail. But instead of opening additional port in the firewall, you could drive all users to VPN.
    I just tested the above line in 10.6.1 and it is responding.
    Hope this helps

  • Listening to multiple ports(socets) for data?

    I know that this topic has been covered before, but is either simplistic questions or overly complex things (that I don't understand... yet)
    Here is my issue: I have data coming from two ports (TCP/IP) an array of 210 bytes and I'm not sure which port will be activated first. The data is asyncronus. So basically I want to figure out how to listen to the ports. I have this code...
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class SocketListener{
        public static void main(String[] argv){
            ServerSocket mySocket = null;
            ServerSocket mySocket2 = null;
            try {
                mySocket=new ServerSocket(12000);
                mySocket2= new ServerSocket (13000);
            catch (IOException e){
                System.err.println("error");
                System.exit(-1);
            try {
                Socket client = mySocket.accept();
                System.out.println("The server has connected to 12000\n");
                // do what I need it to do a.k.a. get data array
                client.close();
            catch(IOException e){
                System.err.println("error");
                System.exit(-1);
            try {
                Socket client2 = mySocket2.accept();
                System.out.println("The server has connected to 13000\n");
                // do what I need it to do a.k.a. get data array
                client2.close();
            catch (IOException e){
                System.err.println("error");
                System.exit(-1);
    }I'm not sure if it works or not... but thats what I got. Is this the best way to go about this or is there something else that I should look up in documentation / look for examples / someone might have a link to something.
    Thanks a lot!!!!
    Edited by: KTLightning on Sep 12, 2007 1:25 PM

    There are two issues at hand here, one being networking and the second being threading. Threading is an extensive subject and I don't want to shortchange you here, so you may want to read this tutorial if you are not familiar with Java threading concepts: http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html
    That being said, if you want to concurrently listen to the sockets, you will need a thread for each socket you are listening. Otherwise you can use Java NIO, but unless you are going to be listening to many sockets at once, this complication is not necessary since the learning curve of Java NIO can be quite steep.
    You might want to start out creating a new class that will handle the task of listening to a socket and retrieving the data in its own thread. You can do this by either extending the Thread class or implementing the Runnable interface. From your main class, you can then spawn as many of those objects as you need. The trick to this approach is knowing when the data has been read from the socket and stored in the object. For only two objects this is simple as you can have a hasData() method on your worker objects and then just put a loop in your main class checking to see if the condition has been met on the objects.
    Here's some code fragments as an example...
    public class SocketReader extends Thread ...
    ServerSocket ss = null;
    boolean hasData = false;
    SocketReader(int port) {
    ss = new ServerSocket(port);
    public void run() {
    ss.accept();
    // do your stuff
    hasData =true;
    public boolean hasData() {
    return hasData;
    main() {
    SocketReader sr1 = new SocketReader(12000);
    SocketReader sr2 = new SocketReader(12000);
    sr1.start();
    sr2.start();
    // keep looping until we have data in both
    while (!sr1.hasData() && !sr2.hasData()) {
    try {
    Thread.sleep(100);
    } catch (InterrruptedException ie) {/ do something}
    } // end main
    Keep in mind that this is a very simplistic example to demonstrate the concepts and would not be a good design for pretty much any other case.

  • Netbeans 6.1 SMS NON-Brute force ability listen to multiple ports

    First of all, my appologies for being a nubie coming from Mobile6. The company I slave at is migrating from MS Mobile to j2me!!! I am porting a code segment that listens to all incoming/outgoing SMS text messages and logs the messages into another java contact applet for our sales department. Our company policy(I cannot change) allows the sales department to use any/multiple SMS packages and install onto the device.
    Based on my understanding of the (MessageConnection)Connector.open("sms://" foo); I must include a port address to listen in on. Is there a NON-brute forced methodogy to poll "active" ports the device is using to send/recieve SMS text message?
    /dz
    Little Rock, AR.

    db,
    I was reading a blog by Bill Day [http://weblogs.java.net/blog/billday/archive/2004/02/midp_push_using.html]
    regarding MIDP Push; A paragraph jumped at me, it was "...
    Whichever network(s) you're application will be using, you need to find out what protocols they allow inbound to handsets. At the least, most GSM carriers will allow SMS (since they use SMS for short text messaging). Assuming your network does support SMS, from the server part of your application you would need to generate an SMS message directed to the port you bound your MIDlet to in its static or dynamic push registry settings. Assuming the network passes the SMS as expected, your MIDlet should be awakened when the SMS arrives in the handset..."
    Either I'm not understanding your reponse, the info in this blog is incorrect or I must include a port address as part of the open method of the Connector. Still confused.
    /dz

  • One weblogic instance listening to multiple ports

    I'd like to run weblogic with its http subsysten listen to port 80.
    Any other service should listen to port 7001.
    Is it really impossible to let weblogic do this?
    Are there any plans to implement such a feature?
    Which alternatives do exist?
    TIA
    klaus

    No, it is impossible.
    Alternatives: use IIS/Apache/NES to listen to port 90, and use weblogic
    plugin to proxy request to WLAS (7001).
    Still, you can use one WLAS listent to port 80, and use HttpClusterServlet
    to proxy requests to another WLAS (7001)
    Cheers - Wei
    Klaus Pittig <[email protected]> wrote in message news:[email protected]..
    I'd like to run weblogic with its http subsysten listen to port 80.
    Any other service should listen to port 7001.
    Is it really impossible to let weblogic do this?
    Are there any plans to implement such a feature?
    Which alternatives do exist?
    TIA
    klaus

  • Listening multiple ports

    is there anyway a serversocket can listen to multiple ports?like the the serversocket can listen ports between 1 to 1024?thanks!

    no methods that i know of. except to create an array of serversockets but pass the handling of sockets to a centralized location.

  • How can I set up multiple source ports in a SPAN session?

    Is it even possible to do this?
    I'm going to connect a network analyzer into our cat4506 switch (running 12.2x IOS). I used vlan 1 as the source, but that doesn't give us much so I'm think we may need to use all the physical ports as the source instead.
    Anyone has any suggestions??

    Yes, you can SPAN multiple ports, or multiple VLANs. This will SPAN ports 5/1 through 5/5. The spaces on either side of the dash are necessary.
    monitor session 1 source interface fastethernet 5/1 - 5/5
    http://www.cisco.com/en/US/products/hw/switches/ps4324/products_configuration_guide_chapter09186a008023401a.html
    Please rate helpful posts.

  • Can a Server Farm contain RServers that listen on different ports?

    PROBLEM:
    =========
    The requests come in on port 8000, but the two RServers listen on ports 8100 and 8200 respectively.
    rserver redirect HTTPtoHTTP
    webhost-redirection http://web.xyzcorp.com:8000/signon.html
    rserver host server1
    ip address 10.0.0.1 <----- listening on port 8100
    rserver host server2
    ip address 10.0.0.2 <----- listening on port 8200
    Q: Can this be done?

    Yes this can be done.
    The port is specified inside the serverfarm
    ie:
    serverfarm MyFarm
    rserver server1 8100
    ins
    reserver server2 8200
    ins
    Gilles.

  • Can a Selector listen on 2 ports?

    Hi.
    Can a Selector thread, listen on 2 ports, making a tcp server that accepts connections on 2 ports?
    Thanks.

    tpmaster wrote:
    Hi.
    Can a Selector thread, listen on 2 ports, making a tcp server that accepts connections on 2 ports?
    Thanks.Sure you can; register the ServerSocketChannels at the Selector and off you go.
    kind regards,
    Jos

  • Can I listens to the same port in differernt threads on the same computer

    Q1:can I listens to the same port in differernt threads on the same computer?
    Q2:if I use two thread to listen to two different port, you know, as the method for listening is a block method, will them block each other?
    Thank you very much!

    Q1:can I listens to the same port in differernt
    threads on the same computer?If you mean ServerSocket.accept(), the answer is yes.
    Q2:if I use two thread to listen to two different
    port, you know, as the method for listening is a
    block method, will them block each other?No.

  • Multiple ports in scan listener

    We have a rac two node on exa database machine with scan listener running from port 1525.
    version 11.2.0.4
    we want to add another port to scan-listener. will it have any adverse affect on existing infrastructure.

    Hi user13427480 -
    The support for the Grid Infrastructure and SCAN, including setting up multiple ports for the SCAN listener, is the same on Exadata as any other Linux x86-64 environment. I have not actually configured this and tested it personally on Exadata, but there shouldn't be anything about the Exadata infrastructure that would affect it. As with any change you should test and validate it in your non-prod environment before deploying anything into production.
    Thanks,
    Kasey

  • Use 1 listener for multiple database in a server

    hi guys,
    just want to check whether this is the right way to configure my Listener.ORA . I am using 1 listener.ora to listen for incoming request connection from remote client. There are multiple databases installed in a server.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )sorry i am reading about it so did not install another database to test out. Just thinking in the line that it mention that the list of SID is refering to the multiple database that is installed in a server and i am using 1 listener.
    Please further advice.

    Shivananda Rao wrote:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = O11R2)
    (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
    (SID_NAME = O11R2)
    (SID_DESC =
    (GLOBAL_DBNAME = O10G)
    (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
    (SID_NAME = O10G)
    )Please use as above. You can have one listener for multiple databases.right right so it the pattern goes like this:
    SID_LIST_LISTENER =
         (SID_LIST =
              (SID_DESC =
              (GLOBAL_DBNAME = AAAA)
              (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
              (SID_NAME = AAAA)
              (SID_DESC =
              (GLOBAL_DBNAME = BBBB)
              (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
              (SID_NAME = BBBB)
         )thanks !

  • Scan multiple ports on multiple computers

    Hey guys,
    I wrote the following batch script to use along with portqry tool which is availabe from microsoft download center.
    The tool can scan multiple ports on a single computer, but it is not capable of scanning multiple ports on multiple computers in one attempt. Also it gives a big output which is a bit tough if you are trying to prepare a report.
    Here is the batch file which takes input from server.txt where all the computer names present and scans for the below ports on each computer and gives you output in a beautiful way.
    TCP: 135, 445, 1433, 1434, 1024, 1040
    UDP: 1433, 1434
    Copy and paste the below code in a batch file and use it along with portqry.exe.
    echo off
    for /f "tokens=* delims= " %%a in (server.txt) do call :vk %%a
    :vk
    portqry -n %1 -e 1434 -q -p udp
    if errorlevel = 2 goto filtered_1434
    if errorlevel = 1 goto failed_1434
    if errorlevel = 0 goto success_1434
    goto 135
    :filtered_1434
    Echo %1 udp Port 1434 is listening or filtered
    goto 135
    :failed_1434
    Echo %1 udp Port 1434 is not listening
    Goto 135
    :success_1434
    Echo %1 udp Port 1434 is listening
    goto 135
    :135
    portqry -n %1 -e 135 -q -p tcp
    if errorlevel = 2 goto filtered_135
    if errorlevel = 1 goto failed_135
    if errorlevel = 0 goto success_135
    goto 445
    :filtered_135
    Echo %1 tcp Port 135 is listening or filtered
    goto 445
    :failed_135
    Echo %1 tcp Port 135 is not listening
    Goto 445
    :success_135
    Echo %1 tcp Port 135 is listening
    goto 445
    :445
    portqry -n %1 -e 445 -q -p tcp
    if errorlevel = 2 goto filtered_445
    if errorlevel = 1 goto failed_445
    if errorlevel = 0 goto success_445
    goto 1433_tcp
    :filtered_445
    Echo %1 tcp Port 445 is listening or filtered
    goto 1433_tcp
    :failed_445
    Echo %1 tcp Port 445 is not listening
    Goto 1433_tcp
    :success_445
    Echo %1 tcp Port 445 is listening
    goto 1433_tcp
    :1433_tcp
    portqry -n %1 -e 1433 -q -p tcp
    if errorlevel = 2 goto filtered_1433_tcp
    if errorlevel = 1 goto failed_1433_tcp
    if errorlevel = 0 goto success_1433_tcp
    goto 1434_tcp
    :filtered_1433_tcp
    Echo %1 tcp Port 1433 is listening or filtered
    goto 1434_tcp
    :failed_1433_tcp
    Echo %1 tcp Port 1433 is not listening
    Goto 1434_tcp
    :success_1433_tcp
    Echo %1 tcp Port 1433 is listening
    goto 1434_tcp
    :1434_tcp
    portqry -n %1 -e 1434 -q -p tcp
    if errorlevel = 2 goto filtered_1434_tcp
    if errorlevel = 1 goto failed_1434_tcp
    if errorlevel = 0 goto success_1434_tcp
    goto 1024
    :filtered_1434_tcp
    Echo %1 tcp Port 1434 is listening or filtered
    goto 1024
    :failed_1434_tcp
    Echo %1 tcp Port 1434 is not listening
    Goto 1024
    :success_1434_tcp
    Echo %1 tcp Port 1434 is listening
    goto 1024
    :1024
    portqry -n %1 -e 1024 -q -p tcp
    if errorlevel = 2 goto filtered_1024
    if errorlevel = 1 goto failed_1024
    if errorlevel = 0 goto success_1024
    goto 1040
    :filtered_1024
    Echo %1 tcp Port 1024 is listening or filtered
    goto 1040
    :failed_1024
    Echo %1 tcp Port 1024 is not listening
    Goto 1040
    :success_1024
    Echo %1 tcp Port 1024 is listening
    goto 1040
    :1040
    portqry -n %1 -e 1040 -q -p tcp
    if errorlevel = 2 goto filtered_1040
    if errorlevel = 1 goto failed_1040
    if errorlevel = 0 goto success_1040
    goto 1433
    :filtered_1040
    Echo %1 tcp Port 1040 is listening or filtered
    goto 1433
    :failed_1040
    Echo %1 tcp Port 1040 is not listening
    Goto 1433
    :success_1040
    Echo %1 tcp Port 1040 is listening
    goto 1433
    :1433
    portqry -n %1 -e 1433 -q -p udp
    if errorlevel = 2 goto filtered_1433
    if errorlevel = 1 goto failed_1433
    if errorlevel = 0 goto success_1433
    goto end
    :filtered_1433
    Echo %1 udp Port 1433 is listening or filtered
    goto end
    :failed_1433
    Echo %1 udp Port 1433 is not listening
    Goto end
    :success_1433
    Echo %1 udp Port 1433 is listening
    goto end
    :End

    For what it's worth, I wrote a PowerShell script that does something like this a while back.
    http://gallery.technet.microsoft.com/scriptcenter/97119ed6-6fb2-446d-98d8-32d823867131

Maybe you are looking for

  • Email pushing not working correctly for office email - 3 seperate devices/carriers

    We switched email hosts several months ago and since our email pushing has not worked correctly. Our host/IT guy has been very unwilling to help me through this (I get the pleasure of being the in-house IT source) I personally am on AT&T have no prob

  • Call to ECC table from BI

    I have this routine in a BI transformation routine select single CONTACTNAME INTO RESULT FROM THREIC_CONTACT WHERE CONT_GUID =      source-system-cont-guid. Error : THREIC_CONTACTNAME not recognised Any ideas how to call the table.

  • Flash content not starting

    Hello, since yesterday flash content doesnt start on my computer, this includes videos (youtube, twitch, ...) and also the animation on the test page from adobe with the clouds (Flash Player Help), i can see the picture but no movement. Which also me

  • Time capsule dont backup without cable?

    hi i know time capsule use wireless to connect to macbook pro ,in my first time backup i used cable so i disconnect the cable and try to connect with my time capsule no way? AirPort Utility did not find it my wireless also did not find my time capsul

  • Somebody help the newbie!

    Hi. its the first time i'm looking at java or ppo btw. well what i needed to know is how to create a vector, add things, delete things, from it and how to use it outside the class he was born in. oh and another very newbie quizz. whats the difference