📄 alex.1mh
字号:
.TH alex 1mh.SH Namealex \- extract addresses from message headers.SH Syntax.B alex[.I +folder] [.I msgs] [.I options].\".\".\".\".SH Description.NXR "alex command".NXR "extracting addresses from message header"The address line extraction utility.PN alexextracts electronic mail addresses from message headers and prints the addresses on your screen or places them, with a specified alias name, in an alias file..PPBy default, .PN alex searches for addresses in the current message in the current folder.You can list the messages you wish .PN alex to search giving a.I msgsargument.You can also search messages in a different folderby giving a.I +folderargument. .PPYou define the fields from which you want addresses by usingcombinations of field names with the .B \-field option. You can also supply an address yourself as a value to the .B \-address option.Results are printed either to your screen or to a file in.MS mh-alias 5mhformat. Where there is an address group in the alias file with an alias name identical to one you have specified in an .PN alexcommand, it may be replaced or the new addresses appended. A copy of the original alias file is kept..PPBy default, .PN alexsearches the \f(CWReply-to:\fR, \f(CWSender:\fR, \f(CWFrom:\fR and\f(CWTo:\fR header fields in that order until an address is found. Youcan set up your own default values for .PN alexin your .PN \&.mh_profilefile; see.MS mh_profile 5mh ..PPWhen giving options to the.PN alex command, generally the shortest unique abbreviation suffices. .\".\".\".\".SH Options.IP "\-address \fIstring\fR" 10Accepts an address that you type in, rather than taking an address from a message.If any.B \-fieldoption is specified, it is ignored..\".\".IP "\-alias \fIfilename\fR" Specifies the name of the alias file, in which aliases are placed.You must provide a file name or a dash (\f(CW-\fR)as an argument with this option. There is no default value.If the value given for this option is \f(CW-\fR,or the option is not specified, .PN alexwill print the output to your screen. If you do not give the full pathname of your alias file,.PN alexwill look for the alias file in your Mail directory, as specified in the \f(CWPath\fRfield of your .PN \&.mh_profilefile. If .PN alex cannot locate the alias file in the directory that you specify, it will ask you whether or not you wish to create one. .IPYou can set up an alias file to be used by .PN alexin your .PN \&.mh_profile ;see .MS mh_profile 5mhfor more information.Like other mail commands,.PN alexuses the \f(CWAliasfile\fR entryto find the alias file..\".\".IP \-compress 10.PD 0.IP \-nocompress 10.PDPrevents any repetition of the same address in the output of an .PN alexcommand.You can use this option when there are multiple occurrencesof an address in an address group and you want just one occurrence ofit in your alias.The default is .B \-nocompress..\".\".IP "\-field \fIname\fR[\fI /name ... \fR]" 10.PD 0.IP \-nofield.PDSpecifies the name of a header field. The name of the field is not case-sensitive.If you specify this option without providing an argument, the default values are:.B \-field\fBreply-to/sender/from/to\fR.You can set up your own default values for the.B \-fieldoption in your .PN \&.mh_profile .See .MS mh_profile 5mh..IPExamples of field names are\f(CWFrom\fR, \f(CWcc\fR and \f(CWTo\fR. You must not type a colon after the name of a field. When more field names follow, in the form \fI/name\fR, the message header is searched for each of the fields in turn until one is found. Only the first header field found to contain an addressis used; the rest are ignored..IPThe option.B \-nofieldexcludes the named field..IPThe special name, \fBall\fR,means all fields, and can be used as a valuefor the .B \-nofieldoption to override any default order of header fields, otherwise.B \-fieldvalues are appended to any default values..\".\".\".\".IP \-global Specifies that any address replacements or appendings willapply to all occurrences of that alias name.Normally, if an alias name is entered in the alias file more than once,any actions performed by.PN alex are performed only on the first occurrence of that alias name.The.B \-globaloption ensures that any changes are made to all occurrencesof the alias.Whenever this option is specified, a message is broadcast to yourscreen telling you how many entries in the alias file have beenchanged..\".\".IP \-help Prints a list of the valid options for this command..\".\".IP "\-name \fIname\fR" Specifies the alias name for address information extracted. The .PN alexcommand appends a colon (:) to the name as required by .MS mh-alias 5mh . If you do not specify this option,.PN alexwill print extracted addresses to your screen. If you specify this option, you must provide an argument;there is no default value..\".\".IP \-query 10.PD 0.IP \-noquery 10.PDExtracts addresses interactively. Before adding each address of a list of extracted addresses to an alias group, the mail system will ask youwhether you wish the address to be added. The query prompt is written on the standard error output.The default is\fB\-noquery\fR..\".\".IP \-replace 10.PD 0.IP \-noreplace 10.PDReplaces existing alias with the new list of addresses.By default, if there is an existing alias with the same nameas the one you are trying to create,.PN alex appends the new address list to the old alias.If an address appears in both address groups, it is still appended, so that it appears twice in the new alias.You can specify this explicitly by using the .B \-noreplace option.If you specify the .B \-replace option, the new list of addresses replaces the existing group.The default is .B \-noreplace..\".\".IP "\-width \fIn\fR" Specifies the maximum width of your alias file line.If an alias group extends beyond this length, it is continued on the next line, with abackslash (\e) at end of the first line..\".\" ***COMMENTED OUT SECTION BELOW.igAny X.400 addresses which are longer than the maximum line lengthspecified by this option are automatically wrapped onto the next line....\" ***END OF COMMENTED SECTION.\"This option affects the format of each individual entry when it isimplemented; any subsequent or previous entries in the alias fileremain the same.The default is 72 characters..\".\".\".\".SH RestrictionsBecause the .B \-nofield option can take the value.B allas an argument,.PN alexwill not recognize a header field called \f(CWAll\fR.If you wish to use such a header field, you should call it \f(CWX-all\fR..PPIf a command line contains contradictory arguments then the last value specified is used.For example, in the following command,.PN alexonly uses the options .B \-name\ fredand \fB\-noreplace\fR:.EX% \f(CBalex -name sam -name fred -replace -noreplace.EE.\".\".\".\".SH ExamplesThis example takes the address from the \f(CWFrom\fR fieldof the current message, and places it in your alias file with the alias name \f(CWbob\fR:.EX% \f(CBalex -field from -alias aliases -name bob.EE.PPThe following example shows what happens if you specify an alias file that does not exist.You are asked whether you want to create the file;enter \f(CBy\fR to create it:.EX% \f(CBalex -field from -name bob -alias aliases\f(CWCreate alias file "HOME/Mail/aliases"? \f(CBy\f(CW.EE.PPThe next example takes addresses from two fields, \f(CWFrom\fR and \f(CWcc\fR, and saves them as the alias \f(CWsales_team\fR:.EX% \f(CBalex -field from -field cc -alias aliases -name sales_team.EE.\".\" ************************************************.\" COMMENTED OUT - need .mh_profile defaults adding.ig.PPThe next example shows how you can use the .B \-nofieldoption to override the default fields that are matched.By default, .PN alexlooks for an address in the following fields of a message:\f(CWReply-to\fR,\f(CWSender\fR,\f(CWFrom\fR,\f(CWTo\fR.If you want to take an address from the \f(CWTo\fR field only, you can use .B \-nofieldto ignore the other fields, as follows:.EX% \f(CBalex -nofield reply-to -nofield sender -nofield from.EEAlternatively, you can use the special value.B allwith .B \-nofieldto disable all the default fields. Then you can use the.B \-field option to specify the field that you do want to match. For example, the following command overrides all the default fields,and then takes the addresses from the \f(CWTo\fR field:.EX% \f(CBalex -nofield all -field to.EE...\" ************************************************.\".\".\".\".SH Files.TP 10.PN $HOME/.mh_profileYour user profile..\".\".\".\".SH See Alsoali(1mh), mh(1mh), pick(1mh), mh-alias(5mh), mh_profile(5mh)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -