Bounced emails: automatically deactivating bad addresses...

Just wanted a little feedback on what strategy might be best for automating the deactivation process. I have a database with a list of addresses that needs to be frequently updated-- any messages that I receive in a certain inbox are typically bounced emails and I wish to deactivate these addresses in my database so I no longer send to them.
The best method I can think of, short of going through and manually identifying the original address I sent to (I've got better things to do!), seems to be to develop a method which parses the entire header and finds any email addresses (rebuilding any tokens that contain '@') and through brute force, simply tries to deactivate any and all reconstructed email addresses that I find. Not a very elegant method, I know. Since I won't be needing to automatically send emails to myself (return addresses and original sender) and anyone else of the 'postmaster' or 'MAILER-DAEMON' variety, I assume that any other email addresses contained within the header (somewhere)will be the one(s) that I'm looking for. Is this a fair assumption?
Has any got a suggestion on how to improve this crude parsing? Everything I've read online suggests that a 100% success rate is impossible due to the lack of standards imposed on header content. Anything I send out is not guaranteed to come back to me, according to my understanding, so what other options may be available?
Cheers,
Sean

Here's the first bit of code for testing my brute-force method... It seems to work fine as long for generating possible addresses as there are no instances of '@' at the beginning or end of a parsable-string-- ie. " @xxx", "xxx@ ", etc.. I'm working on that part right now... shouldn't be too hard. Can anyone see possible/definite flaws or improvements/issues I may want to consider? Any comments on this code are much appreciated.
<code>
String content = new String("a string generated from email content");
               StringTokenizer st1 = new StringTokenizer( content, "@" );     //finds possible instances of email addresses
               int numberTokens=st1.countTokens();
               int record=0;
               String garbage;
if(numberTokens>1){
               // create array to hold user and hostname values for all addresses
               String address[] = new String[ 2*(numberTokens-1) ];
               for( int i=0; i<numberTokens; i++ ){
                    String content2 = new String( st1.nextToken() );
                    StringTokenizer st2 = new StringTokenizer( content2, " <>()" );     //set characters which may denote/separate addresses
                    int numberTokens2 = st2.countTokens();
                    for( int j=0; j<numberTokens2; j++ ){
                         if( ((i==0)&&(j==numberTokens2-1)) ||     //to get first username     (first '@' token)
                              ((i==numberTokens-1)&&(j==0)) ||     //to get last domain name (last '@' token)
                              ((i>0&&i<numberTokens-1)&&(j==0||j==(numberTokens2-1))) ){     //get username/domain (encapuslated '@' tokens)
                                   address[record] = st2.nextToken();
                                   record++;
                         }else if( (st2.hasMoreTokens()) )     //move parser to next token if exists
                                                                      //or let for-loop expire.                          
                                   garbage = st2.nextToken();
               for(int k=0;k<address.length;k++ )     
                    System.out.println(address[k]);     //let's see how we did
</code>

Similar Messages

  • I have started to get this error message: 5.1.3 bad address syntax in my email account. I am using Outlook 2011. It does not appear to be affecting sending or receiving email. I have no idea what it means or how to resolve the issue. Any advice?

    I have started to get this error message: "5.1.3 bad address syntax" in my email account. I am using Outlook 2011. It does not appear to be affecting sending or receiving email. I have no idea what it means or how to resolve the issue. Any advice?  My email account is through Optimum online and I am using Airpost Express.
    P.S. The error sound "bong" is driving us nuts!

    Please post on the Office for Mac product forums that Microsoft hosts. It's their product and they can best troubleshoot the issue.

  • HT4993 I had a email address in my my phone , and want to change but when pull up download app the old email automaticly comes up how do i change?

    I had a email address in my my phone , and want to change but when pull up download app the old email automaticly comes up how do i change?

    All apps that you have purchased or downloaded are tied to the apple id/email that you use to buy it.  That's why it is showing your old email when you are trying to update the app.

  • My email gives 2 sender addresses, it always automatically goes to the one i don't want as my email address, i try to remember to change it. how do i change it to automatically come up with the one I want

    my icloud email gives 2 sender addresses, (icloud.com and me.com) it always automatically goes to the one i don't want (icloud.com) as my email address, i try to remember to change it to (me.com). how do i change it to automatically come up with the one I want (me.com)

    On your iOS device, go to Settings > Mail, Contacts, Calendars > iCloud > Account. Tap Mail, tap Email, then tap the address you want to send from.

  • Automatic "Reply to" address when sending emails?

    Is there a way to automatically include an address in the "Reply to" field in all my outgoing emails, similar to the way Mail can automatically put your own address in the CC or BCC field?

    Oh, I just found two possible ways in another thread but they have serious drawbacks:
    1. Change the "send new email from" address in the prefs. Unfortunately Mail won't let me create an account with my desired email address because the address I want to use has the same host and user name as my "From" address.
    2. Go into Terminal and make a permanent "Reply To" address. This method is so arcane and scary that I really don't like the idea, plus it's unchangeable.
    Apple should offer an option to include an automatic "reply to" feature. If they don't, they dropped the ball on that one.

  • Mail bouncing/filtering emails from a known address

    Hi, I have a problem with Mail 5.1 filtering emails from a known email address (in my Address Book).
    If I get several emails from the same address, one after another, normally the third or fourth one is put in the junk folder, even though Mail is set to leave all mail in my inbox!
    If I turn off junk filtering, the mail is bounced back to the sender.
    Any ideas? It's annoying as I don't always see the email in the Junk folder.
    Thanks

    Thanks for your time.
    Under SCOT " * " is stated so I think that is not an issue and yes  xyz=abc.com is a valid domain address and mails are succesfully sent and received via Microsoft Outlook.
    And, RFC Connection is fine as when tested.
    SMICM = SMTP Service exist and port number as 0.
    But to remind, if I send mail from xyz=abc.com to pqr=abc.com the mail is not received at Outlook but under SOST, the status is fine and indicates it is sent.
    Mail is not been sent FROM same domain TO the same domain.
    As, if i send mail from xyz=abc.com to samplename=mydomain.com the mail is sent and recieved succesfully
    Please help.

  • Mail won't send if recipients include bad address?

    I've been having a problem sending email on occasion, and it seems to be linked to a recipient in the recipients list (To, BCC, or CC) having a bad address. Mail won't tell me which recipient is incorrect, though. I'm trying to send out an email to a mailing list that includes a number of recipients, and it's a pain trying to determine which address is incorrect. Any way to force Mail to send the message regardless? Or maybe to find out which address it's choking on?

    That doesn't help me much- I've already divided the mailing list into 9 different groups. I'm trying to minimize the amount of email going out to the recipients.
    I ended up just using my ISP's web email client to send the message to each group, and then removed the addresses for the recipients that bounced.
    I could have sworn that Mail had the same behavior in a previous version (letting me send to "bad" addresses). It would be nice to either have that behavior back, or at least have Mail tell me addesses it's choking on instead of telling me that a server isn't working...

  • HT204150 "bad address syntax"..??

    I have one contact that for some reason, no matter how often I edit the contact info to reflect a proper email, once I try and use the address, the email bounces back with the following:
         Your message cannot be delivered to the following recipients:
         Recipient address: @
         Reason: bad address syntax
    For whatever reason, it believes I'm only sending it to '@' and it never reads the actual email address that I've entered for this contact.  It may not even be part of the Contacts, but just an auto-fill function..
    Anyone have any ideas on how to delete this '@' address association with my specific contact?
    Thanks
    Alain

    Check mailaccess.log and system.log while trying to send via SquirrelMail.

  • How can I purge a bad address from iPad Mail?

    I have entered a bad address for my husband, thinking it was his correct e-mail address. I finally figured out it was wrong(there was an extra letter in it) and I changed it in contacts to correct it(Mobile Me corrected it on all my devices).
    Now when I type in his name to send him an e-mail, iPad keeps wanting to send it to the old incorrect address, instead of the corrected address shown in contacts. Please tell me how I can purge the incorrect address from the mail program.

    The more times that you use the correct email address, the sooner the correct address should come up as the first option in the list. Still can't delete it, but eventually the correct address should pop up as the first option over the incorrect address.

  • Suddenly Bounced emails - Is there something changed or bugged with the HPePrint services?

    Hello,
    We are using HPePrint with several printers on different locations for over a year now, without any real problems.
    But since yesterday, we get bounced email our of the blue. Nothing changed on our end, same email adresses used, but now our people all get the following error (except for the Received-From-MTA, which is different for most people from different offices):
      ----- Transcript of session follows -----
    ... while talking to email.hpeprint.com.:
    DATA
    <<< 550 5.7.1 Command rejected
    554 5.0.0 Service unavailable
    Reporting-MTA: dns; f-serve.identitycompany.net
    Received-From-MTA: DNS; idc-vls.xs4all.nl
    Arrival-Date: Sun, 11 Dec 2011 15:20:56 +0100 (CET)
    Final-Recipient: RFC822; *****@hpeprint.com
    Action: failed
    Status: 5.7.1
    Remote-MTA: DNS; email.hpeprint.com
    Diagnostic-Code: SMTP; 550 5.7.1 Command rejected
    Last-Attempt-Date: Sun, 11 Dec 2011 15:21:02 +0100 (CET)
    What gives? Is the service REALLY unavaible for 2 days now, which I can't imagine from a large company as HP with it's prime marketing service ePrint.
    We checked Spam/Blacklists to be sure that our Mailservers and office IPs aren't listed suddenly, and they are all not listed anywhere, so this can't be the problem.
    Please explain what suddenly changed, and we missed somehow, or what we should change/update on our ends to get this working again, as it did up to a few days ago.

    For those who are experiencing ongoing issues with their web services, you can attempt to try the following steps that may help resolve your problems.
    1.)    Completely shut down your printer and restart it
    2.)    If you have prints that have not printed, log into ePrint Center (or create an account if you do not have one) and then look for your printer status. If printer status is green but you still have pending jobs, delete the pending jobs one at a time (Starting with the oldest first). There may be a print job stuck in the queue that further restricts other jobs from completing.
    If option 1 or 2 above still doesn’t work, removing web services and re-adding web services will cause the printer to reattach to the cloud.
    Please note that if you attempt option 3, you will get a new eprint email address (and lose your custom one with no ability to get it back) furthermore, you will need to re-add your printer back to your ePC account.
    I am an HP employee

  • Duplicate emails sent to 2 addresses on BB

    I have 2 email addresses set up on my BB.  One is from my internet provider - charter.net.  The other is my business email address and has always been set up as an alias on  my business web site host, which is automatically forwarded to my charter.net address.  This arrangement has always worked just fine for the last 8 years on my home computer.  Now on my BB, all emails, whether they are addressed to my charter.net address or my business address, are addressed and sent to both email accounts set up on my BB.  That is to say if an email originally gets sent to my charter address, it shows up on my BB in both my charter account (addressed to my charter address) and to my business account (addressed to my business email address).  Conversely, the same happens to emails originally sent to my business address. 
    Neither of my addresses are set up on enterprise servers or with BB addresses, which are the only topics I have found any reference to in searching for a solution.
    I have talked to tech support on the phone and at my local Verizon office and they have said it is a Charter problem.  Naturally, Charter says the complete opposite.  I am inclined to believe that this is a Verizon problem since my email arrangement has and continues to work  just fine on my main computer for many years. 
    Any suggestions for solutions??

    wisabcon wrote:
    If you sent me one single email to one of my 2 addresses, it would show up twice in my "main" messages folder AND once each in BOTH folders for each specific email account, regardless of which email address you sent the single email to.  The way it should work is that if you sent me one single email to one single address it should show up ONCE in my "main" messages folder and ONCE in the folder for the email address you sent it to, but it should not show up in the email address folder you didn't send it to.  
    But if you have your work email also forwarded to the Charter address, you should expect it to show up in both your work email folder AND your charter account folder?
    Seems correct to me, unless I am still not understanding your email setup.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Sending emails automatically

    does anybody know how to send emails automatically if it meets the requirement, for example, will send emails automatically if an account balance is less than $100? are there any codes to guide me?

    Here's some code, just pass in the to, from, subject, and body in the constructor... You'll have to tweak the mail server ip's, etc... You need mail.jar, which is available somewhere on java.sun.com.
    I just use it to send email from my appserver, and I'm not using all the capabilities.. You can send attachments, multi-part mime, etc.. This class can easily be modified to do spamming, mailbombs, or newslists.
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class Mailer{
        public Mailer(String to, String fr, String subj, String mess1) {
            System.out.println("class Mailer sending a msg..");
             String from = null;
             String toUser=null;
             String host = "mail.yourdomain.net";  //MAIL SERVER HOSTNAME
             boolean debug = false;
             String msgText1 = "";
             String subject = "";
            try{
                toUser = to.trim();
            }catch(Exception e){to = "[email protected]";}
             try {
                 msgText1 = mess1.trim();
             }catch(Exception e){}
             try {
                 from=fr;
             }catch(Exception ex){}
             // create some properties and get the default Session
             Properties props = System.getProperties();
             props.put("mail.smtp.host", host);                   //to be honest, i have no idea
             props.put("mail.user","[email protected]");//what these 2 lines are for..
             Session session = Session.getDefaultInstance(props, null);
             session.setDebug(debug);
             try {
                 // create a message
                 MimeMessage msg = new MimeMessage(session);
                 msg.setFrom(new InternetAddress(from));
                    InternetAddress[] address={new InternetAddress(toUser)};
                    try {
                        address[0].setPersonal(null);
                    }catch(Exception ex){System.out.println("couldn't null out personal info in address[0]");}
                 msg.setRecipients(Message.RecipientType.TO, address);
                 msg.setSubject(props.getProperty("user.dir"));
                 // create and fill the first message part
                 MimeBodyPart mbp1 = new MimeBodyPart();
                 //mbp1.setText(msgText1);
                 // create the Multipart and its parts to it
                 Multipart mp = new MimeMultipart();
                 // add the Multipart to the message
                 msg.setContent(mp);
                 // set the Date: header
                 msg.setSentDate(new Date());
                 msg.setText(msgText1);
                try {
                    subject=subj.trim();
                    msg.setSubject(subject);
                 }catch(Exception ex){System.out.println("no subj..");}
                 // send the message
                 Transport.send(msg);
             } catch (MessagingException mex) {
                 System.out.println("error in DPWMailer: "+mex);
                 mex.printStackTrace();
                 Exception ex = null;
                 if ((ex = mex.getNextException()) != null) {
                  ex.printStackTrace();
              //{{INIT_CONTROLS
         //{{DECLARE_CONTROLS
    }

  • Bounced email causes mail app to close

    After reading many many posts across the internet, I finally figured that a bounced email message (which may show up in your inbox as "mail delivery error" or something similar) was crashing my mail app.
    The symptoms? I would open my mail app, it would try to retrieve mail and then close about 3 seconds later.
    The fix? I had to log into my POP mail account via the web, delete the email with the delivery error and then on my iPhone, delete/add back my mail account. If you don't delete the message on the server first, you just end up back in the same boat the next time you retrieve messages from the server.
    The fix is simple enough but how can the folks at Apple expect us to do this every time we get a bounced email? We really need a fix ASAP unless there is one on the way?

    I seriously doubt Apple expects us to do this everytime there is a bounced email.
    For me, a bounced email is few and far between - only when the recipient's incoming mail server allocation has been exceeded and not accepting any new messages, or the incoming mail server incorrectly detects my email address or a message as being spam, which is even more few and far between. Regardless, a bounced message - a return error message from the recipient's incoming mail server did not crash the iPhone's Mail client, but this is with an IMAP account. Since these are so few and far between, I don't recall the last time I recieved one.
    Not sure what the fix is or if a fix for POP accounts is on the way but in the interim if you are getting many bounced messages, you may want to look into why.

  • Can I forward my text messages from my iphone to my email automatically?

    can I forward my text messages from my iphone to my email automatically?

    If you mean the settings for iMessages where you can specifiy an email address other people with iMessage can reach you at, that has nothing to do with email. The iMessage still goes to the Messages app and there is no way to autoforward from that app.

  • Email to  list of addresses from a file

    Does anyone know if it is possible to create an Automation that will send the same email to every email address listed in a text file?
    I am working on a local community event and have several people registered. Periodically I need to email out a short sentence or two to each person on this list. In the past, I have simply copied the addresses in my file and pasted them into the Bcc line with my own address in the To line. As Spam filters get better, this type of address scheme is often rejected.
    It would be better to send a separate email to each person by picking the email address from a file, line at a time, and sending the canned message.
    It was not obvious to me how to approach this with Automator.
    Perhaps Automater is not the correct choice - maybe I need to use a shell script or Perl and interact directly with sendmail?
    Thanks

    If you're using Mail, you can just send everyone the email by putting their address in the BCC header; you should be able to leave the To header blank. Spam filters are almost alway examing the origin and the subject of the email, and some even examine the body.
    So, unless one of those fields is questionable according to the spam filters, your mail should pass through uninterrupted, since filters have no way of knowing whether you sent an email via BCC; they see only the address to where a single email is being delivered.
    More likely is that one or more of your recipients hasn't marked your email address as "okay" or put it on a whitelist, so it may get put into a junk or spam folder on their system.
    Hope this helps,
    Mulder
    If this answered you question, please consider awarding some points. Why Reward Points?
    iMac G4 700Mhz   Mac OS X (10.3.9)  

Maybe you are looking for

  • Doubt in the value return by the function based on given condition

    Hi, Below function should return the value based on the value of in_row_number_high variable. I have used CASE but it does't return proper value. How could I give that condition? Please help. FUNCTION gen_total_lane_count_pct     in_lane_id          

  • Home movie dvds into Mac Friendly format?

    I have some dvds of old home movies and want to work with them on my mac. I can make video clips with the dvd player but can't move any of those clips either to idvd or imovie. I don't think the formats are compatible -dvd says it's .bup, .ifo, .vob.

  • Data Blocks - Different data source for Query  and DML

    Would anyone please tell me if it is possible in a BLOCK to define a stored procedure for queriying and a table for DML operations or vice-versa at the SAME time. If possible how do you do it using DATA BLOCK WIZARD? If you select your block to be ba

  • Selection criteria in SQL Loader

    Hi All, I have a Data file which has around 7000 lines, I am using SQL Loader to insert those records into my interface tables, but i have a selection criteria like i need to pick those records whose number starts with 'P'. Can I use the LIKE operato

  • Autogen'ning an xorg.conf file?

    If you start X without a config, it configures itself automatically.  Is there a way I can snag the settings it decided to use and make a config (that I can tweak a bit?)