[Dovecot] script to extract From: addresses
Hello,
For my manager I need to write a script to extract the From: e-mail addresses from his e-mail account. Then they are sent invitations to join our mailing list(s).
I inherited this Dovecot server, I have not done anything with Dovecot before.
Could you give me some direction on if/how can this be done?
We run Dovecot 1.0.1 (dovecot --version)
Thank you, Iv
On Sun, 25 Jul 2010 12:35:46 +0200 Iv Ray pobox@verysmall.org articulated:
For my manager I need to write a script to extract the From: e-mail addresses from his e-mail account. Then they are sent invitations to join our mailing list(s).
I inherited this Dovecot server, I have not done anything with Dovecot before.
Could you give me some direction on if/how can this be done?
We run Dovecot 1.0.1 (dovecot --version)
Thank you, Iv
For starters, you should update your version of Dovecot; it is deprecated. Second, are you looking for a Perl script, I would assume so, or something else?
-- Jerry ✌ Dovecot.user@seibercom.net
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
A foolish consistency is the hobgoblin of little minds.
Ralph Waldo Emerson
On 25.07.2010, at 13:03, Jerry wrote:
On Sun, 25 Jul 2010 12:35:46 +0200 Iv Ray pobox@verysmall.org articulated:
For my manager I need to write a script to extract the From: e-mail addresses from his e-mail account. Then they are sent invitations to join our mailing list(s).
I inherited this Dovecot server, I have not done anything with Dovecot before.
Could you give me some direction on if/how can this be done?
We run Dovecot 1.0.1 (dovecot --version)
Thank you, Iv
For starters, you should update your version of Dovecot; it is deprecated.
Yes, I'll have to do this, as well.
Is it straightforward or shall I prepare myself for hard work?
Second, are you looking for a Perl script, I would assume so, or something else?
I do not expect to find a ready script. I am rather looking for some hints on how to script the operation.
Iv
On 25.07.2010, at 18:07, Iv Ray wrote:
On 25.07.2010, at 13:03, Jerry wrote:
On Sun, 25 Jul 2010 12:35:46 +0200 Iv Ray pobox@verysmall.org articulated:
For my manager I need to write a script to extract the From: e-mail addresses from his e-mail account. Then they are sent invitations to join our mailing list(s).
I inherited this Dovecot server, I have not done anything with Dovecot before.
Could you give me some direction on if/how can this be done?
We run Dovecot 1.0.1 (dovecot --version)
Thank you, Iv
For starters, you should update your version of Dovecot; it is deprecated.
Yes, I'll have to do this, as well.
Is it straightforward or shall I prepare myself for hard work?
Second, are you looking for a Perl script, I would assume so, or something else?
I do not expect to find a ready script. I am rather looking for some hints on how to script the operation.
Iv
Thank you all for your help and tips!
Eventually I ended up writing a small php script using the PHP IMAP functions, which are quite good for extracting overview information. An 11 GB e-mail account was screened in about 15 minutes over the internet.
Iv
On 25/07/2010 12:35, Iv Ray wrote:
Hello,
For my manager I need to write a script to extract the From: e-mail addresses from his e-mail account. Then they are sent invitations to join our mailing list(s).
I inherited this Dovecot server, I have not done anything with Dovecot before.
Could you give me some direction on if/how can this be done?
We run Dovecot 1.0.1 (dovecot --version)
Thank you, Iv
In maildir i did something like: foreach (files in maildir) as $i do sed -n "s/^From.*<\(.*\)>$/\1/p" $i >> $outfile done
-- Simone Caruso IT Consultant p.iva: 03045250838
Hi,
For my manager I need to write a script to extract the From: e-mail addresses from his e-mail account.
Use reformail with "-x":
http://www.courier-mta.org/reformail.html
Extracting headers
The -x and -X options extract the indicated headers from the message, and print them to standard output. Multiple -x and -X options can be specified at the same time, and may be intermixed.
The -x option extracts and prints the contents of the header. The -X option prints the name of the header as well.
participants (4)
-
Anton Dollmaier
-
Iv Ray
-
Jerry
-
Simone Caruso