[go: up one dir, main page]

File: lbdb-fetchaddr.man.in

package info (click to toggle)
lbdb 0.38
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 744 kB
  • sloc: sh: 3,588; ansic: 1,578; lisp: 265; perl: 258; makefile: 203; objc: 50
file content (122 lines) | stat: -rw-r--r-- 3,598 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.\" -*- nroff -*-
.\" Copyright (c) 1998-2005  Roland Rosenfeld <roland@spinnaker.de>
.\"               
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" 
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\" 
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
.\"
.TH LBDB-FETCHADDR 1 "October 2005" "Unix" "User Manuals"
.SH NAME
lbdb-fetchaddr \- grab addresses from mails add append them to lbdb database
.SH SYNOPSIS
.B lbdb-fetchaddr
.RB [ -d 
.IR dateformat ]
.RB [ -x
.IR headerfieldlist ]
.RB [ -c
.IR charset ]
.RB [ -a ]
.br
.B lbdb-fetchaddr
.RB [ -v | -h ]
.SH DESCRIPTION
.B lbdb-fetchaddr
is a shell script which reads a mail on stdin. It extracts the
contents of some header fields (default:
.RB ` From: ', 
.RB ` To: ', 
.RB ` Cc: ', 
.RB ` Resent-From: ', 
and
.RB ` Resent-To: ')
from the mail header (only addresses with a real name) and appends
them to 
.IR $HOME/.lbdb/m_inmail.list .
For performance issues 
.B lbdb-fetchaddr
appends new addresses to this file without removing duplicates. To get
rid of duplicates, the program
.B lbdb-munge
exists, which is run by
.B m_inmail
if needed and removes duplicates.
.PP
To use this program, put the following lines into your 
.I $HOME/.procmailrc:
.nf  
     :0hc
     | lbdb-fetchaddr
.fi 
.PP
.B lbdb-fetchaddr
writes the actual date to the third column of the database by using
.BR strftime (3).
It uses "%Y-%m-%d %H:%M" as the default date format (e.g. "1999-04-29
14:33"). You can change this by using the 
.B -d
option to select a different date format string as parameter of
lbdb-fetchaddr command like
.nf  
     :0hc
     | lbdb-fetchaddr \-d "%y-%m-%d"
.fi
which results in e.g. "99-04-29".
.SH OPTIONS
.TP
.B -v
Print version number of lbdb-fetchaddr.
.TP
.B -h
Print short help of lbdb-fetchaddr.
.TP
.BI -d " dateformat"
Use the given date format using 
.BR strftime (3)
syntax.
.TP
.BI -x " headerfields"
A colon separated list of header fields, which should be searched for
mail addresses.  If this option isn't given, we fall back to
.RB ` from:to:cc:resent-from:resent-to '.
.TP
.BI -c " charset"
The charset which will be used to write the database. This should be
the charset which the application expects (normally the one from your
current locale).  If this option isn't given, we fall back to
.RB ` iso-8859-15 '.
.TP
.B -a
Also grab addresses without a real name.  Use the local part of the
mail address as real name.
.SH FILES
.I $HOME/.lbdb/m_inmail.list
.br
.I @libdir@/fetchaddr
.br
.I @libdir@/m_inmail
.SH "SEE ALSO"
.BR lbdbq (1),
.BR @dotlock@ (1),
.BR procmail (1),
.BR procmailrc (5),
.BR strftime (3).
.SH CREDITS
Most of the really interesting code of this program (namely, the RFC
822 address parser used by lbdb-fetchaddr) was stolen from Michael
Elkins' mutt mail user agent. Additional credits go to Brandon Long
for putting the query functionality into mutt.
.SH AUTHOR
The lbdb package was written by Thomas Roessler <roessler@guug.de> and
is now maintained and extended by Roland Rosenfeld
<roland@spinnaker.de>.