Configuración de Correo · 5 min read · Dec 31, 2025
Recuperando correos electrónicos de servidores remotos con getmail (Debian Etch) - Página 3
6 Un archivo de configuración de ejemplo
Así es como se ve mi archivo ~/.getmail/getmailrc al final:
vi ~/.getmail/getmailrc| [retriever] type = SimplePOP3Retriever server = pop.someprovider.tld username = [email protected] password = secret [destination] type = Maildir path = ~/Maildir/ [options] verbose = 1 read_all = false delete = true message_log_syslog = true [filter-1] type = Filter_classifier path = /usr/bin/clamdscan arguments = ("--stdout", "--no-summary", "-") exitcodes_keep = (1, ) [filter-2] type = Filter_external path = /usr/bin/spamc arguments = ("-s 250000", ) |
7 Ejemplos de configuración adicionales
Puedes encontrar más ejemplos de configuración en http://pyropus.ca/software/getmail/configuration.html y en el archivo getmailrc-examples que viene con el archivo getmail.tar.gz que puedes descargar de http://pyropus.ca/software/getmail. Aquí está el contenido de ese archivo:
#
#
[retriever]
type = SimplePOP3Retriever
server = pop.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = Maildir
path = ~jeffp/Maildir/
#
[options]
verbose = 0
delete = true
message_log = ~/.getmail/log
[retriever]
type = SimplePOP3Retriever
server = pop.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = Maildir
path = ~jeffp/Maildir/
#
[retriever]
type = SimpleIMAPRetriever
server = mail.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = Maildir
path = ~jeffp/Maildir/
#
[retriever]
type = SimpleIMAPRetriever
server = mail.example.net
username = jeff.plotzky
password = mailpassword
mailboxes = (“INBOX”, “INBOX.spam”, “mailing-lists.getmail-users”)
[destination]
type = Maildir
path = ~jeffp/Maildir/
#
[options]
delete = true
[retriever]
type = SimpleIMAPRetriever
server = mail.example.net
username = jeff.plotzky
password = mailpassword
move_on_delete = sent-mail
[destination]
type = Maildir
path = ~jeffp/Maildir/
#
[retriever]
type = SimplePOP3Retriever
server = pop.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = Mboxrd
path = ~jeffp/Mail/inbox
user = jeffp
#
[retriever]
type = SimplePOP3Retriever
server = pop.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = MDA_external
path = /usr/local/bin/my-mda
arguments = (“–message-from-stdin”, “–scan-message”, “–to-maildir”,
“~jeffp/Maildir/“)
#
[retriever]
type = MultidropPOP3SSLRetriever
server = pop.example.net
username = companylogin
password = mailpassword
envelope_recipient = delivered-to:1
[destination]
type = MultiSorter
default = [postmaster]
locals = (
(“ [email protected] “, “[jeff]”),
(“ [email protected] “, “[martin]”),
(r”sam\D*@company.example.net”, “[sam]”),
(“ [email protected] “, “[christina-procmail]”)
)
[postmaster]
type = Maildir
path = ~joe/Mail/postmaster/
user = joe
[jeff]
type = Maildir
path = ~jeffp/Maildir/
user = jeffp
[martin]
type = Maildir
path = ~martinh/Maildir/
user = martinh
[sam]
type = Mboxrd
path = ~sam/Mail/inbox
user = sam
[christina-procmail]
type = MDA_external
path = /usr/local/bin/procmail
arguments = (“-f”, “%(sender)”, “-m”, “/home/christina/.procmailrc”)
user = christina
#
[retriever]
type = SimpleIMAPRetriever
server = mail.example.net
username = jeff.plotzky
password = mailpassword
[filter-1]
type = Filter_external
path = /usr/local/bin/spamc
[filter-2]
type = Filter_classifier
path = /usr/local/bin/clamscan
arguments = (“–stdout”, “–no-summary”,
“–mbox”, “–infected”, “-“)
exitcodes_drop = (1,)
[destination]
type = Maildir
path = ~jeffp/Maildir/
#
[retriever]
type = SimpleIMAPRetriever
server = mail.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = MultiDestination
destinations = (
“~jeff/Maildir/“,
“/var/log/mail-archive/current”,
)
#
[retriever]
type = SimplePOP3Retriever
server = pop.example.net
username = jeff.plotzky
password = mailpassword
[destination]
type = MultiGuesser
default = [my-mda]
locals = (
(“ [email protected] “, “~/Mail/lists/list1/“),
(“ [email protected] “, “~/Mail/lists/list2/“),
(“ [email protected] “, “~/Mail/other/“),
)
[my-mda]
type = MDA_external
path = /path/to/my-mda
arguments = (“-f”, “%(sender)”, “${HOME}/.mymdarc”)
También echa un vistazo a la página del manual de getmail:
man getmail para aprender más sobre los parámetros de línea de comandos disponibles que puedes pasar a getmail.
8 Enlaces
- Getmail: http://pyropus.ca/software/getmail
- SpamAssassin: http://spamassassin.apache.org
- ClamAV: http://www.clamav.net
- Debian: http://www.debian.org
Recibe nuevas publicaciones en tu bandeja de entrada.
No spam. Cancela la suscripción en cualquier momento.