#
# If you want UIDL compatibility with other POP3 servers, use:
# UW's ipop3d : %08Xv%08Xu
-# Courier : %f or %v-%u (both might be used simultaneosly)
+# Courier : %f or %v-%u (both might be used simultaneously)
# Cyrus (<= 2.1.3) : %u
# Cyrus (>= 2.1.4) : %v.%u
# Dovecot v0.99.x : %v.%u
# You can execute a given command when user exceeds a specified quota limit.
# Each quota root has separate limits. Only the command for the first
-# exceeded limit is excecuted, so put the highest limit first.
+# exceeded limit is executed, so put the highest limit first.
# The commands are executed via script service by connecting to the named
# UNIX socket (quota-warning below).
# Note that % needs to be escaped as %%, otherwise "% " expands to empty.
have_notify=kqueue
notify=kqueue
AC_MSG_RESULT("yes")
- AC_DEFINE(IOLOOP_NOTIFY_KQUEUE,, [Use BSD kqueue directory changes notificaton])
+ AC_DEFINE(IOLOOP_NOTIFY_KQUEUE,, [Use BSD kqueue directory changes notification])
else
AC_MSG_RESULT("no")
if test "$notify" = "kqueue" ; then
for (i = 0; i < count; i++) {
auth_request = auth_requests[aqueue_idx(auth_failures, i)];
- /* FIXME: assumess that failure_delay is always the same. */
+ /* FIXME: assumes that failure_delay is always the same. */
diff = ioloop_time - auth_request->last_access;
if (diff < (time_t)auth_request->set->failure_delay &&
!flush_all)
/* standard checkpassword exit codes: */
case 1:
/* (1 is additionally defined in vpopmail for
- "pop/smtp/webmal/ imap/access denied") */
+ "pop/smtp/webmail/ imap/access denied") */
auth_request_log_info(request->request, AUTH_SUBSYS_DB,
"Login failed (status=%d)",
request->exit_status);
pass[len-1] == ']' && pass[len-4] == '[') {
/* password[type] - we're being libpam-pwdfile compatible
here. it uses 13 = DES and 34 = MD5. For backwards
- comaptibility with ourself, we have also 56 = Digest-MD5. */
+ compatibility with ourself, we have also 56 = Digest-MD5. */
int num = (pass[len-3] - '0') * 10 + (pass[len-2] - '0');
pass = t_strndup(pass, len-4);
/* Set username early, so that the credential lookup is for the
* authorizing user. This means the username in subsequent log
- * messagess will be the authorization name, not the authentication
+ * messages will be the authorization name, not the authentication
* name, which may mean that future log messages should be adjusted
* to log the right thing. */
if (!auth_request_set_username(auth_request, login_user, &error)) {
return -1;
}
- /* iterate throuth the different files matching the globbing */
+ /* iterate through the different files matching the globbing */
for (i = globbers.gl_pathc; i > 0; i--) {
if (settings_add_include(ctx, globbers.gl_pathv[i-1],
ignore_errors, &error) < 0) {
}
/* just forward this to the entire ring until it reaches back to
itself. some hosts may see this twice, but that's the only way to
- guarantee that it gets seen by everyone. reseting the host multiple
+ guarantee that it gets seen by everyone. resetting the host multiple
times may cause us to handle its commands multiple times, but the
commands can handle that. however, we need to also handle a
situation where the added director never comes back - we don't want
to the imap-urlauth service to access user B's mail store to retrieve the
mail.
-The authentication and authorization of the URLAUTH is performed whithin
+The authentication and authorization of the URLAUTH is performed within
this service. Because access to the mailbox and the associated mailbox keys is
necessary to retrieve the message and for verification of the URLAUTH, the
urlauth services need root privileges. To mitigate security concerns, the
bool reverse, last_reverse;
if (IMAP_ARG_IS_EOL(args)) {
- /* empyty list */
+ /* empty list */
client_send_command_error(cmd, "Empty sort program.");
return -1;
}
-/* file truct dcrypt_public_keyyntax
+/* file struct dcrypt_public_key syntax
* magic (14 bytes)
* version (1 bytes)
* flags (4 bytes)
}
}
- /* hopefully upstream can accomondate */
+ /* hopefully upstream can accommodate */
if (o_stream_encrypt_send(estream, buf.data, buf.used) < 0) {
return -1;
}
if (file->fs->wrap_metadata && mode == FS_OPEN_MODE_READONLY &&
(flags & FS_OPEN_FLAG_ASYNC) == 0) {
/* use async stream for parent, so fs_read_stream() won't create
- another seekable stream unneededly */
+ another seekable stream needlessly */
file->super_read = fs_file_init(_fs->parent, path, mode | flags |
FS_OPEN_FLAG_ASYNC);
} else {
*/
extern const struct fts_filter *fts_filter_normalizer_icu;
-/* Lowecases the input. Supports UTF8, if libicu is available. */
+/* Lowercases the input. Supports UTF8, if libicu is available. */
extern const struct fts_filter *fts_filter_lowercase;
/* Removes <'s> suffix from words. */
"HTTP/1.1 404 Not Found\r\n"
"\r\n";
- /* wait one second to respon */
+ /* wait one second to respond */
sleep(1);
/* respond */
"HTTP/1.1 404 Not Found\r\n"
"\r\n";
- /* wait one second to respon */
+ /* wait one second to respond */
sleep(1);
/* respond */
/* "+ idling" reply for IDLE command */
conn->idle_plus_waiting = FALSE;
conn->idling = TRUE;
- /* no timeouting while IDLEing */
+ /* no timing out while IDLEing */
if (conn->to != NULL && !conn->idle_stopping)
timeout_remove(&conn->to);
} else if (cmds_count > 0 && cmds[0]->wait_for_literal) {
}
/* Here would be a good place to do fdatasync() to make sure
everything is written before offsets are updated to index.
- However it slows down I/O unneededly and we're pretty good
+ However it slows down I/O needlessly and we're pretty good
at catching and fixing cache corruption, so we no longer do
it. */
}
doesn't happen to be 64bit aligned we'll skip some bytes */
offset = MAIL_INDEX_HEADER_SIZE_ALIGN(map->hdr.base_header_size);
if (offset >= map->hdr.header_size && map->extension_pool == NULL) {
- /* nothing to do, skip allocatations and all */
+ /* nothing to do, skip allocations and all */
return 0;
}
p_clear(map->extension_pool);
/* try to use the existing pool's size for initial_count so
- we don't grow it unneededly */
+ we don't grow it needlessly */
size = p_get_max_easy_alloc_size(map->extension_pool);
if (size > EXT_GLOBAL_ALLOC_SIZE + EXT_PER_ALLOC_SIZE) {
initial_count = (size - EXT_GLOBAL_ALLOC_SIZE) /
void mail_index_strmap_deinit(struct mail_index_strmap **strmap);
/* Returns strmap records and hash that can be used for read-only access.
- The records array always teminates with a record containing zeros (but it's
+ The records array always terminates with a record containing zeros (but it's
not counted in the array count). */
struct mail_index_strmap_view *
mail_index_strmap_view_open(struct mail_index_strmap *strmap,
if (keep_count == 1 &&
update.uid1 == keep_range[0].seq1 &&
update.uid2 == keep_range[0].seq2) {
- /* evereything is kept */
+ /* everything is kept */
return update_idx + 1;
}
*expunged_r = FALSE;
return head_rec;
} else {
- /* expuned from head. use the old record. */
+ /* expunged from head. use the old record. */
*map_r = view->map;
if (expunged_r != NULL)
*expunged_r = TRUE;
/* Assign UIDs for mails with uid=0 or uid<first_uid. All the assigned UIDs
are higher than the highest unassigned UID (i.e. it doesn't try to fill UID
gaps). Assumes that mailbox is locked in a way that UIDs can be safely
- assigned. Returns UIDs for all asigned messages, in their sequence order
+ assigned. Returns UIDs for all assigned messages, in their sequence order
(so UIDs are not necessary ascending). */
void mail_index_append_finish_uids(struct mail_index_transaction *t,
uint32_t first_uid,
log. max_tail_offset is what should be written to the log the next
time a transaction is written. transaction log handling may update
max_tail_offset automatically by making it skip external transactions
- after the last saved offset (to avoid re-reading them unneededly). */
+ after the last saved offset (to avoid re-reading them needlessly). */
uoff_t saved_tail_offset, max_tail_offset;
/* don't give warnings about saved_tail_offset shrinking if
sync_offset is less than this. */
struct mail_transaction_modseq_update {
uint32_t uid;
- /* don't use uint64_t here. it adds extra 32 bits of paddiong and also
+ /* don't use uint64_t here. it adds extra 32 bits of padding and also
causes problems with CPUs that require alignment */
uint32_t modseq_low32;
uint32_t modseq_high32;
*/
/* Returns TRUE if this message part has content-type "text/plain",
- chaset "us-ascii" and content-transfer-encoding "7bit" */
+ charset "us-ascii" and content-transfer-encoding "7bit" */
bool message_part_data_is_plain_7bit(const struct message_part *part)
ATTR_PURE;
* schedule to speed up the actual encryption. I'll describe those
* below.
*
- * The first and most obvious optimisation is the S-boxes. Since
+ * The first and most obvious optimization is the S-boxes. Since
* each S-box always targets the same four bits in the final 32-bit
* word, so the output from (for example) S-box 0 must always be
* shifted left 28 bits, we can store the already-shifted outputs
struct ntlmssp_response {
uint64_t magic; /* NTLMSSP\0 */
uint32_t type; /* Should be 3 */
- ntlmssp_buffer_t lm_response; /* LM/LMv2 recponse */
- ntlmssp_buffer_t ntlm_response; /* NTLM/NTLMv2 recponse */
+ ntlmssp_buffer_t lm_response; /* LM/LMv2 response */
+ ntlmssp_buffer_t ntlm_response; /* NTLM/NTLMv2 response */
ntlmssp_buffer_t domain; /* Domain name */
ntlmssp_buffer_t user; /* User name */
ntlmssp_buffer_t workstation; /* Workstation name */
/*
- * OTP hash generaion.
+ * OTP hash generation.
*
* Copyright (c) 2006 Andrey Panin <pazke@donpac.ru>
*
return -1;
}
- /* iterate throuth the different files matching the globbing */
+ /* iterate through the different files matching the globbing */
for (i = 0; i < globbers.gl_pathc; i++) {
if (settings_add_include(globbers.gl_pathv[i], inputp,
ignore_errors, error_r) < 0)
use CRLF line feeds and end with CRLF. */
void lmtp_client_set_data_header(struct lmtp_client *client, const char *str);
/* Add recipient to the session. rcpt_to_callback is called once LMTP server
- replies with RCPT TO. If RCPT TO was a succees, data_callback is called
+ replies with RCPT TO. If RCPT TO was a success, data_callback is called
when DATA replies. */
void lmtp_client_add_rcpt(struct lmtp_client *client, const char *address,
lmtp_callback_t *rcpt_to_callback,
}
if (sstream->ostream.max_buffer_size == 0) {
- /* we're requeted to use whatever space is available in
+ /* we're requested to use whatever space is available in
the buffer */
avail = buffer_get_writable_size(sstream->buffer) - sstream->buffer->used;
} else {
if (ctx->first_append_offset == 0) {
/* nothing changed */
} else if (ctx->first_append_offset == file->file_header_size) {
- /* rollbacking everything */
+ /* rolling back everything */
if (unlink(file->cur_path) < 0)
dbox_file_set_syscall_error(file, "unlink()");
close_file = TRUE;
int sdbox_file_move(struct dbox_file *file, bool alt_path);
/* Unlink file and all of its referenced attachments. */
int sdbox_file_unlink_with_attachments(struct sdbox_file *sfile);
-/* Unlink file and its attachments when rollbacking a saved message. */
+/* Unlink file and its attachments when rolling back a saved message. */
int sdbox_file_unlink_aborted_save(struct sdbox_file *file);
#endif
T_BEGIN {
ARRAY(struct search_mimepart_stack) prev_stack;
- /* preserve current stack for any nested CHILD PARENT nastyness */
+ /* preserve current stack for any nested CHILD PARENT nastiness */
t_array_init(&prev_stack, 16);
array_copy(&prev_stack.arr, 0, &mpctx->stack.arr, 0,
array_count(&mpctx->stack));
i_unreached();
/* the only reason we're doing the destination lookup is to
make sure that the cache file is opened and the cache
- decisinos are up to date */
+ decisions are up to date */
if (mailbox_get_metadata(ctx->transaction->box,
MAILBOX_METADATA_CACHE_FIELDS,
&dest_metadata) < 0)
readdir() skips some files. we don't of course wish to lose them, so we
go and rescan the new/ directory again from beginning until no files are
left. This value is just an optimization to avoid checking the directory
- twice unneededly. usually only NFS is the problem case. 1 is the safest
+ twice needlessly. usually only NFS is the problem case. 1 is the safest
bet here, but I guess 5 will do just fine too. */
#define MAILDIR_RENAME_RESCAN_COUNT 5
if (ctx->index_sync_ctx != NULL) {
/* NOTE: index syncing here might cause a re-sync due to
files getting lost, so this function might be called
- re-entrantly. */
+ reentrantly. */
ret = maildir_sync_index(ctx->index_sync_ctx, ctx->partial);
if (ret < 0)
maildir_sync_index_rollback(&ctx->index_sync_ctx);
(box->flags & MAILBOX_FLAG_KEEP_LOCKED) != 0);
if (lost_files) {
- /* lost some files from new/, see if thery're in cur/ */
+ /* lost some files from new/, see if they're in cur/ */
ret = maildir_storage_sync_force(mbox, 0);
}
}
ctx->last_uid_value_start_pos;
if (ctx->imapbase_updated) {
- /* update so a) we don't try to update it later unneededly,
+ /* update so a) we don't try to update it later needlessly,
b) if we do actually update it, we see the correct value */
ctx->sync_ctx->base_uid_last = ctx->last_uid_updated_value;
}
/* fully synced */
if (mbox->mbox_hdr.dirty_flag != 0 || leave_dirty)
return 0;
- /* flushing dirtyness */
+ /* flushing dirtiness */
}
/* file changed */
/* nothing to do */
nothing_to_do:
/* index may need to do internal syncing though, so commit
- instead of rollbacking. */
+ instead of rolling back. */
index_storage_expunging_deinit(&mbox->box);
if (mail_index_sync_commit(&index_sync_ctx) < 0) {
mailbox_set_index_error(&mbox->box);
if (list->create_mailbox_name != NULL &&
strcmp(name, list->create_mailbox_name) == 0) {
- /* we're rollbacking a failed create. if the name exists in the
+ /* we're rolling back a failed create. if the name exists in the
list, it was done by somebody else so we don't want to
remove it. */
return 0;
return 0;
if (box->deleting) {
/* don't update status info while mailbox is being deleted.
- especially not a good idea if we're rollbacking a created
+ especially not a good idea if we're rolling back a created
mailbox that somebody else had just created */
return 0;
}
/* copy relevant attributes */
array_foreach(&extra_attrs, attr) {
- /* skip internal server attributes unless we're interating inbox */
+ /* skip internal server attributes unless we're iterating inbox */
if (!box->inbox_any &&
strncmp(*attr, MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER,
strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER)) == 0)
}
#define array_count(array) \
array_count_i(&(array)->arr)
-/* No need for the real count if all we're doing is comparing againts 0 */
+/* No need for the real count if all we're doing is comparing against 0 */
#define array_is_empty(array) \
((array)->arr.buffer->used == 0)
#define array_not_empty(array) \
/* Exchange ownership of two arrays, which should have been allocated
from the same pool/context. Useful for updating an array with a
- replacement. Can also do it with uninitialised arrays (which will
+ replacement. Can also do it with uninitialized arrays (which will
have .element_size == 0). */
static inline void
array_swap_i(struct array *array1, struct array *array2)
if (bits > 0) {
/* truncate it to closest byte boundary */
size_t bytes = ((bits + 7) & -8U)/8;
- /* remainding bits */
+ /* remaining bits */
bits = bits % 8;
buffer_set_used_size(buf, I_MIN(bytes, buf->used));
unsigned char *ptr = buffer_get_modifiable_data(buf, &bytes);
return -1;
recursed++;
- /* syslogs don't generatelly bother to log the level in any way,
+ /* syslogs don't generally bother to log the level in any way,
so make sure errors are shown clearly */
T_BEGIN {
syslog(level, "%s%s%s",
if (last) {
/* since we're not freeing memory in any case, just increase
deleted counter so next handle_add() can just decrease it
- insteading of appending to the events array */
+ instead of appending to the events array */
ctx->deleted_count++;
}
i_free(io);
/* since we're not freeing memory in any case, just increase
deleted counter so next handle_add() can just decrease it
- insteading of appending to the events array */
+ instead of appending to the events array */
ctx->deleted_count++;
i_assert(io->refcount > 0);
parent streams' max buffer size. */
void i_stream_set_max_buffer_size(struct istream *stream, size_t max_size);
/* Returns the current max. buffer size for the stream. This function also
- goesthrough all of the parent streams and returns the highest seen max
+ goes through all of the parent streams and returns the highest seen max
buffer size. This is needed because some streams (e.g. istream-chain) change
their max buffer size dynamically. */
size_t i_stream_get_max_buffer_size(struct istream *stream);
pid_t pid;
};
-/* maxmimum string length of IP address */
+/* maximum string length of IP address */
#define MAX_IP_LEN INET6_ADDRSTRLEN
#define IPADDR_IS_V4(ip) ((ip)->family == AF_INET)
ptrdiff_t seglen;
const char *segend;
- /* skip duplicate shashes */
+ /* skip duplicate slashes */
while (*p == '/')
p++;
ssize_t safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count)
{
- /* REMEBER: uoff_t and off_t may not be of same size. */
+ /* REMEMBER: uoff_t and off_t may not be of same size. */
off_t safe_offset;
ssize_t ret;
uint32_t seq1, uint32_t seq2);
void seq_range_array_merge(ARRAY_TYPE(seq_range) *dest,
const ARRAY_TYPE(seq_range) *src);
-/* Remove the given sequrence from range. Returns TRUE if it was found. */
+/* Remove the given sequence from range. Returns TRUE if it was found. */
bool ATTR_NOWARN_UNUSED_RESULT
seq_range_array_remove(ARRAY_TYPE(seq_range) *array, uint32_t seq);
/* Remove a sequence range. Returns number of sequences actually removed. */
#include <ctype.h>
#define WILDS '*' /* matches 0 or more characters (including spaces) */
-#define WILDQ '?' /* matches ecactly one character */
+#define WILDQ '?' /* matches exactly one character */
#define NOMATCH 0
#define MATCH (match+sofar)
fork off the process itself. Example: "MAINPID=4711"
Daemons can choose to send additional variables. However, it is
- recommened to prefix variable names not listed above with X_.
+ recommended to prefix variable names not listed above with X_.
Returns a negative errno-style error code on failure. Returns > 0
if systemd could be notified, 0 if it couldn't possibly because
struct timeout *to_login_notify;
/* if a process fails before servicing its first request, assume it's
- broken and start throtting new process creations */
+ broken and start throttling new process creations */
struct timeout *to_throttle;
/* when process_limit is reached, wait for a while until we actually
start dropping pending connections */
backend->acllist_mtime = st.st_mtime;
backend->acllist_last_check = ioloop_time;
- /* FIXME: dict reubild is expensive, try to avoid it */
+ /* FIXME: dict rebuild is expensive, try to avoid it */
(void)acl_lookup_dict_rebuild(auser->acl_lookup_dict);
} else {
acllist_clear(backend, 0);
if (mode == FS_OPEN_MODE_READONLY &&
(flags & FS_OPEN_FLAG_ASYNC) == 0) {
/* use async stream for parent, so fs_read_stream() won't create
- another seekable stream unneededly */
+ another seekable stream needlessly */
file->super_read = fs_file_init(_fs->parent, path, mode | flags |
FS_OPEN_FLAG_ASYNC);
} else {
int ret;
/* we need to use the mailbox attribute API here, as we
- are not necessarely able to decrypt any of these keys
+ are not necessarily able to decrypt any of these keys
*/
ARRAY_TYPE(const_string) ids;
if (mode == FS_OPEN_MODE_READONLY &&
(flags & FS_OPEN_FLAG_ASYNC) == 0) {
/* use async stream for super, so fs_read_stream() won't create
- another seekable stream unneededly */
+ another seekable stream needlessly */
file->super_read = fs_file_init(_fs->parent, path, mode | flags |
FS_OPEN_FLAG_ASYNC);
} else {
}
if (ret == -1 && !i_stream_have_bytes_left(&stream->istream) &&
stream->istream.v_offset == 0) {
- /* EOF without any input -> assume the script is repoting
+ /* EOF without any input -> assume the script is reporting
failure. pretty ugly way, but currently there's no error
reporting channel. */
stream->istream.stream_errno = EIO;
if (!i_stream_have_bytes_left(mstream->ext_in) &&
mstream->ext_in->v_offset == 0) {
- /* EOF without any input -> assume the script is repoting
+ /* EOF without any input -> assume the script is reporting
failure. pretty ugly way, but currently there's no error
reporting channel. */
io_stream_set_error(&stream->iostream, "EOF without input");
ret = -1;
if (ret <= 0) {
- /* commit the transaction instead of rollbacking to make sure
+ /* commit the transaction instead of rolling back to make sure
we don't lose data (virtual sizes) added to cache file */
(void)mailbox_transaction_commit(&t);
array_free(&message_sizes);