MHPOPD(8) UNIX-OS Programmer's Manual MHPOPD(8) NAME mhpopd, mhsmtpd - a delivery server for MH-type mail folder SYNOPSIS mhpopd [ -hv ] [ -Displtd ] mhsmtpd [ -hv ] [ -Displtd ] DESCRIPTION mhpopd will send mails via POP3 from MH-type local mail fold ers. And then it will control local mails with inc(1) and rmm(1) the MH commands, if they are configured as so. mhsmtpd will copy message files received via SMTP to a MH- type local mail folder. And then it will send them with send(1) the MH command, if it is configured as so. Options mhpopd, mhsmtpd can take the following options when invoked. -h It will list all options, and exit. -v It will display its version, and exit. -D It will be invoked as a daemon to run in the background. This behavior is default when it is invoked on the com- mand line. -i It will run in the forground forcedly. -s file The server configuration file is file. -p port The port number is port. -l dir The directory where the log file is created is dir. -t timeout The input timeout in second from clients is timeout. -d debuglevel It allows to output verbose logs for debugging. The larger debuglevel, the more informations. Crient configurations In receiving configurations, you must set "POP3" or "APOP" as the receiving protocol. The default value of port number is 110. And you MAY use "POP3 AUTH" as the authentication method. In sending configurations, you must set "SMTP" as the send- ing protocol. The default value of port number is 25. And you MUST use "SMTP AUTH" as the authentication method. Each port number can be changed in the server configurations, so that setting another value will cause you to match the client configuration to it. And you must set the password string which is inputted with mhpasswd(1) in the password configuration. In case that you check to remove mails from the server in re- ceiving configurations, the server will change the seen in- formation with rewriting the contents of public sequences file on the server. And then it will remove specified mail files with invoking the command equivalent to rmm(1) the MH command, if configured as invoked. Server configurations mhpopd and mhsmtpd will load configuration parameters from the server configuration file. The server configuration file is /etc/mhpopdrc, unless you specify the -s option. Each configuration parameter in this file must be described in this format: "profile-component: value" profile-component is one of the following identifiers, and value is the value of the configuration parameter which is indicated by the identifier. profile-component is not case sensitive. While lack of value means that the configuration parameter has no value, the configuration line with no value is ig- nored if not otherwise specified. If value extends across some lines, the continuation lines must start with spaces or tabs. In the following description of identifiers, the parameter whose identifier is followed by "(MH)" means that the same identifier is used as the profile component in .mh_profile the user profile of MH. Path (MH) The MH directory name of each user. Unless it starts with "/", it will be regarded as the direc- tory under the home directory of each user. It is used as the root of the local mail folders. The default value is Mail. Inbox (MH) The inbox folder name of each user. It exists just under the MH directory, in which inc(1) will incorporate mails. The default value is inbox. Draft-Folder (MH) The draft folder name of each user. It exists just under the MH directory, in which the message sent by send(1) will be created as the file. No value means that draft the single file just under the MH directory will be overwritten. The default value is none. mh-Path The directory name in which each MH command exists. It must start with "/". The default value is /usr/local/bin. incproc (MH) rmmproc (MH) sendproc (MH) The MH command name which is invoked as inc(1), rmm(1) and send(1). Unless it starts with "/", it will be regarded as the command under the directo- ry specified by mh-Path. No value means that no command invoked as each MH command exists. The de- fault value is inc, none, send respectively. context (MH) The MH context file name of each user. It exists just under the MH directory, in which each MH com- mand will write the dynamic information such as the current folder name. The default value is con- text. Msg-Protect (MH) The message file mode of each user. It specifies the octal protection bits for created message files. The default value is 644. Folder-Protect (MH) The folder directory mode of each user. It speci- fies the octal protection bits for created folder directories. The default value is 711. mh-sequences (MH) The public sequences file name. It exists just un- der each folder in the MH directory, in which the current message number of the folder is described. The default value is .mh_sequences. passwordfile The user authentication password file name. Un- less it starts with "/", it will be regarded as the file under the home directory of each user. The password which is used in user authentication of POP3 and SMTP is described in it. No value means that no authentication password file is used. The default value is .mhpopdpass. incprompt The password prompt string for inc(1). It speci- fies the password prompt string with some shell- like wildcard characters, if inc(1) will require your password. When the line which macthes the specified pattern is found in terminal outputs from the command, the server will automatically reply the password string specified by password- file or my-passwd. No value means no reply for the command. The defalut value is none. pickfile The mail sort controlling file name. Unless it starts with "/", it will be regarded as the file under the MH directory of each user. The mail auto-sorting rule after inc(1) is described in this file, which format is describes later in Mail sort controlling file. It specifies the file, which describes the rule No value means that no mail is sorted automativally. The default value is .pick. envpath The value of the environment variable PATH for the MH commands. It specifies the value of the envi- ronment variable PATH which is passed to each MH command when invoked. No value means that the en- vironment variable PATH is not passed. The de- fault value is none. inc-timeout rmm-timeout send-timeout The timeout for the commands invoked as inc(1), rmm(1) and send(1). In case that the each command returns no response more than seconds specified by this value, the server will advance the next oper- ations without waiting for termination of the com- mand. The value of 0 means waiting forever. You should not specify too large value, because the connection with client will be closed while the server is waiting for response of the command. The default value is 5. pick-timeout The timeout for the commands invoked according to description of the mail sort controlling file. In case that the each command returns no response more than seconds specified by this value, the server will advance the next operations without waiting for termination of the command. The value of 0 means waiting forever. You should not specify too large value, because the connection with client will be closed while the server is waiting for response of the command. The default value is 5. Notice that the described command directed to run in the background will be waited forever in spite of this specification. pop3port smtpport The port number used by mhpopd and mhsmtpd. The default value is 110 and 25 respectively. Notice that it is overwritten by the option -p. piddir The process ID directory name of the server pro- gram. It must start with "/". It specifies the directory, in which the process ID file is created to write the process ID of running mhpopd and mhsmtpd. And the process ID file name is the string of each server program name followed by the extension .pid. Unless the server program is run- ning as root, the dirctory specified by home- piddir will be effective. The default value is /var/run. home-piddir The process ID directory name of the server pro- gram used for general users. Unless it starts with "/", it will be regarded as the directory under the home directory of each user. If the server program is running as general user, the directory specified here will be used instead of piddir. No value means that the process ID file will be created just under the home directory of the effective user. The default value is none. logdir The log directory name of the server program. It must start with "/". It specifies the directory, in which the log file is created for server log- ging. And the log file name is the same as each server program name. No value means that no log- ging is reported except the system message logging. The default value is none. Notice that it is over- written by the option -l. maxlogsize The log file size of the server program. It speci- fies the maximum kilobyte size of the log file cre- ated in the directory specified by logdir. If the size exceeds this value, the last log file will be renamed as the file name followed by the extension .old to create another new log file. The default value is 1024(1MB). nosyslog The boolean to suppress the system message logging by syslogd(8). The value of yes or 1 means that no logging is reported except the log file. The default value is none. reportmail How to deliver the reporting mail. If it is de- livered, the mail which reports the pathname and the size of each delivered mail will be generated, to be delivered after the other mails. The value is limited to the one of following strings. The default value is never. never The report mail will never be delivered. nomail When there is not any mail to be delivered, the report mail will be delivered. mail When there are some mails to be delivered, the report mail will be delivered. any The report mail will always be delivered. users-allow users-deny The user access controlling file name. It must start with "/". The users who are allowed or deni- ed access are listed in these files, which format is described later in User access controlling files. No value means that the empty file is spec- ified. The default value is /etc/users.allow and /etc/users.deny. pop3-incapable The list of the POP3 commands to be incapable. It specifies the POP3 commands which are unavailable for mhpopd, separated by spaces or tabs. The value is limited to some of following names. No value means that all of supported POP3 commands are available. The default value is none. user USER command. apop APOP command. auth AUTH command. login AUTH LOGIN command. plain AUTH PLAIN command. cram-md5 AUTH CRAM-MD5 command. smtp-incapable The list of the SMTP commands to be incapable. It specifies the SMTP commands which are unavailable for mhsmtpd, separated by spaces or tabs. The value is limited to some of following names. No value means that all of supported SMTP commands are available. The default value is none. login AUTH LOGIN command. plain AUTH PLAIN command. cram-md5 AUTH CRAM-MD5 command. hostname The server host name. It specifies the host name sent in the reply for client programs. No value means that the host name configured with OS where the server is invoked. The default value is none. mh-profile The MH user profile name. It exists just under the home directory of each user, in which parame- ters for MH are written. No value means that no MH user profile is used. The default value is .mh_profile. mhpopdrc The user configuration file name. It exists just under the home directory of each user, in which configuration parameters for each user are written. No value means that no user configuration file is used. The default value is .mhpopdrc. timeout The timeout for the client input. In case the cli- ent input pauses more than seconds specified by this value, the server will close connection forcedly. The default value is 30. Notice that it is overwritten by the option -t. debuglevel The debug level. It allows to output verbose logs for debugging. The larger value, the more informa- tions. No value or the value 0 means no informa- tion is outputted except error informations. The default value is none. Notice that it is overwrit- ten by the option -d. User configurations mhpopd and mhsmtpd will load user configuration parameters from the files specified by mh-profile and mhpopdrc the con- figuration parameter in the server configuration file, in this order. If you want to use the different value than the MH profile component or to set the parameters which don't ex- ist in the MH profile component, you should describe them in the file specified by mhpopdrc. The format of these files is similar to that of the server configuration file, and profile-component means one of the following identifiers. The parameter whose identifier is the same as the server configuration file will be overwrit- ten by these configuration files. Path Inbox Draft-Folder mh-Path incproc rmmproc sendproc context Msg-Protect Folder-Protect mh-sequences passwordfile incprompt pickfile envpath inc-timeout rmm-timeout send-timeout pick-timeout reportmail The same in the server configuration file. my-password The user authentication password. It specifies the password string used in the user authentica- tion, in plain text. No value means that the user authentication password file specified by password- file is used, but no value of passwordfile togeth- er will cause to fail authentication. The default value is none. my-folders The list of the MH folders to be sent. It speci- fies the MH folders which are sent to clients by mhpopd, separated by spaces or tabs. No value means that the only folder specified by Inbox is the target to be sent. The default value is none. Mail sort controling file The file specified by pickfile, the parameter in the server configuration file, will control the mail auto-sorting. This file will control which mail is sorted into which fold- er after inc(1), from the folder specified by Inbox. The format of this file is similar to that of the server con- figuration file, profile-component means the destinasion folder name and value means the command name which picks mails and its arguments. Unless it starts with "/", it will be regarded as the command under the directory specified by mh-Path. Each argument is sepalated by spaces or tabs, then you must escape these characters with "\" or quote them with ' or " in any argument. Multiple lines means that there are the multiple folders where you want to sort. The example when you use pick(1) the MH command: "mymail: pick -from myname@mydomain" This specifies the mails whose header has the field "From:" with the value of "myname$mydomain" will be sorted into the folder "mymail". You can refer to each MH documents for de- tails of pick(1) options. If you use the command except pick(1), it must list the message numbers of specified mails separated by spaces, tabs or linefeed into the terminal out- put. In the case that the command string terminates with &, the server will regard the command as directed to run in the background and advance the next operations without waiting for termination of the command. In this case, operations for the next folders will start before sorting mails into this folder starts. Then you should specify the folder di- rected to run in the background at the last of the file. In the case that this folder is specified by my-folders in addi- tion, it is no guarantee that the running in the background terminates before the server returns the files to be sent to the client. And sorted mails cannot be sent to the client. Then you should not direct the folder, in which mails will be sent to the client, to run in the background. User access controlling files The files specified by users-allow and users-deny, the pa- rameters in the server configuration file, will control whose access from client programs is allowed or denied. First, the file specified by users-allow is confirmed to al- low access of the users who are described in this file. Next, the file specified by users-deny is confirmed to deny access of the users who are described in this file. Finally, the server will allow access of the users who are described in neither file. Each line of these user access controlling files must be de- scribed in this format: "server_name: user ..." server_name is one of the string mhpopd, mhsmtpd and ALL, to specify the target server program. ALL means that the tar- get is any server program. user is the target user name, separated by spaces or tabs. The user name starts with @ means that the target is any user who belongs to the group named as the string next to @. ALL means that the target is any user. ENVIRONMENT VARIABLES mhpopd and mhsmtpd will invoke each MH command with the fol- lowing environment variables. No environment variable is set except them. If the invoked program needs the other en- vironment variables, you should manage the program to be in- voked from the shell script, in which you set the environ- ment variables. PATH The content specified by the parameter envpath. USER The user name of authenticated user. HOME The home directory name of authenticated user. SHELL The login shell name of authenticated user. AUTHOR Takashi SHIRAI FILES /etc/mhpopdrc The default name of the server configura- tion file. /etc/users.allow /etc/users.deny The default name of the user access con- trolling file. ~/.mh_profile The default name of the MH user profile. ~/.mhpopdrc The default name of the user configura- tion file. ~/.mhpopdpass The default name of the user authentica- tion password file. ~/Mail The default name of the MH directory. ~/Mail/.pick The default name of the mail sort con- trolling file. SEE ALSO mh(1), inc(1), rmm(1), send(1), pick(1), mhpasswd(1), sys- logd(8) COPYRIGHT Copyright (C) 2005-2019 by Takashi SHIRAI