Version 0.8.0 - UNRELEASED * Fixed date header parsing to be precise with timezone information. Also, when writing From_ line timestamps, don't use UTC but local time, without timezone information. * To determine the delivery date of a message, archivemail now looks for the timestamp of the latest 'Received' header before resorting to 'Resent-Date' or 'Date'. This should give much better results when there is no 'Delivery-date' header, which is still checked first. (Thanks Andrew Ferrier & Christian Brabandt) Closes: #1481316, #1764855, Debian bug #272666. * If present, the 'Resent-date' header now takes precedence over 'Date'. * IMAP: recognize when a server advertises LOGINDISABLED. * New option --debug-imap; this just sets imaplib.Debug, thereby dumping archivemail's chat with the server to stdout. * Fixed crash with Python 2.5 when archiving an empty maildir. (Thanks "Aidant") Closes: #1878940. * New option --all to archive all messages in a mailbox. Closes: #1764846. * Fixed a crash when archiving maildirs with --days=0. (Thanks John Goerzen) * IMAP: automatically add NAMESPACE prefix to a mailbox path if necessary. * Removed the feature to setuid to the mailbox owners when run as root. This was a bad idea; it's really hard to do safely, if at all possible. Obsoletes: patch #2783134. * Replaced some simple minded file operation security checks with more decent ones. This means we can safely operate in /tmp, for example. The price is that we no longer accept symlinked files. Obsoletes: patch #1874868. * Don't use rename() to update mbox files and the archive, but write the files directly. This is more fragile, but required for correct mbox locking, and also for mboxes in mail spool directories where we don't have permission to create files. It also means that if selinux is enabled, archivemail now preserves the selinux security context of an mbox. Closes: #2210732. * Fixed the test suite to deal with nanosecond file timestamps. These are provided by ext4 and XFS, for example. Closes: #2043900. * Cleaned up the test suite, replacing a lot of duplicated code and avoiding a lot of redundand testing. This speeds up the test suite by a factor of 15 or so. * mbox locking got completely rewritten. Switched from flock to lockf locking, which is NFS-safe and portable, and we now lock with lockf first, then with a dotlock, instead of the other way around. (This is makes archivemail compatible with Debian systems. ;) * We now omit the dotlock if we don't have sufficient permissions to create it in the mbox directory. (The file is still locked with lockf.) Since we also no longer use rename() to commit changes to an mbox, (see above) this means archivemail can now operate on mbox files in the system mail spool. Closes: #855269. * Refactoring of the mbox classes; much of the code got rewritten. * The archive now also gets locked while archivemail updates it. * Various Python language fixes (for example don't use "0" and "1" as boolean constants). * Added a lot of test cases for maildir archiving to the test suite. Maildir testing should now be roughly on par with mbox testing. * IMAP servers (Dovecot and UW-IMAP at least) may store mailbox meta data for mboxes in a pseudo message. Such messages are now detected and never archived. Obsoletes: patch #2210707. (Thanks, "tlhackque") * New option --prefix, or short -p, to specify an archive name prefix. Like a suffix specified with the --suffix option, the prefix is expanded with strftime(). Specifying this option disables the default archive name suffix. Obsoletes: feature request #604281. (Thanks Serafeim Zanikolas for an initial patch) * When archiving a mailbox with a leading dot in the name and with no archive name prefix specified, archivemail no longer creates hidden archives, but strips the dot off the archive name. In particular, this makes working with Maildir++ subfolders more convenient. Closes: feature request #604281. * New option --archive-name, or short -a, to hard-code an archive filename. Like the --suffix and --prefix options, it is expanded with strftime(). This option conflicts with archiving multiple mailboxes. Closes: feature request #1306538. Version 0.7.2 - 9 November 2007 * IMAP: fixed crash by working around python bug #1277098, which is still pending in python << 2.5. Version 0.7.1 - 7 November 2007 * Fixed incompatibility with Python 2.5 which broke Maildir handling. Closes: #1670422 * Username and password in IMAP URLs can now be double-quoted, so it should be no longer a problem if they contain delimiters like the '@' character. Closes: #1640878 * Invalid messages/files in Maildirs caused archivemail to silently stop processing mails and claim it's all done. Now skip these and go ahead. (Thanks Elan Ruusamäe for tracking this down.) Closes: #1783369. (The Debian package has a different fix for this problem since 0.6.1-4, closing Debian bugs #255944 and #305902.) * Fixed IMAP message flag conversion which was completely broken. (Thanks Christian Brabandt) Closes: Debian bug #434807 * New option --copy: archive mail, but don't delete it from the mailbox. This is mainly useful for testing purposes, and complements --delete. Closes: #981865, #988803, #1764851, Debian bug #434798 * If running as root, only switch the effective uid and gid back if we have actually switched them before. Closes: #1762907 * The automatic seteuid feature of archivemail is insecure and thus deprecated; it will be removed from later versions. * Expand tilde in argument of long option --pwfile. (Thanks Christian Brabandt) Closes: Debian bug #434813 * archivemail now accepts --days=0 * Fixed crash if --warn-duplicate is used with IMAP (Thanks Christian Brabandt) Closes: Debian bug #434786 (the Debian package already has a fix) * When converting from other formats to mbox, archivemail used to preserve existing 'Status' and 'X-Status' mbox headers; these are now silently overwritten to ensure they have correct values. * IMAP: if selecting the mailbox fails, archivemail detects the server's mailbox hierarchy delimiter, replaces slashes in the mailbox name with the delimiter and tries again. Closes: #1826757, Debian bug #368112 Version 0.7.0 - 2 November 2006 * Fixed long options --filter-append and --pwfile to accept their arguments. Closes: #1555935 * Fixed From_ line generation to actually look for the 'Return-path' and 'From' headers. Closes: #1555797 * Fixed IMAP authentication/URL parsing, which wasn't working at all in v0.6.2. Require username encoded in URL, but be flexible with the password: handle both --pwfile and URL-encoded password, and fallback to querying the user if neither is present. Closes: #1555951 * Convert on-the-wire CRLF to native EOL when saving messages from an IMAP folder. Closes: #1555803 * Updated man page. This also addresses #1555951 * Fixed unittest failure by updating --suffix testcase. Based on analysis by Peter Poeml. Thanks, Peter. * Fixed invalid IM
#!/bin/sh

MSG() {
cat << EOF

# Fetchsetup is a shell script for creating a .fetchmailrc file, that will be
# used by the program "fetchmail" to connect to your mail domain and retrieve
# your mail.
# This script is linux specific, so it may not work on another system.
# Kent Robotti <krobot@erols.com> (3-31-99)

EOF
}

if [ "$(id -ur)" != "0" ]; then
    echo >&2 "$0: You need to be root [found $(id -un)] to run this script."
    echo >&2 "You could login as root"
    echo >&2 "You could also try one of these: # sudo fetchsetup"
    echo >&2 "                                 # su root -c fetchsetup"
    exit 1
fi

MSG
echo -n "Continue? (Y/n) : "
read ans
if [ "$ans" = "n" -o "$ans" = "N" ]; then
    echo "Cancelled."
    exit 0
fi

stty erase "^?" 2>/dev/null

echo
echo "Remote mail site?: pop.boo.com   <Your service providers mail domain