Retrieve mail from user called user01 of smtp.some.server.ie server:
root:~> cat .fetchmailrc
poll "smtp.some.server.ie" proto IMAP user "user01" password "password" is user01 keep sslproto ''
mda '/usr/bin/procmail -d %T'
set logfile /home/user01/fetchmail.log
To save an attachment from an e- mail use procmail
andUUDeview
is a program that helps you transmit and receive binary files over the Internet, using electronic mail or newsgroups The UUDeview package includes both an encoder and a decoder. The decoder automatically detects the type of encoding used, offering MIME’s Base64 and BinHex as well as the popular uuencoding and the less frequently used xxencoding methods.
root:~> cat .procmailrc
:0
*^content-Type:
{
:0c:
/var/spool/mail/user01
# Now the actual unpacking part
# forward to uudeview and unpack
:0fw
| uudeview -i +a +o -p /share/Shared/attachment/ -
}
root:~>
And then run fetchmail command 😉