1 /* $Id: language.h,v 1.31 2011/06/28 00:13:48 sbajic Exp $ */ 2 3 /* 4 DSPAM 5 COPYRIGHT (C) 2002-2012 DSPAM PROJECT 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU Affero General Public License as 9 published by the Free Software Foundation, either version 3 of the 10 License, or (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU Affero General Public License for more details. 16 17 You should have received a copy of the GNU Affero General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 20 */ 21 22 #ifndef _LANGUAGE_H 23 # define _LANGUAGE_H 24 25 #define LANGUAGE "en" 26 27 /* General purpose error codes */ 28 29 #define ERR_MEM_ALLOC "Memory allocation failed" 30 #define ERR_IO_FILE_OPEN "Unable to open file for reading: %s: %s" 31 #define ERR_IO_FILE_READ "Unable to read from file: %s: %s" 32 #define ERR_IO_FILE_WRITE "Unable to open file for writing: %s: %s" 33 #define ERR_IO_FILE_WRITING "Unable to write file: %s: %s" 34 #define ERR_IO_FILE_CLOSE "Unable to close file: %s: %s" 35 #define ERR_IO_FILE_RENAME "Unable to rename file: %s: %s" 36 #define ERR_IO_DIR_CREATE "Unable to create directory: %s: %s" 37 #define ERR_IO_LOCK "Failed to lock file %s: %d: %s" 38 #define ERR_IO_LOCK_FREE "Failed to free lock file %s: %d: %s" 39 40 /* External lookup related error codes */ 41 42 #define ERR_EXT_LOOKUP_INIT_FAIL "Backend initialization failure" 43 #define ERR_EXT_LOOKUP_LDAP_PROTO_VER_FAIL "Unable to set LDAP protocol version" 44 #define ERR_EXT_LOOKUP_SEARCH_FAIL "Backend search failure" 45 #define ERR_EXT_LOOKUP_MISCONFIGURED "External Lookup misconfigured" 46 47 /* Agent error codes */ 48 49 #define ERR_AGENT_USER_UNDEFINED "Unable to determine the destination user" 50 #define ERR_AGENT_READ_CONFIG "Unable to read dspam.conf" 51 #define ERR_AGENT_DSPAM_HOME "No DSPAM home specified" 52 #define ERR_AGENT_RUNTIME_USER "Unable to determine the runtime user" 53 #define ERR_AGENT_NO_SUCH_PROFILE "No such profile '%s'" 54 #define ERR_AGENT_NO_SUCH_CLASS "No such class '%s'" 55 #define ERR_AGENT_NO_SUCH_SOURCE "No such source '%s'" 56 #define ERR_AGENT_NO_SUCH_DELIVER "No such delivery option '%s'" 57 #define ERR_AGENT_NO_SUCH_FEATURE "No such feature '%s'" 58 #define ERR_AGENT_NO_AGENT "No %s configured, and --stdout not specified" 59 #define ERR_AGENT_NO_SOURCE "No source was specified for this class" 60 #define ERR_AGENT_NO_CLASS "No class was specified for this source" 61 #define ERR_AGENT_CLASSIFY_CLASS "Classify mode may not specify a class" 62 #define ERR_AGENT_NO_OP_MODE "No operating mode was specified" 63 #define ERR_AGENT_NO_TR_MODE "No training mode was specified" 64 #define ERR_AGENT_TB_INVALID "Training buffer level must be 0-10" 65 #define ERR_AGENT_TR_MODE_INVALID "Invalid training mode specified" 66 #define ERR_AGENT_IGNORE_PREF "Ignoring disallowed preference '%s'" 67 #define ERR_AGENT_INIT_ATX "Unable to initialize agent context" 68 #define ERR_AGENT_MISCONFIGURED "DSPAM agent misconfigured: aborting" 69 #define ERR_AGENT_FAILOVER "Failing over to storage profile '%s'" 70 #define ERR_AGENT_FAILOVER_OUT "Could not fail over: out of failover servers" 71 #define ERR_AGENT_CLEAR_ATTRIB "Unable to clear attributes list" 72 #define ERR_AGENT_PARSER_FAILED "Message parser failed. Unable to continue." 73 #define ERR_AGENT_SIG_RET_FAILED "Signature retrieval for '%s' failed" 74 #define ERR_AGENT_NO_VALID_SIG "Unable to find a valid signature. Aborting." 75 #define ERR_AGENT_OPTIN_DIR "The opt-in file %s should be a directory" 76 77 /* Local delivery agent error codes */ 78 79 #define ERR_LDA_EXIT "Delivery agent returned exit code %d: %s" 80 #define ERR_LDA_SIGNAL "Delivery agent terminated by signal %d: %s" 81 #define ERR_LDA_OPEN "Error opening pipe to delivery agent: %s: %s" 82 #define ERR_LDA_CLOSE "Unexpected return code %d when closing pipe" 83 #define ERR_LDA_STATUS "Error getting exit status of delivery agent: %s: %s" 84 85 /* Client error codes */ 86 87 #define ERR_CLIENT_EXIT "Client exited with error %d" 88 89 /* Trusted-user related error codes */ 90 91 #define ERR_TRUSTED_USER \ 92 "Option --user requires special privileges when user does not match current \ 93 user, e.g.. root or Trusted User [uid=%d(%s)]" 94 95 #define ERR_TRUSTED_PRIV \ 96 "Option %s requires special privileges; e.g.. root or Trusted User [uid=%d(%s)]" 97 98 #define ERR_TRUSTED_MODE \ 99 "Program mode requires special privileges, e.g., root or Trusted User" 100 101 /* DSPAM core engine (libdspam) related error codes */ 102 103 #define ERR_CORE_INIT "Context initialization failed" 104 #define ERR_CORE_ATTACH "Unable to attach DSPAM context" 105 #define ERR_CORE_REATTACH "Unable to attach DSPAM context. Retrying." 106 107 /* Storage driver error codes */ 108 109 #define ERR_DRV_NO_ATTACH "Driver does not support dbh attach" 110 #define ERR_DRV_NO_MERGED "Driver does not support merged groups" 111 #define ERR_DRV_INIT "Unable to initialize storage driver" 112 113 /* Daemon-mode related info codes */ 114 115 #define INFO_DAEMON_START "Daemon process starting" 116 #define INFO_DAEMON_EXIT "Daemon process exiting" 117 #define INFO_DAEMON_BIND "Binding to %s:%d" 118 #define INFO_DAEMON_DOMAINSOCK "Creating local domain socket %s" 119 #define INFO_DAEMON_RELOAD "Reloading configuration" 120 121 /* Daemon-mode related error codes */ 122 123 #define ERR_DAEMON_NO_SUPPORT "DSPAM was not compiled with daemon support" 124 #define ERR_DAEMON_BIND "Could not bind to :%d: %s" 125 #define ERR_DAEMON_DOMAINBIND "Could not bind to %s: %s" 126 #define ERR_DAEMON_SOCKET "Could not create socket: %s" 127 #define ERR_DAEMON_SOCKOPT "Could not set sockopt %s: %s" 128 #define ERR_DAEMON_LISTEN "Unable to listen: %s" 129 #define ERR_DAEMON_ACCEPT "Unable to accept: %s" 130 #define ERR_DAEMON_THREAD "Thread creation failed: %s" 131 #define ERR_DAEMON_FAIL "Daemon mode failed to start" 132 #define ERR_DAEMON_TERMINATE "Daemon terminating on signal %d" 133 134 /* LMTP (externally visible) info codes */ 135 136 #define INFO_LMTP_DATA "Enter mail, end with \".\" on a line by itself" 137 138 /* LMTP (externally visible) error codes */ 139 140 #define ERR_LMTP_MSG_NULL "Message is empty. Aborting." 141 #define ERR_LMTP_BAD_RCPT "Invalid RCPT TO. Use RCPT TO: <recipient>" 142 143 /* Client-mode related info codes */ 144 145 #define INFO_CLIENT_CONNECTED "Connection established" 146 #define INFO_CLIENT_CONNECTING "Establishing connection to %s:%d" 147 148 /* Client-mode related error codes */ 149 150 #define ERR_CLIENT_INVALID_CONFIG "Invalid client configuration" 151 #define ERR_CLIENT_CONNECT "Unable to connect to server" 152 #define ERR_CLIENT_IDENT "No ClientIdent provided in dspam.conf" 153 #define ERR_CLIENT_CONNECT_SOCKET "Connection to socket %s failed: %s" 154 #define ERR_CLIENT_CONNECT_HOST "Connection to %s:%d failed: %s" 155 #define ERR_CLIENT_AUTH_FAILED "Unable to authenticate client" 156 #define ERR_CLIENT_AUTHENTICATE "Authentication rejected" 157 #define ERR_CLIENT_WHILE_AUTH "Error while authenticating: %s" 158 #define ERR_CLIENT_ON_GREETING "Received error on greeting: %s" 159 #define ERR_CLIENT_SEND_FAILED "Packet send failure" 160 #define ERR_CLIENT_INVALID_RESPONSE "Received error in response to %s: %s" 161 #define ERR_CLIENT_DELIVERY_FAILED "Delivery failed completely" 162 #define ERR_CLIENT_RESPONSE "Got error %d in response to %s: %s" 163 #define ERR_CLIENT_RESPONSE_CODE "Invalid data waiting for code %d: %s" 164 165 /* Classes */ 166 167 #define LANG_CLASS_WHITELISTED "Whitelisted" 168 #define LANG_CLASS_SPAM "Spam" 169 #define LANG_CLASS_INNOCENT "Innocent" 170 #define LANG_CLASS_VIRUS "Virus" 171 #define LANG_CLASS_BLOCKLISTED "Blocklisted" 172 #define LANG_CLASS_BLACKLISTED "Blacklisted" 173 174 #endif /* _LANGUAGE_H */ 175