Donate

You can make a donation if you'd like to support my work:


Contact

I deactivated the rating mechanism for now due to excessive spamming; while I got some interesting comments when I started it the current ratio is several hundred spam comments for one useful comment. If you have anything to say, please write an email to bwachter-hp@lart.info

aardmail-pop3c

(the main aardmail site)

General

aardmail-pop3c is a simple client to retrieve mail via pop3. If compiled with SSL-support it's possible to use TLS-encrypted connections, with or without starttls. It can either deliver into a Maildir (default) or to an external program using a pipe (like procmail). It should be able to replace fetchmail if you just want to get mails from a pop3-server.

Usage

Some of the parameters listed below only work when using SSL

-b program
Execute the program and only poll mails if it exits with zero exit status. That's useful if you poll mail on your notebook via cron but only want to get mail in special environments. You can specify parameters, but since the string gets parsed in the client you need to quote the spaces.
-c option
General option to control cryptography settings. Valid options are 0 for no encryption, 1 for TLS with exit on error (like -t), 2 for TLS with fallback to no encryption on error, 3 for TLS using starttls and exit on error (like -l) and 4 for TLS using starttls with fallback to no encryption on error.
-d
Don't delete the mails after retrieval. The default is to delete successfully retrieved mails.
-h hostname
The hostname to connect to. This can be either a name resolvable via DNS or a numeric IP
-l
Use TLS with starttls and exit if an error occurs (like -c 3)
-m maildir
Use maildir for spooling. Unless the -x parameter is used the default is to spool into ~/Maildir
-n number
Only download number mails
-p password
Authentify using the given password. Don't use this option, use a .authinfo file instead
-r number
Send a QUIT and reconnect after number mails. That's useful when you try to get many mails over a bad connection -- the server stores the delete requests till the client issues a QUIT. If the connection dies mail won't get deleted.
-s service
The service to connect to. This can be either a string which is resolvable via /etc/services or a numeric portnumber. The default is 110.
-t
Use TLS and exit on error. Same like -c 1.
-u username
Specify the username to use. When setting up .authinfo properly you usually only need this option if you want to poll mail for different users from the same server.
-v level
Set the verbosity. Valid values are 0 (no logging), 1 (deadly), 2 (error), 3 (warning) and 4 (info). The default is 2. It does not matter if you specify levels bigger than 4.
-x program
Specifies a program which will get the retrieved mails using a pipe. A new pipe will be opened for every mail, procmail is known to work fine.

FAQ

Why do you say that I should not use -p?

When specifying the password on the command line other users on a multiuser system might be able to see it in the process list. So, you're safe using -p on a singleuser system, but never use it on a multiuser system. I recommend always using a .authinfo file.

For what is -r (reconnect after some mails useful?

The pop3-server remembers delete-requests until the client issues a QUIT. If the connection dies the server will `forget' about those delete requests, resulting in downloading the mails again on the next try. If you're trying to download many mails over a bad connection you'll love this option.