JavaMail Server: Sockets and Mail

L.S,
I'm thinking about combining code based on the Java Mail API and the Java networking tutorial (server sockets). I'm thinking I should listen to ports 25 and 110 using SMTP and POP3 protocol classes respectively.
The problem I'm running into right now is that I haven't found a way to translate incoming email messages (bytestreams) into Java Mail objects.
Can anyone point me in the right direction and help me find out how to translate bytes received at ServerSocket objects (ServerSocket(25) and ServerSocket(110)) into Java mails?

Thanks, those are indeed important documents. Currently, I'm able to listen at port 25 for any incoming network transmissions. Unfortunately, when I try sending an email to the machine, the program sending it reports an error about the domain not being found (I also see nothing in my server console).
ServerSocket smtp = new ServerSocket(25);
boolean listening = true;
while (listening) {
    Socket s = smtp.accept();
    PrintWriter out = new PrintWriter(s.getOutputStream(),true);
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    System.out.println(in.readLine());
    out.println("ok");
    listening = false;
s.close();
smtp.close();According to me, the above program should at least print something to the console when another machine in my network sends an email to this machine (all@myclient). Somehow, though, I'm not getting anything...

Similar Messages

  • Mail Server "Type" and Mail Server "Address" for Incoming & Outgoing Mail

    First, the only browser I use is Mozilla's Firefox, the best browser hands down. Second, I have both a Yahoo email account and a Google "gmail" account that I use regularly (daily). I am trying to set up a mail washing program to rid myself of these ridiculous spammers & scammers, however I need to the the Incoming & Outgoing mail server "type" & "address" to do this and I seem to have guessed the yahoo settings, but I can't seem to get the Google gmail account set up properly. Yahoo settings that worked are: Server Type="POP3" and Server Address="pop.mail.yahoo.com", with advanced settings: Secure Authentication=Required, Secure Connection (SSL)=Required, Store Cached Emails=Yes, Server Port Number=995 (set), Pipelining=Enabled. The equivalent settings for the Google gmail account result in an error message = "Failed to log into POP3 Server". Of course user name & password triple checked, Type=POP3, Address=pop.mail.gmail.com, and , Address="pop.gmail.com" tried also, Port and other settings the same. Where can I find this info for both accounts? Tanks a million! -jw

    Yahoo and Gmail support should be able to help you.
    Not related to Firefox support, web mail doesn't use POP or SMTP protocols which is what email clients such as Thunderbird use for communicating with email servers.

  • SSL Server Socket and j2me

    I make a SSL Server Socket. I want that a cell connect to it for take data. I have to make Certificate form my server. this is for a Stage so I can't pay for certificate. If I make my self signed cert can I install it to a cell or this operation is blocked?

    Sorry, I make an SSL Server Socket using java and this server stays on a pc.

  • Server Socket does not read data input stream

    Hi all,
    I am very newbie to Java Network programming with sockets and multi-threading.
    But I am obliged to develop a chat system written in Applets which can be placed on the website and used by visitors who come to my website.
    In order to understand this, I have tested a basic web chat program I downloaded from the Internet which use sockets and multi-threadings. The program work fine, no bugs at all at both compilation and run time. I noticed that all three streams for Client side (i.e. first one is input stream used receiving data from User; the second one is socket input stream used for receiving data from Server socket, and the third is socket output stream used for writing data to server socket) were established. And the same, two socket streams (input & output) for Server side were also connected when running program giving right port number and IP address of the server.
    The problem is both server and client sockets do not read data using the following stream classes:
    1. DataStreamInput: I use input.readUTF() method
    2. or BufferedReader: I use input.readLine() method
    The example of the codes are below:
    private BufferedReader input = null;
    private PrintWriter output = null;
    private Socket socket = null;
    public void open() throws IOException
    {  input = new BufferedReader(new
    InputStreamReader(socket.getInputStream()));
    System.out.println("Server socket input stream was created, and");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Server socket output stream was created");
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    System.out.println("Server is reading data from Client, wait...");
    String fromClient = input.readLine();
    System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    The problem is at the line: String fromClient = input.readLine(); in the run() method? What is wrong with the codes above?
    Note: I also try to use original codes which use readUTF() method in DataStreamInput class instead using readLine() in BufferedReader. Both methods dont read data from inputstream socket?
    I very appreciate any help/advice from experienced developers.
    Best regards

    Hi,
    Yes. The readLine() method hangs! After the test, the execuation of the program is stopped at the line of readLine() method; it does not pass it?
    There is no problem with writing to Server socket. After the test, the program pass through flush() method. Here is the code for writing to sever socket within ChatClient (client side socket) class:
    private BufferedReader input = null;
    private PrintWriter           output = null;
    public ChatClient(String serverName, int serverPort)
    {  System.out.println("Establishing connection. Please wait ...");
    try
    {  socket = new Socket(serverName, serverPort);
    System.out.println("Connected: " + socket);
    start();
    catch(UnknownHostException uhe)
    {  System.out.println("Host unknown: " + uhe.getMessage()); }
    catch(IOException ioe)
    {  System.out.println("Unexpected exception: " + ioe.getMessage()); }
    public void start() throws IOException
    {  input   = new BufferedReader (new
                             InputStreamReader(System.in));
    System.out.println("Client User input stream was created,");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Client Socket output stream was established, and");
    if (thread == null)
    {  client = new ChatClientThread(this, socket);
    thread = new Thread(this);
    thread.start();
    public void run()
         while (thread != null) {
         String fromUser;
              try{
                   while((fromUser = input.readLine())!= null)
                   System.out.println("Client wasreading a data from User, and");
    output.println(fromUser);
         output.flush();
         System.out.println("Client has written a data to Server");
    catch(IOException ioe)
    {  System.out.println("Sending to server error: " + ioe.getMessage());
    stop();
    etc.
    Here is a piece of codes for reading data from the Client Socket in the ChatServer Class (Server Side socket):
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    {  //server.handle(clientPort, input.readLine());
    System.out.println("Server is reading data from Client, wait...");
    String fromUser = input.readLine();
    //while((fromUser = input.readLine()) != null)
         System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    etc. Please advice why the readLine() method hangs; does not read data from the input stream received from the CLIENT?

  • Simple question about sockets and streams - please answer it!

    Hi
    I have a server socket and a client socket. Both are up and runing. But I'm having problems to send a string from the client and read only the four first bytes on the server. Please read the code and some other comments below:
    socket client:
    DataOutputStream out =
    new DataOutputStream(socket.getOutputStream());
    // read from keyboard input
    BufferedReader myinput =
    new BufferedReader(new InputStreamReader(System.in));
    System.out.println("Type any 4 chars and [enter].");
    String any = myinput.readLine();
    out.writeBytes(any);
    out.flush();
    server socket:
    in = new DataInputStream(socket.getInputStream());
    byte[] id = new byte[4];
    in.read(id, 0, 4);
    System.out.print(new String(id));
    According to the code, it should read 4 bytes from the input stream (in.read(id, 0, 4)), but it displays only the first byte. For example, if I type "hello" on client, the serve should show "hell" but it shows just "h"
    Any ideias? Thanks!

    Hi,
    Check the Javadoc for 'in.read(id, 0, 4);' This reads up to 4 bytes and returns the number of bytes read. You need something along the lines of
    int count = 0;
    while (count < 4)
    count += in.read(id, count, 4-count);
    Roger

  • Socket Exception when closing Server Socket Streams if Client closes first

    Hi
    I have 2 processes - a Server socket and a client socket. If I close the Client process first, and then try closing down the Streams on the Server process, I get a SocketException with message "Socket is closed" when I try and close the 2nd Stream. It does not matter on the order of the Stream being closed down, the exception is always thrown when I try and close the second stream. The code snippets are below:
    SERVER =======
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class ServerSocketTest {
    public static void main(String args[]) {
    try {
    ServerSocket ss = new ServerSocket(9999);
    Socket s = ss.accept();
    // Get refs to streams...
    InputStream is = s.getInputStream();
    OutputStream os = s.getOutputStream();
    // sleep to let client shutdown first...
    try {
    Thread.sleep(10000);
    } catch (InterruptedException e) {
    System.err.println(e);
    System.err.println("B4 inClose: isBound=" + s.isBound());
    System.err.println("B4 inClose: isClosed=" + s.isClosed());
    System.err.println("B4 inClose: isConnected=" + s.isConnected());
    System.err.println("B4 inClose: isInputShutdown=" + s.isInputShutdown());
    System.err.println("B4 inClose: isOutputShutdown=" + s.isOutputShutdown());
    s.getInputStream().close();
    System.err.println("After inClose: isBound=" + s.isBound());
    System.err.println("After inClose: isClosed=" + s.isClosed());
    System.err.println("After inClose: isConnected=" + s.isConnected());
    System.err.println("After inClose: isInputShutdown=" + s.isInputShutdown());
    System.err.println("After inClose: isOutputShutdown=" + s.isOutputShutdown());
    s.getOutputStream().close(); // will break here with SocketException!
    System.err.println("After outClose: isBound=" + s.isBound());
    System.err.println("After outClose: isClosed=" + s.isClosed());
    System.err.println("After outClose: isConnected=" + s.isConnected());
    System.err.println("After outClose: isInputShutdown=" + s.isInputShutdown());
    System.err.println("After outClose: isOutputShutdown=" + s.isOutputShutdown());
    s.close();
    } catch (Exception e) {
    System.err.println(e);
    CLIENT ======
    import java.net.Socket;
    public class ClientSocket {
    public static void main(String args[]) {
    try {
    Socket s = new Socket("localhost", 9999);
    try {
    // sleep to leave connection up for a while...
    Thread.sleep(2000);
    } catch (InterruptedException e) {
    System.err.println(e);
    s.close();
    } catch (Exception e) {
    System.err.println(e);
    The debug shows that isClosed() is set to 'true' after the first call to s.getInputStream().close(). The Sun API Socket class getOutputStream() has a call to isClosed() at the start of the method - it then throws the SocketException that I get. Why does the SocketImpl do this before I get a chance to call a.getOutputStream().close()?
    One final thing, the calls to s.isInputShutdown() and s.isOuputShutdown always seem to return false even if the Streams have had their .close() method called.
    Any ideas/help here greatly appreciated.
    Thanks
    Gaz

    Ok, I know what's going on now - I needed something to do on Friday afternoon anyhow!
    Basically if you call either getOutputStream.close() or getInputStream().close(), the underlying Sun implementation will close the Socket.
    Here's what's happening under the covers in the Sun code:
    s.getInputStream() is called on the Socket class.
    The Socket class holds a reference to the SocketImpl class.
    The SocketImpl class is abstract and forces sublclasses to extend it' s getInputStream() method.
    The PlainSocketImpl extends SocketImpl.
    PlainSocketImpl has a getInputStream() method that returns a SocketInputStream. When the stream is created for the first time, the PlainSocketImpl object is passed into the Constructor.
    The SocketInputStream class has a close() method on it. The snippet of code below shows how the socket is closed:
    <pre>
    * Closes the stream.
    private boolean closing = false;
    public void close() throws IOException {
         // Prevent recursion. See BugId 4484411
         if (closing)
         return;
         closing = true;
         if (socket != null) {
         if (!socket.isClosed())
              socket.close();
         } else
         impl.close();
         closing = false;
    </pre>
    So, it seems that out PlainSocketImpl is getting closed for us, hence the SocketException being thrown in Socket.getOutputStream() when I call it after Socket.getInputStream()/
    I've not had a look at the reason why the calls to s.isInputShutdown() and s.isOuputShutdown always seem to return false even if the Streams have had their .close() method called though - any thoughts appreciated.
    Thanks
    G

  • File transfer to multiple clients from server socket

    I have multiple clients connected to my server socket and I need to copy more than 200mb documents from server to all clients over socket. Can we design the issue considering scalability and performance factor? What I am thinking of we should use thread for transferring file from server to client. But at the same time if we have large number of clients then we can't initialize a thread for each client. I think in this case we should initialize less than 10 threads in the pool as the file size is very large. If we keep number of threads in the pool low then probably we have to read multiple times the large server file (once for each group) which might again be a performance bottleneck. Please pour in your suggestions.

    File would be same for an instance only. For example say I have a "SEND File" button & �File Path� text box. In File Path suppose user enters the absolute path of the file and then clicks on Send File button. The responsibility of Send File button would be sending the file mentioned in the "File Path" text box to all connected client. But next time user can choose a different file.

  • Trying to send e-mail using JavaMail, JBoss 5, and JNDI

    Hello there,
    Am using JBoss 5.1.0GA and JDK 1.5.0_19 on OS X Leopard.
    Created a working SendMailServlet.
    Have now decided to refactor it into two separate classes (extract out JavaMail code to a separate class and create a ServletController).
    Am also trying to use JNDI to access the connection properties in the mail-service.xml configuration file residing in JBoss.
    The Mailer class contains the reusable functionality needed to send an e-mail:
    public class Mailer {
         private Session mailSession;
         protected void sendMsg(String email, String subject, String body)
         throws MessagingException, NamingException {
              Properties props = new Properties();
              InitialContext ictx = new InitialContext(props);
              Session mailSession = (Session) ictx.lookup("java:/Mail");
    //          Session mailSessoin = Session.getDefaultInstance(props);
              String username = (String) props.get("mail.smtps.user");
              String password = (String) props.get("mail.smtps.password");
              MimeMessage message = new MimeMessage(mailSession);
              message.setSubject(subject);
              message.setRecipients(javax.mail.Message.RecipientType.TO,
                        javax.mail.internet.InternetAddress.parse(email, false));
              message.setText(body);
              message.saveChanges();
              Transport transport = mailSession.getTransport("smtps");
              try {
                   transport.connect(username, password);
                   transport.sendMessage(message, message.getAllRecipients());
                   Logger.getLogger(this.getClass()).warn("Message sent");
              finally {
                   transport.close();
    }The MailController class serves as a standard Java Servlet which invokes the Mailer.class's sendMsg() method:
    public class MailController extends HttpServlet {
         /** static final HTML setting for content type */
         private static final String HTML = "text/html";
         myapp/** static final HTML setting for content type */
         private static final String PLAIN = "text/plain";
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
              doPost(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
              response.setContentType(PLAIN);
              PrintWriter out = response.getWriter();
              String mailToken = TokenUtil.getEncryptedKey();
              String body = "Hello there, " + "\n\n"
                        + "Wanna play a game of golf?" + "\n\n"
                     + "Please confirm: https://localhost:8443/myapp/confirm?token="
                     + mailToken + "\n\n" + "-Golf USA";
              Mailer mailer = new Mailer();
              try {
                   mailer.sendMsg("[email protected]", "Golf Invitation!", body);
                   out.println("Message Sent");
              catch (MessagingException e) {
                   e.printStackTrace();
              catch (NamingException e) {
                   e.printStackTrace();
    }Have the mail configuration set under $JBOSS_HOME/server/default/deploy/mail-service.xml:
    <server>
      <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
        <attribute name="JNDIName">java:/Mail</attribute>
        <attribute name="User">user</attribute>
        <attribute name="Password">password</attribute>
        <attribute name="Configuration">
          <configuration>
            <property name="mail.store.protocol" value="pop3"/>
            <property name="mail.transport.protocol" value="smtp"/>
            <property name="mail.user" value="user"/>
            <property name="mail.pop3.host" value="pop3.gmail.com"/>
            <property name="mail.smtp.host" value="smtp.gmail.com"/>
            <property name="mail.smtp.port" value="25"/>
            <property name="mail.from" value="[email protected]"/>
            <property name="mail.debug" value="true"/>
          </configuration>
        </attribute>
        <depends>jboss:service=Naming</depends>
      </mbean>
    </server>web.xml (Deployment Descriptor):
    <servlet>
        <servlet-name>MailController</servlet-name>
        <servlet-class>com.myapp.MailController</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>MailController</servlet-name>
        <url-pattern>/sendmail</url-pattern>
    </servlet-mapping>This is what is outputted when I start JBOSS and click point my browser to:
    https://localhost:8443/myapp/sendmail
    [MailService] Mail Service bound to java:/Mail
    [STDOUT] DEBUG: JavaMail version 1.4ea
    [STDOUT] DEBUG: java.io.FileNotFoundException:
    /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/javamail.providers
    (No such file or directory)
    [STDOUT] DEBUG: !anyLoaded
    [STDOUT] DEBUG: not loading resource: /META-INF/javamail.providers
    [STDOUT] DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    [STDOUT] DEBUG: getProvider() returning
    javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc]
    [STDOUT] DEBUG SMTP: useEhlo true, useAuth false
    [STDOUT] DEBUG SMTP: trying to connect to host "localhost", port 465, isSSL true
    [STDERR] javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 465;
      nested exception is:
         java.net.ConnectException: Connection refused
    [STDERR]      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
    [STDERR]      at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
    [STDERR]      at javax.mail.Service.connect(Service.java:275)
    [STDERR]      at javax.mail.Service.connect(Service.java:156)
    [STDERR]      at javax.mail.Service.connect(Service.java:176)
    [STDERR]      at com.myapp.Mailer.sendMsg(Mailer.java:45)
    [STDERR]      at com.myapp.MailController.doPost(MailController.java:42)
    [STDERR]      at com.myapp.MailController.doGet(MailController.java:26)Why am I getting this java.net.ConnectException: Connection refused exception?
    Happy programming,
    Mike
    Edited by: mwilson72 on Aug 21, 2009 4:49 PM

    Hi Peter,
    Nice to hear from you again!
    Per your advice, this is what my mail-service.xml config file looks like now:
    <?xml version="1.0" encoding="UTF-8"?>
    <server>
      <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
      <attribute name="JNDIName">java:/Mail</attribute>
      <attribute name="User">user</attribute>
      <attribute name="Password">password</attribute>
      <attribute name="Configuration">
         <configuration>
            <property name="mail.store.protocol" value="pop3"/>
         <property name="mail.transport.protocol" value="smtps"/>
            <property name="mail.smtp.starttls.enable" value="true"/>
            <property name="mail.smtps.auth" value="true"/> 
            <property name="mail.user" value="user"/>
            <property name="mail.pop3.host" value="pop3.gmail.com"/>
            <property name="mail.smtp.host" value="smtp.gmail.com"/>
            <property name="mail.smtps.port" value="465"/>
            <property name="mail.from" value="[email protected]"/>
            <property name="mail.debug" value="true"/>
         </configuration>
       </attribute>
       <depends>jboss:service=Naming</depends>
      </mbean>
    </server>Now, when I restart JBoss and point my browser to:
    https://localhost:8443/myapp/sendmail
    I get this exception:
    [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
    [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
    [STDOUT] DEBUG SMTP: trying to connect to host "localhost", port 465, isSSL true
    [STDERR] javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 465;
      nested exception is:
         java.net.ConnectException: Connection refused
    [STDERR] at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
    [STDERR] at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
    [STDERR] at javax.mail.Service.connect(Service.java:297)
    [STDERR] at javax.mail.Service.connect(Service.java:156)
    [STDERR] at javax.mail.Service.connect(Service.java:176)
    [STDERR] at com.myapp.Mailer.sendMsg(Mailer.java:45)
    [STDERR] at com.myapp.MailController.doPost(MailController.java:42)
    [STDERR] at com.myapp.MailController.doGet(MailController.java:26)Does anyone know what I am possibly doing wrong? Is it my code or is it the config file?
    -Mike

  • Eem on cisco 877, trouble with mail server action and smtp auth

    hello all,
    i'm using a router 877 at home and i really need to check out what this router do during the day.
    So some time ago i configured it using some eem actions and sending to me email, without any problems.
    Yesterday I changed my internet provider and now i need to use smtp autheticantion to send emails.
    I read about how to authenticate, like username:password@host and also made a fast search here, without solve my problem.
    I need to put as username the email of the provider like: [email protected]:[email protected]
    So, i want to know if someone had the same problem and solved it. Of course i couldn't use @ two times or eem would think that host.com is my smtp server! And right now is going in this way!
    My IOS version is 15.1(2)T2, eem version is 3.1.
    Hope someone could help me!
    Thank you in advance.
    Sandro

    Hello,
    Thank you very much in advance for any help you can offer. Debugging I get this but stunnel.conf is edited and started
    %HA_EM-3-FMPD_SMTP: Error occured when sending mail to SMTP server: smtp.gmail.com : error in reply from SMTP server
    Router Cisco 877 with IOS version is 12.4(15)T16
    Router Config:
    ip host gmail.com pc_host*
    track 1 rtr 1 reachability
    delay down 10 up 60
    ip route 0.0.0.0 0.0.0.0 Dialer0 track 1
    ip sla 1
    icmp-echo 8.8.8.8 source-interface Dialer0
    timeout 2000
    frequency 4
    ip sla schedule 1 life forever start-time now
    event manager environment to@gmail
    event manager environment [email protected]
    event manager environment smtp.gmail.com*
    event manager applet TRACK-1-OK
    event track 1 state up
    action 1.0 mail server "smtp.gmail.com" to "[email protected]" from "[email protected]" subject "E2E up/down" body "DSL is UP"*
    * I use several possible key combinations:
    ip host smtp.gmail.com pc_host
    event manager environment [email protected]:[email protected]
    action 1.0 mail server "[email protected]:[email protected]" to "[email protected]" from "[email protected]" subject "E2E up/down" body "DSL is UP"*
    stunnel.conf config:
    cert = stunnel.pem
    socket = l:TCP_NODELAY=1
    socket = r:TCP_NODELAY=1
    client = yes
    options = NO_SSLv2
    [pop3s]
    accept  = 110
    connect = pop.gmail.com:995
    [imaps]
    accept  = 143
    connect = pop.gmail.com:993
    [ssmtp]
    accept  = 25
    connect = smtp.gmail.com:465
    Greetings,
    Guiller

  • How to get rid of automatically created server accounts in iCal and Mail?

    I have recently setup an OS X 10.6.2 Server for our small office. I got the domain name wrong in the initial install and fixed this by doing a complete clean reinstall of OS X 10.6 server (then upgrade to 10.6.2).
    The problem is that one of the OS X 10.6.2 clients had been setup to talk to the server prior to the rebuild. Now on this client, I cannot work out how to get rid of or change the automatically created server accounts in iCal and Mail - everytime you login, these are recreated using the old domain name (and of course don't work).
    In Mail if you remove the server account (from Accounts in Preferences), it just pops back again. I even removed every trace of the old domain name from the apple.com.mail.plist file but when I re-open Mail that darned server account (with the old domain name) just pops up again.
    In iCal its slightly different in that you can remove the account and it stays away while you have iCal open. But as soon as you close and re-open it, that server account just pops up again!
    I thought it might be something to do with Kerberos and found a Kerberos file on the client which had the old domain name throughout it - I changed all these references to the new domain name, but still the same behaviour in Mail and iCal.
    This is doing my head in. Any ideas?
    Message was edited by: davidav

    I suggest you ask in the snow leopard server forum
    http://discussions.apple.com/category.jspa?categoryID=264

  • Simple question; Mac Server Setup for Mail, iCal and Address Book Services.

    Hi Guys;
    I'm new to the Mac Server world and need a few questions answered.
    I have purchased a new Mac mini Server for hosting File, Web, Mail, iCal and Address Book Services.
    I’m comfortable setting up File and Web Services however I’m a bit uneasy setting up Mail, iCal and Address Book services to be access locally and remotely(via the internet).
    My current setup is;
    Internet connection (Dynamic IP) -> Router -> Mac mini Server.
    I have purchased a domain name (Thornton-net.com) from DynDns.com + a custom DNS service as I can setup my router to update my domain’s IP address automatically.
    I can access File and Web Services remotely (thortnon-net.com) perfectly without any issues via the Port Forwarding feature of the Router.
    If I setup Mail, iCal and Address Book Services -> will Mail, iCal and Address Book clients be able to access these services hosted by the server via Thornton-net.com?
    Message was edited by: Allan.Thornton

    Welcome to the forums.
    For mail services (and specifically for your outbound mail to be accepted by other mail servers) your mail server needs to have a static IP address and matching forward and reverse and MX records, or a tunnel to a static IP (with matching DNS), or you need another mail server where you have an authorized relay. Without that, your mail will be considered a spam engine, and dropped.
    Additionally, your particular tier of service with your ISP (with a static IP) will generally allow server-oriented access and server-oriented network traffic, where a residential or other tier of service (with a dynamic IP addresses) can be firewalled.
    The ISP controls the "high ground" of the network connections here, so you pretty much get to play by their rules and requirements. If they don't offer static IP, then (presuming their T&Cs permit it) you get to tunnel (via IPv6, for instance) to a tunnel broker, and receive your network traffic via that (and with matching DNS) point of presence. That could well be a tunnel for your mail at whichever your DNS provider is here, because you'll have issues with your dynamic address. (You get to sort out if they offer that.)
    Far and away the easiest approach (if you want to host this stuff yourself) is to work with the ISP. They're inherently involved in your network, and they and they alone have full control over your reverse DNS configuration.

  • Can i run UDP  client and UDP  server socket program in the same pc ?

    hi all.
    when i execute my UDP client socket program and UDP server socket program in the same pc ,
    It's will shown the error msg :
    "Address already in use: Cannot bind"
    but if i run UDP client socket program in the remote pc and UDP server socket program run in local pc , it's will success.
    anybody know what's going on ?
    any help will be appreciated !

    bobby92 wrote:
    i have use a specified port for UDP server side , and for client define the server port "DatagramSocket clientSocket= new DatagramSocket(Server_PORT);"Why? The port you provide here is not the target port. It's the local port you listen on. That's only necessary when you want other hosts to connect to you (i.e. when you're acting as a server).
    The server should be using that constructor, the client should not be specifying a port.
    so when i start the udp server code to listen in local pc , then when i start UDP client code in local pc ,i will get the error "Address already in use: Cannot bind"Because your client tries to bind to the same port that the server already bound to.

  • SAPCONNECT  - RFC between SAP BW system and Mail Server

    Hello Everybody,
    Iam trying to enable <b>Information Broadcasting</b> feature in SAP BW System i.e; i want the queries to be send to users from BW system to their Email Ids for which i have made configurations for SMTP node in SICF and SCOT transactions.My problem is that do i need to create an RFC between BW system and Mail Server ,if yes iam not getting the way to do this and wt all parameters need to be set there .If somebody can plz guide me with the parameters that need to be set for SAPCONNECT or send me some good guide which details the creation of RFC ,I shall be highly obliged.Iam struggling with this issue since many days,You can send the guide to me on my email Id [email protected] .Your help shall be of gr8 support.Kindly revert at earliest.
    regards,
    Saumya

    Hi,
    My understanding is -
    you need to following setting to send mails-
    http://help.sap.com/saphelp_nw04/helpdata/en/66/9c25413fabef23e10000000a155106/content.htm
    Need this, if planning to use fax, SMs etc-
    http://help.sap.com/saphelp_nw04/helpdata/en/2b/d925bf4b8a11d1894c0000e8323c4f/content.htm
    hope it helps
    regards
    Vikash

  • Should i create a client and a server socket in a same application

    Greetings,
    In which situation sould i have a server socket ? and in which situation should i have a client socket ?and in which situation should i have both?
    I 'm making a app. who receives info (like alarms ) from a automation machine and also that same app. as a scheduler who send commands according to dates to the automation machine.
    Now the automation machine is programmed like a socket tcp/ip server who is always on and the app. is a client.
    Every time there's an alarm the machine sends me the info and i put it in a mysql database.
    Every time there's an event programmed the app. sends a string to the machine.
    The question is that i can't maintain that socket always connected, Sometimes disconnets.
    I was thinking of making the change of creating in both sides a server and a client, so that, for example, in the app. the client woul d handle the event msgs and the server would accecpt connections with alarms from the automaition machine.
    Since i'm a newbie in Java could somebody give me some tips, please?
    Thanks

    Thanks Peter....
    But i already do that....
    I have a thread who handles the connection management.
    If by some reaseon the connection is lost the thread reconnects it.
    My problem is that sometimes it reconnects every second, and i loose info provided by the automatian machine.
    The best thing to have it would be a socket listener, but Java does have any.
    Is there any API that does a socket listener?

  • Hi, I have private emails in IPAD2, i have chaged the incoming mail server name and saved the change.

    Hi, I have private emails in IPAD2, i have chaged the incoming mail server name and saved the change.
    but, when I back to read my old emails in inbox it's gone away, I have backed to setting and return the previous
    incoming mail name, but also I did't get the old emails. where I can find the old emails in my IPAD2 ?

    It is only the link to your emails which are 'stored' on your iPad. You will have to enter all proper email addresses to get the message associated with them, which, in practice,  means multiple accounts. If all still does not work try a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release].

Maybe you are looking for