mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-2.3-20060604
This commit is contained in:
parent
318987d107
commit
635c9e37f2
@ -12175,10 +12175,18 @@ Apologies for any names omitted.
|
||||
domains without secondary MX records. Joshua Goodall. File:
|
||||
smtpd/smtpd_check.c.
|
||||
|
||||
20060604
|
||||
|
||||
Cleanup: minor fluff found with the BEAM source code analyzer.
|
||||
Files: global/quote_821_local.c, global/quote_822_local.c,
|
||||
master/master_spawn.c, pickup/pickup.c, util/match_ops.c,
|
||||
util/safe_open.c, xsasl/xsasl_cyrus_client.c.
|
||||
|
||||
Wish list:
|
||||
|
||||
Find out if postfix_tls@aet.tu-cottbus.de is still appropriate,
|
||||
and if not, update TLS_README.
|
||||
Don't lose bits when converting st_dev into maildir file
|
||||
name. It's 64 bits on Linux. Found with the BEAM source
|
||||
code analyzer.
|
||||
|
||||
Do or don't introduce unknown_reverse_client_reject_code.
|
||||
|
||||
|
@ -1056,13 +1056,10 @@ indicates a super-user shell.
|
||||
|
||||
RReeppoorrttiinngg pprroobblleemmss
|
||||
|
||||
When reporting a problem, please be thorough in the report. Patches, when
|
||||
possible, are greatly appreciated too.
|
||||
|
||||
Please differentiate when possible between:
|
||||
|
||||
* Problems in the TLS code: <postfix_tls@aet.tu-cottbus.de>
|
||||
* Problems in vanilla Postfix: <postfix-users@postfix.org>
|
||||
Problems are preferably reported via <postfix-users@postfix.org>. See http://
|
||||
www.postfix.org/lists.html for subscription information. When reporting a
|
||||
problem, please be thorough in the report. Patches, when possible, are greatly
|
||||
appreciated too.
|
||||
|
||||
CCoommppaattiibbiilliittyy wwiitthh PPoossttffiixx << 22..22 TTLLSS ssuuppppoorrtt
|
||||
|
||||
|
@ -1518,18 +1518,10 @@ super-user privileges. </p>
|
||||
|
||||
<h2> <a name="problems"> Reporting problems </a> </h2>
|
||||
|
||||
<p> When reporting a problem, please be thorough in the report.
|
||||
Patches, when possible, are greatly appreciated too. </p>
|
||||
|
||||
<p> Please differentiate when possible between: </p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li> Problems in the TLS code: <postfix_tls@aet.tu-cottbus.de>
|
||||
|
||||
<li> Problems in vanilla Postfix: <postfix-users@postfix.org>
|
||||
|
||||
</ul>
|
||||
<p> Problems are preferably reported via <postfix-users@postfix.org>.
|
||||
See <a href="http://www.postfix.org/lists.html">http://www.postfix.org/lists.html</a> for subscription information.
|
||||
When reporting a problem, please be thorough in the report. Patches,
|
||||
when possible, are greatly appreciated too. </p>
|
||||
|
||||
<h2><a name="compat">Compatibility with Postfix < 2.2 TLS support</a></h2>
|
||||
|
||||
|
@ -1518,18 +1518,10 @@ tls_random_source = dev:/dev/urandom
|
||||
|
||||
<h2> <a name="problems"> Reporting problems </a> </h2>
|
||||
|
||||
<p> When reporting a problem, please be thorough in the report.
|
||||
Patches, when possible, are greatly appreciated too. </p>
|
||||
|
||||
<p> Please differentiate when possible between: </p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li> Problems in the TLS code: <postfix_tls@aet.tu-cottbus.de>
|
||||
|
||||
<li> Problems in vanilla Postfix: <postfix-users@postfix.org>
|
||||
|
||||
</ul>
|
||||
<p> Problems are preferably reported via <postfix-users@postfix.org>.
|
||||
See http://www.postfix.org/lists.html for subscription information.
|
||||
When reporting a problem, please be thorough in the report. Patches,
|
||||
when possible, are greatly appreciated too. </p>
|
||||
|
||||
<h2><a name="compat">Compatibility with Postfix < 2.2 TLS support</a></h2>
|
||||
|
||||
|
@ -5,7 +5,7 @@ SRCS = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \
|
||||
deliver_completed.c deliver_flock.c deliver_pass.c deliver_request.c \
|
||||
dict_ldap.c dict_mysql.c dict_pgsql.c dict_proxy.c domain_list.c \
|
||||
dot_lockfile.c dot_lockfile_as.c ext_prop.c file_id.c flush_clnt.c \
|
||||
header_opts.c header_token.c hold_message.c input_transp.c \
|
||||
header_opts.c header_token.c input_transp.c \
|
||||
is_header.c log_adhoc.c mail_addr.c mail_addr_crunch.c \
|
||||
mail_addr_find.c mail_addr_map.c mail_command_client.c \
|
||||
mail_command_server.c mail_conf.c mail_conf_bool.c mail_conf_int.c \
|
||||
@ -35,7 +35,7 @@ OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
|
||||
deliver_completed.o deliver_flock.o deliver_pass.o deliver_request.o \
|
||||
dict_ldap.o dict_mysql.o dict_pgsql.o dict_proxy.o domain_list.o \
|
||||
dot_lockfile.o dot_lockfile_as.o ext_prop.o file_id.o flush_clnt.o \
|
||||
header_opts.o header_token.o hold_message.o input_transp.o \
|
||||
header_opts.o header_token.o input_transp.o \
|
||||
is_header.o log_adhoc.o mail_addr.o mail_addr_crunch.o \
|
||||
mail_addr_find.o mail_addr_map.o mail_command_client.o \
|
||||
mail_command_server.o mail_conf.o mail_conf_bool.o mail_conf_int.o \
|
||||
@ -65,7 +65,7 @@ HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \
|
||||
deliver_flock.h deliver_pass.h deliver_request.h dict_ldap.h \
|
||||
dict_mysql.h dict_pgsql.h dict_proxy.h domain_list.h dot_lockfile.h \
|
||||
dot_lockfile_as.h ext_prop.h file_id.h flush_clnt.h header_opts.h \
|
||||
header_token.h hold_message.h input_transp.h is_header.h \
|
||||
header_token.h input_transp.h is_header.h \
|
||||
lex_822.h log_adhoc.h mail_addr.h mail_addr_crunch.h \
|
||||
mail_addr_find.h mail_addr_map.h mail_conf.h mail_copy.h \
|
||||
mail_date.h mail_dict.h mail_error.h mail_flush.h mail_open_ok.h \
|
||||
@ -862,17 +862,6 @@ header_token.o: ../../include/vstring.h
|
||||
header_token.o: header_token.c
|
||||
header_token.o: header_token.h
|
||||
header_token.o: lex_822.h
|
||||
hold_message.o: ../../include/msg.h
|
||||
hold_message.o: ../../include/sane_fsops.h
|
||||
hold_message.o: ../../include/set_eugid.h
|
||||
hold_message.o: ../../include/sys_defs.h
|
||||
hold_message.o: ../../include/vbuf.h
|
||||
hold_message.o: ../../include/vstream.h
|
||||
hold_message.o: ../../include/vstring.h
|
||||
hold_message.o: hold_message.c
|
||||
hold_message.o: hold_message.h
|
||||
hold_message.o: mail_params.h
|
||||
hold_message.o: mail_queue.h
|
||||
input_transp.o: ../../include/msg.h
|
||||
input_transp.o: ../../include/name_mask.h
|
||||
input_transp.o: ../../include/sys_defs.h
|
||||
|
@ -1,112 +0,0 @@
|
||||
/*++
|
||||
/* NAME
|
||||
/* hold_message 3
|
||||
/* SUMMARY
|
||||
/* move message to hold queue
|
||||
/* SYNOPSIS
|
||||
/* #include <hold_message.h>
|
||||
/*
|
||||
/* int hold_message(path_buf, queue_name, queue_id)
|
||||
/* VSTRING *path_buf;
|
||||
/* const char *queue_name;
|
||||
/* const char *queue_id;
|
||||
/* DESCRIPTION
|
||||
/* The \fBhold_message\fR() routine moves the specified
|
||||
/* queue file to the \fBhold\fR queue, where it will sit
|
||||
/* until someone either destroys it or releases it.
|
||||
/*
|
||||
/* Arguments:
|
||||
/* .IP path_buf
|
||||
/* A null pointer, or storage for the new pathname.
|
||||
/* .IP queue_name
|
||||
/* Queue name with the message that needs to be placed on hold.
|
||||
/* .IP queue_id
|
||||
/* Queue file name with the message that needs to be placed on hold.
|
||||
/* DIAGNOSTICS
|
||||
/* The result is -1 in case of failure, 0 in case of success.
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* IBM T.J. Watson Research
|
||||
/* P.O. Box 704
|
||||
/* Yorktown Heights, NY 10598, USA
|
||||
/*--*/
|
||||
|
||||
/* System library. */
|
||||
|
||||
#include <sys_defs.h>
|
||||
#include <stdio.h> /* rename() */
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Utility library. */
|
||||
|
||||
#include <msg.h>
|
||||
#include <set_eugid.h>
|
||||
#include <sane_fsops.h>
|
||||
|
||||
/* Global library. */
|
||||
|
||||
#include <mail_queue.h>
|
||||
#include <mail_params.h>
|
||||
#include <hold_message.h>
|
||||
|
||||
#define STR(x) vstring_str(x)
|
||||
|
||||
/* hold_message - move message to hold queue */
|
||||
|
||||
int hold_message(VSTRING *path_buf, const char *queue_name,
|
||||
const char *queue_id)
|
||||
{
|
||||
VSTRING *old_path = vstring_alloc(100);
|
||||
VSTRING *new_path = 0;
|
||||
uid_t saved_uid;
|
||||
gid_t saved_gid;
|
||||
int err;
|
||||
|
||||
/*
|
||||
* If not running as the mail system, change privileges first.
|
||||
*/
|
||||
if ((saved_uid = geteuid()) != var_owner_uid) {
|
||||
saved_gid = getegid();
|
||||
set_eugid(var_owner_uid, var_owner_gid);
|
||||
}
|
||||
|
||||
/*
|
||||
* Your buffer or mine?
|
||||
*/
|
||||
if (path_buf == 0)
|
||||
new_path = path_buf = vstring_alloc(100);
|
||||
|
||||
/*
|
||||
* This code duplicates mail_queue_rename(), except that it also returns
|
||||
* the result pathname to the caller.
|
||||
*/
|
||||
(void) mail_queue_path(old_path, queue_name, queue_id);
|
||||
(void) mail_queue_path(path_buf, MAIL_QUEUE_HOLD, queue_id);
|
||||
if ((err = sane_rename(STR(old_path), STR(path_buf))) == 0
|
||||
|| ((err = mail_queue_mkdirs(STR(path_buf)) == 0)
|
||||
&& (err = sane_rename(STR(old_path), STR(path_buf))) == 0)) {
|
||||
if (msg_verbose)
|
||||
msg_info("%s: placed on hold", queue_id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore privileges.
|
||||
*/
|
||||
if (saved_uid != var_owner_uid)
|
||||
set_eugid(saved_uid, saved_gid);
|
||||
|
||||
/*
|
||||
* Cleanup.
|
||||
*/
|
||||
vstring_free(old_path);
|
||||
if (new_path)
|
||||
vstring_free(new_path);
|
||||
|
||||
return (err);
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
#ifndef _HOLD_MESSAGE_H_INCLUDED_
|
||||
#define _HOLD_MESSAGE_H_INCLUDED_
|
||||
|
||||
/*++
|
||||
/* NAME
|
||||
/* hold_message 3h
|
||||
/* SUMMARY
|
||||
/* mark queue file as corrupt
|
||||
/* SYNOPSIS
|
||||
/* #include <hold_message.h>
|
||||
/* DESCRIPTION
|
||||
/* .nf
|
||||
|
||||
/*
|
||||
* External interface.
|
||||
*/
|
||||
extern int hold_message(VSTRING *, const char *, const char *);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* IBM T.J. Watson Research
|
||||
/* P.O. Box 704
|
||||
/* Yorktown Heights, NY 10598, USA
|
||||
/*--*/
|
||||
|
||||
#endif
|
@ -20,7 +20,7 @@
|
||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||
* patchlevel; they change the release date only.
|
||||
*/
|
||||
#define MAIL_RELEASE_DATE "20060601"
|
||||
#define MAIL_RELEASE_DATE "20060604"
|
||||
#define MAIL_VERSION_NUMBER "2.3"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@ -119,7 +119,7 @@ static VSTRING *make_821_quoted_string(VSTRING *dst, const char *local_part,
|
||||
* that need quoting when they occur in a quoted-string.
|
||||
*/
|
||||
VSTRING_ADDCH(dst, '"');
|
||||
for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) {
|
||||
for (cp = local_part; cp < end && (ch = *(unsigned char *) cp) != 0; cp++) {
|
||||
if ((ch > 127 && !(flags & QUOTE_FLAG_8BITCLEAN))
|
||||
|| ch == '\r' || ch == '\n' || ch == '"' || ch == '\\')
|
||||
VSTRING_ADDCH(dst, '\\');
|
||||
|
@ -132,7 +132,7 @@ static VSTRING *make_822_quoted_string(VSTRING *dst, const char *local_part,
|
||||
* that need quoting when they occur in a quoted-string.
|
||||
*/
|
||||
VSTRING_ADDCH(dst, '"');
|
||||
for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) {
|
||||
for (cp = local_part; cp < end && (ch = *(unsigned char *) cp) != 0; cp++) {
|
||||
if ((ch > 127 && !(flags & QUOTE_FLAG_8BITCLEAN))
|
||||
|| ch == '"' || ch == '\\' || ch == '\r')
|
||||
VSTRING_ADDCH(dst, '\\');
|
||||
|
@ -219,7 +219,6 @@ void master_spawn(MASTER_SERV *serv)
|
||||
|
||||
execvp(serv->path, serv->args->argv);
|
||||
msg_fatal("%s: exec %s: %m", myname, serv->path);
|
||||
exit(1);
|
||||
/* NOTREACHED */
|
||||
|
||||
/*
|
||||
@ -292,10 +291,8 @@ void master_reap_child(void)
|
||||
if (msg_verbose)
|
||||
msg_info("master_reap_child: pid %d", pid);
|
||||
if ((proc = (MASTER_PROC *) binhash_find(master_child_table,
|
||||
(char *) &pid, sizeof(pid))) == 0) {
|
||||
(char *) &pid, sizeof(pid))) == 0)
|
||||
msg_panic("master_reap: unknown pid: %d", pid);
|
||||
continue;
|
||||
}
|
||||
serv = proc->serv;
|
||||
if (!NORMAL_EXIT_STATUS(status)) {
|
||||
if (WIFEXITED(status))
|
||||
|
@ -306,7 +306,7 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
|
||||
info->st.st_mtime = now;
|
||||
} else if (info->st.st_mtime < now - DAY_SECONDS) {
|
||||
msg_warn("%s: message has been queued for %d days",
|
||||
info->id, (int) (now - info->st.st_mtime) / DAY_SECONDS);
|
||||
info->id, (int) ((now - info->st.st_mtime) / DAY_SECONDS));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -85,6 +85,8 @@ int find_inet_port(const char *service, const char *protocol)
|
||||
int port;
|
||||
|
||||
if (alldig(service) && (port = atoi(service)) != 0) {
|
||||
if (port < 0 || port > 65535)
|
||||
msg_fatal("bad port number: %s", service);
|
||||
return (htons(port));
|
||||
} else {
|
||||
if ((sp = getservbyname(service, protocol)) == 0)
|
||||
|
@ -219,7 +219,7 @@ int match_hostaddr(int unused_flags, const char *addr, const char *pattern)
|
||||
if (strcasecmp(addr, pattern) == 0)
|
||||
return (1);
|
||||
} else {
|
||||
ssize_t addr_len = strlen(addr);
|
||||
size_t addr_len = strlen(addr);
|
||||
|
||||
if (strncasecmp(addr, pattern + 1, addr_len) == 0
|
||||
&& strcmp(pattern + 1 + addr_len, "]") == 0)
|
||||
|
@ -188,6 +188,12 @@ static VSTREAM *safe_open_create(const char *path, int flags, mode_t mode,
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Optionally look up the file attributes.
|
||||
*/
|
||||
if (st != 0 && fstat(vstream_fileno(fp), st) < 0)
|
||||
msg_fatal("%s: bad open file status: %m", path);
|
||||
|
||||
/*
|
||||
* Optionally change ownership after creating a new file. If there is a
|
||||
* problem we should not attempt to delete the file. Something else may
|
||||
@ -200,12 +206,6 @@ static VSTREAM *safe_open_create(const char *path, int flags, mode_t mode,
|
||||
msg_warn("%s: cannot change file ownership: %m", path);
|
||||
}
|
||||
|
||||
/*
|
||||
* Optionally look up the file attributes.
|
||||
*/
|
||||
if (st != 0 && fstat(vstream_fileno(fp), st) < 0)
|
||||
msg_fatal("%s: bad open file status: %m", path);
|
||||
|
||||
/*
|
||||
* We are almost there...
|
||||
*/
|
||||
|
@ -379,7 +379,7 @@ static int xsasl_cyrus_client_set_security(XSASL_CLIENT *xp,
|
||||
* Per-session security properties. XXX This routine is not sufficiently
|
||||
* documented. What is the purpose of all this?
|
||||
*/
|
||||
memset(&sec_props, 0L, sizeof(sec_props));
|
||||
memset(&sec_props, 0, sizeof(sec_props));
|
||||
sec_props.min_ssf = 0;
|
||||
sec_props.max_ssf = 0; /* don't allow real SASL
|
||||
* security layer */
|
||||
|
Loading…
x
Reference in New Issue
Block a user