I have been using a coming soon wordpress plugin (https://wordpress.org/extend/plugins/custom-coming-soon-page/) for a site I will be launching in the next few months. It allows users to sign up to be notified of the launch. It emails my account with their address as the from address and a fixed subject line. I now have a less than small number of emails that I need to convert to an emailing list. What would you suggest is the best way to do this? I have ssh access to my server, however I'm only on a shared host, so the shell is jailed. I also have horde email access with my hosting. Recently I migrated my email system to Google Docs. So pushing the emails to a gmail account is also an option.

2 Answers 2


I hope this helps you:

grep '^From: ' huge-mail-archive | egrep -o '\@/:[:space:]]+>@[a-zA-Z_.]+?.[a-zA-Z]{2,3}' | sort | uniq > email.addresses

  • 1
    Woow.. Dude, what are you smoking? I want to try that! Feb 16, 2011 at 11:42
  • give it a go :)
    – pablo
    Feb 16, 2011 at 11:48
  • that looks pretty neat! Thanks. I may have to tweak it. Where would i place the subject line I want to filter by? Feb 16, 2011 at 11:57
  • ooh well thats a multiline grep and getting just specific subjects would require a much more complicated command or script. Unfortunately I do not have a box to test on with this scenario.
    – pablo
    Feb 16, 2011 at 12:03

If this is for a discussion or announcement list, you should consider setting up a mailing list server such as Mailman. There are a few reasons for this:

  • It allows people to subscribe/unsubscribe from the mailing list themselves
  • It won't reveal all the email addresses in the list to every recipient (which you can do manually by using the BCC field instead of To or CC)
  • It will send each message individually, avoiding the problem where many mailservers will drop your message because it has a lot of recipients
  • A decent one will ask each address to confirm they want to be added to the list, increasing the number of real live email addresses on the list, and not annoying people who's email address got in there by mistake.

Whatever list system you use, there will be a bulk subscribe function which allows you to shove in a bunch of email addresses.

If it is a really large list with commercial value, you might also look at a professional mailing list service like MailChimp. They are free for up to 2000 subscribers, so I'd consider looking at that option anyway.

  • Thanks for the info. This is for a one time email announcement. My hosting already has Mailman set up, but when I looked at it, I found it confusing, although that was a few years ago now. Cheers all the same. Feb 16, 2011 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.