이메일 설정 · 4 min read · Dec 31, 2025
원격 서버에서 getmail로 이메일 가져오기 (Debian Etch) - 페이지 3
6 샘플 구성 파일
이것이 최종적으로 내 ~/.getmail/getmailrc 파일의 모습입니다:
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 추가 구성 예제
http://pyropus.ca/software/getmail/configuration.html에서 추가 구성 예제를 찾을 수 있으며, http://pyropus.ca/software/getmail에서 다운로드할 수 있는 getmail.tar.gz 파일에 포함된 getmailrc-examples 파일에서도 찾을 수 있습니다. 해당 파일의 내용은 다음과 같습니다:
#
#
[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”)
또한 getmail 매뉴얼 페이지를 확인하십시오:
man getmail getmail에 전달할 수 있는 사용 가능한 명령줄 매개변수에 대해 더 알아보세요.
8 링크
- Getmail: http://pyropus.ca/software/getmail
- SpamAssassin: http://spamassassin.apache.org
- ClamAV: http://www.clamav.net
- Debian: http://www.debian.org
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.