📄 options.py
字号:
"pop3proxy" : ( ("remote_servers", _("Remote Servers"), (), _("""The SpamBayes POP3 proxy intercepts incoming email and classifies it before sending it on to your email client. You need to specify which POP3 server(s) you wish it to intercept - a POP3 server address typically looks like "pop3.myisp.net". If you use more than one server, simply separate their names with commas. You can get these server names from your existing email configuration, or from your ISP or system administrator. If you are using Web-based email, you can't use the SpamBayes POP3 proxy (sorry!). In your email client's configuration, where you would normally put your POP3 server address, you should now put the address of the machine running SpamBayes."""), SERVER, DO_NOT_RESTORE), ("listen_ports", _("SpamBayes Ports"), (), _("""Each POP3 server that is being monitored must be assigned to a 'port' in the SpamBayes POP3 proxy. This port must be different for each monitored server, and there must be a port for each monitored server. Again, you need to configure your email client to use this port. If there are multiple servers, you must specify the same number of ports as servers, separated by commas. If you don't know what to use here, and you only have one server, try 110, or if that doesn't work, try 8110."""), SERVER, DO_NOT_RESTORE), ("allow_remote_connections", _("Allowed remote POP3 connections"), "localhost", _("""Enter a list of trusted IPs, separated by commas. Remote POP connections from any of them will be allowed. You can trust any IP using a single '*' as field value. You can also trust ranges of IPs using the '*' character as a wildcard (for instance 192.168.0.*). The localhost IP will always be trusted. Type 'localhost' in the field to trust this only address."""), IP_LIST, RESTORE), ("retrieval_timeout", _("Retrieval timeout"), 30, _("""When proxying messages, time out after this length of time if all the headers have been received. The rest of the mesasge will proxy straight through. Some clients have a short timeout period, and will give up on waiting for the message if this is too long. Note that the shorter this is, the less of long messages will be used for classifications (i.e. results may be effected)."""), REAL, RESTORE), ("use_ssl", "Connect via a secure socket layer", False, """Use SSL to connect to the server. This allows spambayes to connect without sending data in plain text. Note that this does not check the server certificate at this point in time.""", (False, True, "automatic"), DO_NOT_RESTORE), ), "smtpproxy" : ( ("remote_servers", _("Remote Servers"), (), _("""Use of the SMTP proxy is optional - if you would rather just train via the web interface, or the pop3dnd or mboxtrain scripts, then you can safely leave this option blank. The Spambayes SMTP proxy intercepts outgoing email - if you forward mail to one of the addresses below, it is examined for an id and the message corresponding to that id is trained as ham/spam. All other mail is sent along to your outgoing mail server. You need to specify which SMTP server(s) you wish it to intercept - a SMTP server address typically looks like "smtp.myisp.net". If you use more than one server, simply separate their names with commas. You can get these server names from your existing email configuration, or from your ISP or system administrator. If you are using Web-based email, you can't use the Spambayes SMTP proxy (sorry!). In your email client's configuration, where you would normally put your SMTP server address, you should now put the address of the machine running SpamBayes."""), SERVER, DO_NOT_RESTORE), ("listen_ports", _("SpamBayes Ports"), (), _("""Each SMTP server that is being monitored must be assigned to a 'port' in the Spambayes SMTP proxy. This port must be different for each monitored server, and there must be a port for each monitored server. Again, you need to configure your email client to use this port. If there are multiple servers, you must specify the same number of ports as servers, separated by commas."""), SERVER, DO_NOT_RESTORE), ("allow_remote_connections", _("Allowed remote SMTP connections"), "localhost", _("""Enter a list of trusted IPs, separated by commas. Remote SMTP connections from any of them will be allowed. You can trust any IP using a single '*' as field value. You can also trust ranges of IPs using the '*' character as a wildcard (for instance 192.168.0.*). The localhost IP will always be trusted. Type 'localhost' in the field to trust this only address. Note that you can unwittingly turn a SMTP server into an open proxy if you open this up, as connections to the server will appear to be from your machine, even if they are from a remote machine *through* your machine, to the server. We do not recommend opening this up fully (i.e. using '*'). """), IP_LIST, RESTORE), ("ham_address", _("Train as ham address"), "spambayes_ham@localhost", _("""When a message is received that you wish to train on (for example, one that was incorrectly classified), you need to forward or bounce it to one of two special addresses so that the SMTP proxy can identify it. If you wish to train it as ham, forward or bounce it to this address. You will want to use an address that is not a valid email address, like ham@nowhere.nothing."""), EMAIL_ADDRESS, RESTORE), ("spam_address", _("Train as spam address"), "spambayes_spam@localhost", _("""As with Ham Address above, but the address that you need to forward or bounce mail that you wish to train as spam. You will want to use an address that is not a valid email address, like spam@nowhere.nothing."""), EMAIL_ADDRESS, RESTORE), ("use_cached_message", _("Lookup message in cache"), False, _("""If this option is set, then the smtpproxy will attempt to look up the messages sent to it (for training) in the POP3 proxy cache or IMAP filter folders, and use that message as the training data. This avoids any problems where your mail client might change the message when forwarding, contaminating your training data. If you can be sure that this won't occur, then the id-lookup can be avoided. Note that Outlook Express users cannot use the lookup option (because of the way messages are forwarded), and so if they wish to use the SMTP proxy they must enable this option (but as messages are altered, may not get the best results, and this is not recommended)."""), BOOLEAN, RESTORE), ), # imap4proxy settings: The only mandatory option is imap4proxy_servers, eg. # "imap4.my-isp.com:143", or a comma-separated list of those. The ":143" # is optional. If you specify more than one server in imap4proxy_servers, # you must specify the same number of ports in imap4proxy_ports. "imap4proxy" : ( ("remote_servers", _("Remote Servers"), (), _("""The SpamBayes IMAP4 proxy intercepts incoming email and classifies it before sending it on to your email client. You need to specify which IMAP4 server(s) you wish it to intercept - a IMAP4 server address typically looks like "mail.myisp.net". If you use more than one server, simply separate their names with commas. You can get these server names from your existing email configuration, or from your ISP or system administrator. If you are using Web-based email, you can't use the SpamBayes IMAP4 proxy (sorry!). In your email client's configuration, where you would normally put your IMAP4 server address, you should now put the address of the machine running SpamBayes."""), SERVER, DO_NOT_RESTORE), ("listen_ports", _("SpamBayes Ports"), (), _("""Each IMAP4 server that is being monitored must be assigned to a 'port' in the SpamBayes IMAP4 proxy. This port must be different for each monitored server, and there must be a port for each monitored server. Again, you need to configure your email client to use this port. If there are multiple servers, you must specify the same number of ports as servers, separated by commas. If you don't know what to use here, and you only have one server, try 143, or if that doesn't work, try 8143."""), SERVER, DO_NOT_RESTORE), ("allow_remote_connections", _("Allowed remote IMAP4 connections"), "localhost", _("""Enter a list of trusted IPs, separated by commas. Remote IMAP connections from any of them will be allowed. You can trust any IP using a single '*' as field value. You can also trust ranges of IPs using the '*' character as a wildcard (for instance 192.168.0.*). The localhost IP will always be trusted. Type 'localhost' in the field to trust this only address."""), IP_LIST, RESTORE), ("use_ssl", "Connect via a secure socket layer", False, """Use SSL to connect to the server. This allows spambayes to connect without sending data in plain text. Note that this does not check the server certificate at this point in time.""", (False, True, "automatic"), DO_NOT_RESTORE), ), "html_ui" : ( ("port", _("Port"), 8880, _(""""""), PORT, RESTORE), ("launch_browser", _("Launch browser"), False, _("""If this option is set, then whenever sb_server or sb_imapfilter is started the default web browser will be opened to the main web interface page. Use of the -b switch when starting from the command line overrides this option."""), BOOLEAN, RESTORE), ("allow_remote_connections", _("Allowed remote UI connections"), "localhost", _("""Enter a list of trusted IPs, separated by commas. Remote connections from any of them will be allowed. You can trust any IP using a single '*' as field value. You can also trust ranges of IPs using the '*' character as a wildcard (for instance 192.168.0.*). The localhost IP will always be trusted. Type 'localhost' in the field to trust this only address."""), IP_LIST, RESTORE), ("display_headers", _("Headers to display in message review"), ("Subject", "From"), _("""When reviewing messages via the web user interface, you are presented with various information about the message. By default, you are shown the subject and who the message is from. You can add other message headers to display, however, such as the address the message is to, or the date that the message was sent."""), HEADER_NAME, RESTORE), ("display_received_time", _("Display date received in message review"), False, _("""When reviewing messages via the web user interface, you are presented with various information about the message. If you set this option, you will be shown the date that the message was received. """), BOOLEAN, RESTORE), ("display_score", _("Display score in message review"), False, _("""When reviewing messages via the web user interface, you are presented with various information about the message. If you set this option, this information will include the score that the message received when it was classified. You might wish to see this purely out of curiousity, or you might wish to only train on messages that score towards the boundaries of the classification areas. Note that in order to use this option, you must also enable the option to include the score in the message headers."""), BOOLEAN, RESTORE), ("display_adv_find", _("Display the advanced find query"), False, _("""Present advanced options in the 'Word Query' box on the front page, including wildcard and regular expression searching."""), BOOLEAN, RESTORE), ("default_ham_action", _("Default training for ham"), _("discard"), _("""When presented with the review list in the web interface, which button would you like checked by default when the message is classified as ham?"""), (_("ham"), _("spam"), _("discard"), _("defer")), RESTORE), ("default_spam_action", _("Default training for spam"), _("discard"), _("""When presented with the review list in the web interface, which button would you like checked by default when the message is classified as spam?"""), (_("ham"), _("spam"), _("discard"), _("defer")), RESTORE), ("default_unsure_action", _("Default training for unsure"), _("defer"), _("""When presented with the review list in the web interface, which button would you like checked by default when the message is classified as unsure?"""), (_("ham"), _("spam"), _("discard"), _("defer")), RESTORE), ("ham_discard_level", _("Ham Discard Level"), 0.0, _("""Hams scoring less than this percentage will default to being discarded in the training interface (they won't be trained). You'll need to turn off the 'Train when filtering' option, above, for this to have any effect"""), REAL, RESTORE), ("spam_discard_level", _("Spam Discard Level"), 100.0, _("""Spams scoring more than this percentage will default to being discarded in the training interface (they won't be trained). You'll need to turn off the 'Train when filtering' option, above, for this to have any effect"""), REAL, RESTORE), ("http_authentication", _("HTTP Authentication"), "None", _("""This option lets you choose the security level of the web interface. When selecting Basic or Digest, the user will be prompted a login and a password to access the web interface. The Basic option is faster, but transmits the password in clear on the network. The Digest option encrypts the password before transmission."""), ("None", "Basic", "Digest"), RESTORE), ("http_user_name", _("User name"), "admin", _("""If you activated the HTTP authentication option, you can modify the authorized user name here."""), r"[\w]+", RESTORE), ("http_password", _("Password"), "admin",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -