Document new pop3d options
Showing
1 changed file
with
205 additions
and
14 deletions
1 | @c This is part of the GNU Mailutils manual. | 1 | @c This is part of the GNU Mailutils manual. |
2 | @c Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006 | 2 | @c Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007 |
3 | @c Free Software Foundation, Inc. | 3 | @c Free Software Foundation, Inc. |
4 | @c See file mailutils.texi for copying conditions. | 4 | @c See file mailutils.texi for copying conditions. |
5 | @comment ******************************************************************* | 5 | @comment ******************************************************************* |
... | @@ -3550,47 +3550,238 @@ mode is triggered by @option{-d} command line switch. | ... | @@ -3550,47 +3550,238 @@ mode is triggered by @option{-d} command line switch. |
3550 | The program uses following option groups: @xref{mailbox}, | 3550 | The program uses following option groups: @xref{mailbox}, |
3551 | @xref{daemon}, @xref{logging}, @xref{auth}. | 3551 | @xref{daemon}, @xref{logging}, @xref{auth}. |
3552 | 3552 | ||
3553 | @subheading Command line options | 3553 | @menu |
3554 | * Login delay:: | ||
3555 | * Auto-expire:: | ||
3556 | * Bulletins:: | ||
3557 | * Command line options:: | ||
3558 | @end menu | ||
3559 | |||
3560 | @node Login delay | ||
3561 | @subsection Login delay | ||
3562 | |||
3563 | POP3 clients often login frequently to check for new mail. Each new | ||
3564 | connection implies authenticating the user and opening his maildrop | ||
3565 | and can be very resource consuming. To reduce server load, it is | ||
3566 | possible to impose a minimum delay between any two consecutive logins. | ||
3567 | This is called @samp{LOGIN-DELAY} capability and is described in RFC | ||
3568 | 2449. | ||
3569 | |||
3570 | As of version @value{VERSION}, GNU Mailutils @command{pop3d} allows | ||
3571 | to set global login delay, i.e. such enforcement will affect all POP3 | ||
3572 | users. If a user attempts to log in before the specified login delay | ||
3573 | expires, he will get the following error message: | ||
3574 | |||
3575 | @smallexample | ||
3576 | -ERR [LOGIN-DELAY] Attempt to log in within the minimum login delay interval | ||
3577 | @end smallexample | ||
3578 | |||
3579 | The message will be issued after a valid password is entered. This prevents | ||
3580 | this feature from being used by malicious clients for account | ||
3581 | harvesting. | ||
3582 | |||
3583 | To enable the login delay capability, specify the minimum delay in | ||
3584 | seconds with @option{--login-delay} option, for example: | ||
3585 | |||
3586 | @smallexample | ||
3587 | $ pop3d --login-delay=60 | ||
3588 | @end smallexample | ||
3589 | |||
3590 | The @command{pop3d} utility keeps each user's last login time in a | ||
3591 | special DBM file, called @dfn{login statistics database}, so to be | ||
3592 | able to use this feature, Mailutils must be compiled with DBM support. | ||
3593 | By default, the login statistics database is called | ||
3594 | @file{/var/run/pop3-login.db}. You can change its name at run time | ||
3595 | using @option{--stat-file}: | ||
3596 | |||
3597 | @smallexample | ||
3598 | $ pop3d --login-delay=60 --stat-file=/tmp/pop.login | ||
3599 | @end smallexample | ||
3600 | |||
3601 | Notice, that there is no need to include the @samp{.db} suffix in the | ||
3602 | file name. | ||
3603 | |||
3604 | The login delay facility will be enabled only if @command{pop3d} is | ||
3605 | able to access the statistics database for both reading and | ||
3606 | writing. If it is not, it will report this using @command{syslog} and | ||
3607 | start up without login delay restrictions. The common error message | ||
3608 | looks like: | ||
3609 | |||
3610 | @smallexample | ||
3611 | Unable to open statistics db: Operation not permitted | ||
3612 | @end smallexample | ||
3613 | |||
3614 | You can check whether your @command{pop3d} uses login delays by | ||
3615 | connecting to it and issuing the @samp{CAPA} command. If login delays | ||
3616 | are in use, there response will contain the string @samp{LOGIN-DELAY | ||
3617 | @var{n}}, where @var{n} is the actual login delay value. | ||
3618 | |||
3619 | @node Auto-expire | ||
3620 | @subsection Auto-expire | ||
3621 | |||
3622 | Automatic expiration of messages allows you to limit the period of | ||
3623 | time users are permitted to keep their messages on the server. It is | ||
3624 | enabled by @option{--expire} command line option: | ||
3625 | |||
3626 | @smallexample | ||
3627 | $ pop3d --expire=@var{days} | ||
3628 | @end smallexample | ||
3629 | |||
3630 | @noindent | ||
3631 | Here, @var{days} specifies the minimum server retention period, in | ||
3632 | days, for retrieved messages on the server. | ||
3633 | |||
3634 | Current implementation works as follows. When a message is | ||
3635 | downloaded by @code{RETR} or @code{TOP} command, it is marked with | ||
3636 | @samp{X-Expire-Timestamp: @var{n}} header, where @var{n} is current | ||
3637 | value of UNIX timestamp. The exact expiration mechanism | ||
3638 | depends on you. Mailutils allows you two options: | ||
3639 | |||
3640 | @enumerate | ||
3641 | @item | ||
3642 | Expired messages are deleted by @command{pop3d} upon closing the | ||
3643 | mailbox. You specify this mechanism using @option{--delete-expired} | ||
3644 | command line option. | ||
3645 | |||
3646 | @item | ||
3647 | Expired messages remain in the mailbox after closing it. The system | ||
3648 | administrator is supposed to run a cron job that purges the mailboxes. | ||
3649 | Such a cron job can be easily implemented using @command{sieve} from | ||
3650 | GNU Mailutils and the following script: | ||
3651 | |||
3652 | @smallexample | ||
3653 | @group | ||
3654 | require "timestamp"; | ||
3655 | # @r{Replace "5" with the desired expiration period} | ||
3656 | if timestamp :before "X-Expire-Timestamp" "now - 5 days" | ||
3657 | @{ | ||
3658 | discard; | ||
3659 | @} | ||
3660 | @end group | ||
3661 | @end smallexample | ||
3662 | |||
3663 | This script will remove expired messages 5 days after the | ||
3664 | retrieval. Replace @samp{5} with the desired expiration period and | ||
3665 | make sure it equals the argument to @option{--expire} command. | ||
3666 | @end enumerate | ||
3667 | |||
3668 | The option @option{--expire=0} means the client is not permitted to | ||
3669 | leave mail on the server. It always implies @option{--delete-expired}. | ||
3670 | |||
3671 | @node Bulletins | ||
3672 | @subsection Bulletins | ||
3673 | |||
3674 | The bulletin feature allows you to send important announcements to | ||
3675 | all POP3 users without mailing them. It works by creating a | ||
3676 | @dfn{bulletin source mailbox} and sending the announcements to it. | ||
3677 | |||
3678 | After a user successfully authenticates, @command{pop3d} checks the | ||
3679 | last @dfn{bulletin number} the user receives. The bulletin number | ||
3680 | refers to the number of the bulletin message in the bulletin source | ||
3681 | mailbox. If the latter contains more messages, these are appended to | ||
3682 | the user mailbox. | ||
3683 | |||
3684 | The user last bulletin number can be kept in two places. First, it | ||
3685 | can be stored in file @file{.popbull} in his home directory. Secondly, | ||
3686 | if Mailutils is compiled with DBM support, the numbers can be kept in | ||
3687 | a DBM file, supplied via @option{--bulletin-db} command line option. If | ||
3688 | both the database and the @file{.popbull} file are present, the data | ||
3689 | from the database take precedence. | ||
3690 | |||
3691 | To enable this feature, use the following command line options: | ||
3692 | |||
3693 | @table @option | ||
3694 | @item --bulletin-source=@var{mbox} | ||
3695 | Set the @acronym{URL} of the bulletin source mailbox. | ||
3696 | |||
3697 | @item --bulletin-db=@var{file} | ||
3698 | Set the name of the database file to keep last bulletin numbers in. | ||
3699 | Be sure not to specify @samp{.db} extension. | ||
3700 | @end table | ||
3701 | |||
3702 | The following example instructs @command{pop3d} to look for the | ||
3703 | bulletin messages in @acronym{MH} folder @file{/var/spool/bull/mbox} | ||
3704 | and to keep the database of last delivered bulletin numbers in | ||
3705 | @file{/var/spool/bull/numbers.db}: | ||
3706 | |||
3707 | @smallexample | ||
3708 | @group | ||
3709 | $ pop3d --bulletin-source=mh:/var/spool/bull/mbox \ | ||
3710 | --bulletin-db=/var/spool/bull/numbers | ||
3711 | @end group | ||
3712 | @end smallexample | ||
3713 | |||
3714 | @node Command line options | ||
3715 | @subsection Command line options | ||
3716 | |||
3717 | The following table summarizes all @command{pop3d} command line options. | ||
3554 | 3718 | ||
3555 | @table @option | 3719 | @table @option |
3720 | @item --bulletin-db=@var{file} | ||
3721 | Set the name of the database file to keep last bulletin numbers in. | ||
3722 | Be sure not to specify @samp{.db} extension. @xref{Bulletins}. | ||
3723 | |||
3724 | @item --bulletin-source=@var{mbox} | ||
3725 | Set the @acronym{URL} of the bulletin source mailbox. @xref{Bulletins}. | ||
3726 | |||
3556 | @item -d[@var{number}] | 3727 | @item -d[@var{number}] |
3557 | @itemx --daemon[=@var{number}] | 3728 | @itemx --daemon[=@var{number}] |
3558 | Run in standalone mode. An optional @var{number} specifies the maximum number | 3729 | Run in standalone mode. An optional @var{number} specifies the maximum number |
3559 | of child processes the daemon is allowed to fork. When it is omitted, | 3730 | of child processes allowed to run simultaneously. When it is omitted, |
3560 | it defaults to 10 processes. | 3731 | it defaults to 10 processes. |
3561 | @emph{Please note}, that there should be no whitespace between the | 3732 | @emph{Please note}, that there should be no whitespace between the |
3562 | @option{-d} and its parameter. | 3733 | @option{-d} and its parameter. |
3563 | @item -h | 3734 | |
3564 | @itemx --help | 3735 | @item --delete-expired |
3565 | Display short help message and exit. | 3736 | Delete expired messages upon closing the mailbox. @xref{Auto-expire}. |
3737 | |||
3738 | @item --expire=@var{days} | ||
3739 | Expire read messages after the given number of days. If @var{days} is | ||
3740 | 0, this option implies @option{--delete-expired}. @xref{Auto-expire}. | ||
3741 | |||
3566 | @item -i | 3742 | @item -i |
3567 | @itemx --inetd | 3743 | @itemx --inetd |
3568 | Run in inetd mode. | 3744 | Run in inetd mode. |
3745 | |||
3746 | @item -h | ||
3747 | @itemx --help | ||
3748 | Display short help message and exit. | ||
3749 | |||
3750 | @item --login-delay=@var{seconds} | ||
3751 | Sets the minimum allowed delay between closing a pop3d session and | ||
3752 | opening it again with the same user name. @xref{Login delay}. | ||
3753 | |||
3569 | @item -m @var{path} | 3754 | @item -m @var{path} |
3570 | @itemx --mail-spool=@var{path} | 3755 | @itemx --mail-spool=@var{path} |
3571 | Set path to the mailspool directory | 3756 | Set path to the mailspool directory |
3757 | |||
3572 | @item -p @var{number} | 3758 | @item -p @var{number} |
3573 | @itemx --port @var{number} | 3759 | @itemx --port @var{number} |
3574 | Listen on given port @var{number}. This option is meaningful only in | 3760 | Listen on given port @var{number}. This option is meaningful only in |
3575 | standalone mode. It defaults to port 110. | 3761 | standalone mode. It defaults to port 110. |
3762 | |||
3763 | @item --stat-file=@var{filename} | ||
3764 | Sets the name of the login timestamp database, used with | ||
3765 | @option{--login-delay}. By default, these data are kept in | ||
3766 | @file{/var/run/pop3-login}. Be sure to specify the file name | ||
3767 | @emph{without} DBM-specific suffix. @xref{Login delay}. | ||
3768 | |||
3576 | @item -t @var{number} | 3769 | @item -t @var{number} |
3577 | @itemx --timeout @var{number} | 3770 | @itemx --timeout @var{number} |
3578 | Set idle timeout to given @var{number} of seconds. Default is 600 seconds (10 | 3771 | Set idle timeout to given @var{number} of seconds. Default is 600 seconds (10 |
3579 | minutes). The daemon breaks the connection if it receives no commands | 3772 | minutes). The daemon breaks the connection if it receives no commands |
3580 | from the client within that number of seconds. | 3773 | from the client within that number of seconds. |
3774 | |||
3775 | @item --tls-required | ||
3776 | Always require @code{STLS} command before entering authentication phase. | ||
3777 | |||
3581 | @item -v | 3778 | @item -v |
3582 | @itemx --version | 3779 | @itemx --version |
3583 | Display program version and exit. | 3780 | Display program version and exit. |
3781 | |||
3584 | @item --undelete | 3782 | @item --undelete |
3585 | Remove all deletion marks from the messages after opening the mailbox. | 3783 | Remove all deletion marks from the messages after opening the mailbox. |
3586 | @item --login-delay=@var{seconds} | 3784 | |
3587 | Sets the minimum allowed delay between closing a pop3d session and | ||
3588 | opening it again with the same user name. | ||
3589 | @item --stat-file=@var{filename} | ||
3590 | Sets the name of the login timestamp database, used with | ||
3591 | @option{--login-delay}. By default, these data are kept in | ||
3592 | @file{/var/run/pop3-login}. Be sure to specify the file name | ||
3593 | @emph{without} DBM-specific suffix. | ||
3594 | @end table | 3785 | @end table |
3595 | 3786 | ||
3596 | @page | 3787 | @page | ... | ... |
-
Please register or sign in to post a comment