Thread: C++ email server to communicate with another programs C++ API

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    3

    C++ email server to communicate with another programs C++ API

    Hello, I am interested in hiring someone to complete a fairly simple task for me. I subscribe to (Sang Lucci - Options Made Simple ) who sends out stock options alerts. He is fairly profitable, but since I work all day I cannot be at the computer to make the trades myself when he sends out the email alerts, thus I cannot follow his trades. I am trying to set up a simple C++ email server to receive the alert emails, and then use the API in (https://speedtrader....tedTrading.aspx ) to automatically execute the trades after the code I write extracts the ticker symbol, buy or sell, etc from the email. It may be better to use a different language for the server, but the API is in C++, so it may be easier that way. I know there are lots of open source C++/java/etc email server packages out there, but Ive been out of programming for nearly 10 years so idk what the hell is going on. I could be wrong, but the only thing that the email server would need to be able to do is receive emails as fast as possible (at least within 1/4 of a second, the quicker the better) with one or multiple email addresses. I would like to have some room to play around some with the code that decides how much to buy/sell etc. Could someone here do this for a fee?

    Thanks in advance,

    Chris

  2. #2
    Registered User
    Join Date
    Jan 2012
    Posts
    3
    Is $500 anywhere near the right ballpark for this task?? $1,000????

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    You mean email client -- the server is where you get your mail from. It does not get sent directly to your computer; it gets sent to your ISP, and your software picks it up from them.

    It is not feasible to be checking for mail every 1/4 second either. Every 15 or 30 seconds might be possible, but realistically, every few minutes is probably fine. If you use an email program that alerts you when you have mail, it does not poll more often than that. No one expects completely instantaneous communication via email; for that you would use messaging. I notice Sang Lucci also offers SMS updates, but you can't receive those online. I think there is software you can use if you plug an SMS mobile phone into the computer.

    Have you heard of this?
    Elance

    Also, maybe you should post some contact info
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #4
    Registered User
    Join Date
    Jan 2012
    Posts
    3
    yes, thank you for correcting me on the email terminology. That is exactly why I am asking for help! I think that 15 seconds would be acceptable. Also, thank you for pointing out that I needed to include contact information. you can email me at ctharrigan0704 at gmail dot com

  5. #5
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    This calls for an old-school solution -- Linux box running standard mail server which will receive the emails. Delivery via the ".forwards" file which runs a simple C++ program that parses the email and invokes the trading API.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  6. #6
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by brewbuck View Post
    This calls for an old-school solution -- Linux box running standard mail server which will receive the emails.
    Unfortunately, I don't think you will find it so easy to run your own public mailserver anymore, as major mailservers now use circulated whitelists, and good luck getting myplace.com on it. That's mostly an issue for the from: address tho -- it might work out if you only use the address to receive.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #7
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by MK27 View Post
    Unfortunately, I don't think you will find it so easy to run your own public mailserver anymore, as major mailservers now use circulated whitelists, and good luck getting myplace.com on it. That's mostly an issue for the from: address tho -- it might work out if you only use the address to receive.
    Huh? You're suggesting that anybody who wants to buy a domain and throw up a mailserver has to get some kind of dark-alley authorization from some sneaky SMTP cabal who ordains who is and is not worthy of participating with the rest of the Internet? First I've heard of it.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by brewbuck View Post
    Huh? You're suggesting that anybody who wants to buy a domain and throw up a mailserver has to get some kind of dark-alley authorization from some sneaky SMTP cabal who ordains who is and is not worthy of participating with the rest of the Internet? First I've heard of it.
    Yep, that's exactly what I am suggesting. What will happen is, you send your "from: myplace.com" mail to Bob, who has a normal ISP mail account. Bob's ISP will bounce your mail back because "myplace.com" is not whitelisted by the afforementioned SMTP cabal, who are in fact mainstream, control most of the email traffic in the world, and do determine who is and is not worth of participation. This came about in the last 5-10 years because of spam. Who "the cabal" are and how they operate are up to you to discover, but if you cannot get in their goodbooks, you are wasting your time trying to serve general purpose email independently. Like I said: "they" (major SMTP servers) do not bother with blacklists anymore.* It's whitelists. You are guilty until proven innocent.

    This makes sense -- I believe most of the email in the world is considered spam. Blacklists as a first defence are not feasible because if someone doesn't care about the validity of the return address, they will just keep moving around, and who is going to keep up that way? Hence it's about whitelisting. Also, nb, getting on those lists may cost you:

    Quote Originally Posted by http://en.wikipedia.org/wiki/Whitelist#Email_whitelists
    Some internet service providers have whitelists that they use to filter e-mail to be delivered to their customers. ISPs receive requests from legitimate companies to add them to the ISP whitelist of companies. Companies either pay for a time period to be allowed to e-mail their customers or the companies pay per complaint received by the ISP from their customers. These payments per complaint increase incrementally; i.e., the first 10 complaints are $10 each, then the next 10 are $20 each. These funds are then used by the ISPs to fund anti-spam programs to prevent unwanted e-mail.
    By "some" read: too many to make it worthwhile ignoring.

    * except WRT to specific accounts or domains from servers who are otherwise whitelisted, which I guess implies not everyone in the cabal is totally comfortable with everyone else.
    Last edited by MK27; 01-04-2012 at 05:39 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #9
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    I know gmail had no problem letting me send emails from my own postfix server to my gmail account as late as september last year (haven't tried it after that but i doubt they changed it).

  10. #10
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Quote Originally Posted by MK27 View Post
    Yep, that's exactly what I am suggesting. What will happen is, you send your "from: myplace.com" mail to Bob, who has a normal ISP mail account. Bob's ISP will bounce your mail back because "myplace.com" is not whitelisted by the afforementioned SMTP cabal, who are in fact mainstream, control most of the email traffic in the world, and do determine who is and is not worth of participation. This came about in the last 5-10 years because of spam. Who "the cabal" are and how they operate are up to you to discover, but if you cannot get in their goodbooks, you are wasting your time trying to serve general purpose email independently. Like I said: "they" (major SMTP servers) do not bother with blacklists anymore.* It's whitelists. You are guilty until proven innocent.
    Watching a bit too much X-Files recently

    I've been running our companies mail-server on the same box for about 8 years now on a simple domain I purchased. Sure you get problems like when an employee runs something he/she shouldn't and a virus gets in that spreads loads of spam email as its payload or when someone clever sends out a mass mailing to him/herself and CCs in 300 people. but you can always contact the "whitelist" and request yourself removed from any black list that this has put you on. I've done this a couple of times over the last few years and apart from a few hours inconvenience it has worked.

    Good housekeeping seems to avoid most problems

  11. #11
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Fordy View Post
    Watching a bit too much X-Files recently
    No, that was a personal experience story. Major ISPs do use whitelists, for a fact. That they all see it as a money grab I doubt (because that would fail), or that they are very restrictive about it -- probably not. Just I would not expect to set up a personal mailserver in your den tomorrow and not run into a tishload of problems.

    I've been running our companies mail-server on the same box for about 8 years now on a simple domain I purchased.
    Like I said, this is the past 5-10 years. Spoofing mail was one of the first tee-hee hacker wannabee things I did a decade ago. It was drop dead easy then, it is much more difficult now.

    If you had an established, implicit relationship with more mainstream mailservers at the time they made up their lists, I would imagine you'd be automatically be on it. Further, presumably these are/were then shared with other trusted parties so as not to create problems for legitimate users. After all, the idea is just to shut out people who try to get around blacklists by not maintaining a stable identity.

    In short, Fordy, you're a whitelisted organization, even if you don't know it.

    BTW, I didn't bring this up to discourage anyone from trying -- I just brought it up as a factor for consideration. And because I honestly think "bob.home" is going to be an uphill battle, but please, prove me wrong.

    Quote Originally Posted by Shakti View Post
    I know gmail had no problem letting me send emails from my own postfix server to my gmail account as late as september last year (haven't tried it after that but i doubt they changed it).
    I think you're right about gmail, as that was part of how I discovered this (why does my gmail account receive but accounts X and Y do not?). Nb. you do not actually get a bounce notice which I implied before, your mail is just discarded. If it were just a matter of blacklists, you would have to do something wrong first, but like I said, a significant number of ISPs obviously do not work on that premise any longer.

    Anyway, just to prove this is not a fantasy of mine:

    http://www.clickz.com/clickz/column/...-worth-earning
    http://www.aweber.com/blog/email-del...back-loops.htm
    http://www.intelligentwhitelisting.com

    Note it's the IP's that are whitelisted, not the domains.
    Last edited by MK27; 01-05-2012 at 03:27 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  12. #12
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Quote Originally Posted by MK27 View Post
    No, that was a personal experience story. Major ISPs do use whitelists, for a fact. That they all see it as a money grab I doubt (because that would fail), or that they are very restrictive about it -- probably not. Just I would not expect to set up a personal mailserver in your den tomorrow and not run into a tishload of problems.



    Like I said, this is the past 5-10 years. Spoofing mail was one of the first tee-hee hacker wannabee things I did a decade ago. It was drop dead easy then, it is much more difficult now.

    If you had an established, implicit relationship with more mainstream mailservers at the time they made up their lists, I would imagine you'd be automatically be on it. Further, presumably these are/were then shared with other trusted parties so as not to create problems for legitimate users. After all, the idea is just to shut out people who try to get around blacklists by not maintaining a stable identity.

    In short, Fordy, you're a whitelisted organization, even if you don't know it.

    I've changed IPs within the last year when I changed providers without any problem.

    As I see it, the main thing to do to avoid problems is good housekeeping and a static IP (dynamic IPs are an automatic no-no and will usually be flagged as spam). If I had a newly issued static IP I doubt I'd have many problems.

    I would point out that marketing organisations are in a different world on this - sending out multiple emails that are very similar, at almost the same time and repeating recipients regularly will raise your chances of being seen as spam, so getting "white-listed" is probably worthwhile.

  13. #13
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Fordy View Post
    I've changed IPs within the last year when I changed providers without any problem.
    It may be a one or the other deal -- either you are working with a recognized provider and so your IP is okay and/or your domain is recognized. To be clear, when I ran into this a few years ago, I was not spamming or bulk mailing. I am not now nor have I ever been in that business. I just wanted to run a personal mailserver. There was no reason at all to blacklist me. I sent maybe a few dozen emails to other accounts that I pay for.* I did not bother trying to get whitelisted when I found out what the issue was because it was not that important to me, and I did not want to go thru the hassle of guessing who got my mail and who didn't since, as I said, there is no bounce notice.

    If you have a few regular ISP addresses and a regular ISP account at home, trying sending directly from a home mail server to those accounts. I bet at least 20-30% of them will not receive.

    * It may even have been one of those providers that tipped me off (probably Earthlink, which I used to use as a dial-up backup), I honestly don't remember.
    Last edited by MK27; 01-05-2012 at 03:56 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  14. #14
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    If somebody is unable to receive my emails because their ISP is blocking with a whitelist, then I'm sorry but maybe they should use a provider that doesn't deliberately break the Internet...

    I've never had a problem emailing anybody who mattered from any of my numerous domains.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to communicate with the web server
    By nadeem athani in forum Linux Programming
    Replies: 1
    Last Post: 03-09-2011, 09:11 AM
  2. Email Server on c#!
    By andhikacandra in forum C# Programming
    Replies: 0
    Last Post: 10-09-2007, 08:49 PM
  3. using socket to communicate between programs on one computer
    By axr0284 in forum Networking/Device Communication
    Replies: 2
    Last Post: 03-20-2006, 11:53 AM
  4. Email Server
    By Thantos in forum Tech Board
    Replies: 2
    Last Post: 11-18-2003, 06:35 AM
  5. Getting two programs to communicate
    By Thantos in forum Windows Programming
    Replies: 4
    Last Post: 08-27-2003, 07:39 AM