Problem report by Michael Ju. Tokarev @ tls.msk.ru. Files:
global/mail_params.h, smtpd/smtpd.c.
-20000407
-
- Multi-platform build support: use the makelinks shell script
- to build a shadow tree with symlinks to the source files.
-
20000413
Portability: more MacOS X patches by Gerben Wierda.
20000502
- In order to support timeouts with SSL more conveniently,
- VSTREAMs now have built into them the concept of timeout.
- Instead of calling read() and write(), the low-level VSTREAM
- interface now uses timed_read() and timed_write() which
- have an additional timeout parameter; vstream_ctl(stream,
- VSTREAM_CTL_TIMEOUT) sets the timeout deadline on a stream,
- and vstream_ftimeout(stream) queries a stream for timeout
- errors. This change simplified timeout handling considerably.
- Files: util/vbuf.h, util/vstrean.[hc], global/smtp_stream.c,
- global/timed_ipc.c.
+ In order to support timeouts more conveniently, VSTREAMs
+ now have built into them the concept of timeout. Instead
+ of calling read() and write(), the low-level VSTREAM
+ interface now by default uses timed_read() and timed_write()
+ which receive a timeout parameter; vstream_ctl(stream,
+ VSTREAM_CTL_TIMEOUT...) sets the timeout deadline on a
+ stream, and vstream_ftimeout(stream) queries a stream for
+ timeout errors. This change simplified timeout handling
+ considerably. Files: util/vbuf.h, util/vstrean.[hc],
+ global/smtp_stream.c, global/timed_ipc.c.
20000504
- In order to support application-specific state, VSTREAMs
- now provide an optional open attribute list. An example is
- the per-stream jump buffer that was needed in order to
- clean up the smtp_stream module. Files: util/vstream.[hc],
- util/binattr.[hc].
+ Added application context to VSTREAMs, which is passed on
+ transparently to application-provided read/write routines.
+ vstream_ctl(stream, VSTREAM_CTL_CONTEXT...) sets the context.
+ Files: util/vstream.[hc].
+
+ Added vstream_setjmp() and vstream_longjmp() support to
+ make exception handling more convenient. Turn on exception
+ handling with vstream_ctl(stream, VSTREAM_CTL_EXCEPT...).
+ Files: util/vstream.[hc].
Cleaned up the smtp_stream module further and got rid of
the global state that limited the use of this module to
20000505
- Bugfix: flush output in-between tarpit delays, in case the
- client causes many, many, errors. Found by Lamont Jones,
- HP. File: smtpd/smtpd_chat.c.
+ Bugfix: the SMTP server now flushes output in-between tarpit
+ delays, to avoid protocol timeouts when a client causes lots
+ of errors. Found by Lamont Jones, HP. File: smtpd/smtpd_chat.c.
+
+20000506
+
+ Convenience: the LMTP and SMTP clients now append the local
+ domain to unqualified nexthop destinations. This makes it
+ more convenient to set up transport maps. Files:
+ lmtp/lmtp_addr.c, smtp/smtp_addr.c.
--- /dev/null
+Postfix LMTP support
+====================
+
+Postfix LMTP support was initially implemented by Philip A.
+Prindeville of Mirapoint, Inc., USA, and was modified further by
+Amos Gouaux of University of Texas at Dallas, Richardson, USA.
+Wietse then beat the code into its present shape.
+
+Postfix can be configured to talk to a local or remote LMTP server.
+Most people will run the LMTP server on the same machine that runs
+Postfix. However, a remote LMTP server can be useful if Postfix
+runs on mail relay server(s) that feed incoming mail directly to
+the appropriate mailbox server(s). This way, mailbox servers do
+not need to run an SMTP server at all. Tidy all the way around.
+
+Configuring the mailbox server (local or remote)
+================================================
+
+On the mailbox server, in this case a CMU Cyrus imapd/popd server,
+add the following to /etc/services:
+
+ pop3 110/tcp # Cyrus POP3
+ imap 143/tcp # Cyrus IMAP4
+ lmtp 24/tcp
+
+Next, put the following in /etc/inetd.conf:
+
+ lmtp stream tcp nowait cyrus /usr/sbin/tcpd /usr/local/cyrus/bin/deliver -e -l
+
+/usr/sbin/tcpd is from the tcp_wrappers package. You want this
+to make sure only your mail relay(s) can talk to the LMTP server.
+Postfix by default enables connection cacheing for delivery via
+LMTP, so do not worry about the load of wrapping the LMTP port.
+
+Configuring Postfix
+===================
+
+Similar changes to /etc/services:
+
+ lmtp 24/tcp
+
+You may have to add the following entry to /etc/postfix/master.cf:
+
+ lmtp unix - - n - - lmtp
+
+NOTES: Root privs are not necessary!
+
+We put this in /etc/postfix/transport:
+
+ inbox.domain.org lmtp:inbox.domain.org
+
+Naturally, this means we also have to have in
+/etc/postfix/main.cf:
+
+ transport_maps = hash:/etc/postfix/transport
+
+Use the map type of your choice. Use "postconf -m" to find out
+what map types are supported.
+
+Connection cacheing performance
+===============================
+
+After delivering a message via LMTP, Postfix will keep the connection
+open for a while, so that it can be reused for a subsequent delivery.
+This reduces overhead of LMTP servers that create one process per
+connection.
+
+The Postfix LMTP client makes only one connection at a time. For
+connection cacheing to work well, the Postfix LMTP client has to
+avoid switching destination hosts. If you have multiple LMTP servers,
+configure separate master.cf entries for each LMTP server, and
+configure transport entries that distribute mail domains to the
+right LMTP servers.
+
+ /etc/postfix/transport:
+ foo.com lmtp1:lmtp1host
+ bar.com lmtp2:lmtp2host
+
+ /etc/postfix/master.cf:
+ lmtp1 unix - - n - - lmtp
+ lmtp2 unix - - n - - lmtp
+Incompatible changes with snapshot-20000506
+===========================================
+
+None.
+
+Major changes with snapshot-20000506
+====================================
+
+Preliminary LMTP client support with connection cacheing, currently
+only over TCP sockets. Support for LMTP over UNIX-domain support
+will be added later. See the LMTP_README file for more details.
+
+Preliminary support for SASL authentication, both in the SMTP server
+and in the SMTP client. See the SASL_README file for more details.
+
+The pipe mailer now has a configurable end-of-line attribute.
+Specify, for example, "pipe ... eol=\r\n" for delivery mechanisms
+that require CRLF record delimiters.
+
+The manual pages in sample configuration files now show plain text
+without TROFF escape sequences.
+
Incompatible changes with snapshot-20000309
===========================================
Do not use this code. The Postfix SASL support is based on the
Cyrus SASL library, which has not enough documentation about how
-the software is supposed to work.
+the software is supposed to work, and it is not clear if the code
+is safe enough for security-critical applications.
Postfix+SASL 1.5.5 appears to work on RedHat 6.1 (pwcheck_method
-of shadow or sasldb), Solaris 2.7 (pwcheck_method of shadow or
-sasldb), and FreeBSD 3.4 (pwcheck_method of sasldb). On RedHat
-6.1, SASL 1.5.5 needed write access to the sasldb file.
+set to shadow or sasldb), Solaris 2.7 (pwcheck_method set to shadow
+or sasldb), and FreeBSD 3.4 (pwcheck_method set to sasldb). On
+RedHat 6.1, SASL 1.5.5 insisted on write access to /etc/sasldb.
SASL is a lot of complex code. In a future version the Postfix SASL
code is likely to be put outside the SMTP server.
On some systems this generates the necessary Makefile definitions:
+ % make tidy # if you have left-over files from a previus build
% make makefiles CCARGS=-DUSE_SASL_AUTH" -I/usr/local/include" \
AUXLIBS="-L/usr/local/lib -lsasl"
On Solaris 2.x you need to specify run-time link information,
otherwise ld.so will not find the SASL shared library:
+ % make tidy # if you have left-over files from a previus build
% make makefiles CCARGS=-DUSE_SASL_AUTH" -I/usr/local/include" \
AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lsasl"
bounce.o: ../include/vstring.h
bounce.o: ../include/vbuf.h
bounce.o: ../include/vstream.h
-bounce.o: ../include/binattr.h
bounce.o: ../include/stringops.h
bounce.o: ../include/mail_proto.h
bounce.o: ../include/iostuff.h
bounce_append_service.o: ../include/vstring.h
bounce_append_service.o: ../include/vbuf.h
bounce_append_service.o: ../include/vstream.h
-bounce_append_service.o: ../include/binattr.h
bounce_append_service.o: ../include/stringops.h
bounce_append_service.o: ../include/mail_queue.h
bounce_append_service.o: ../include/quote_822_local.h
bounce_cleanup.o: ../include/vbuf.h
bounce_cleanup.o: ../include/mail_queue.h
bounce_cleanup.o: ../include/vstream.h
-bounce_cleanup.o: ../include/binattr.h
bounce_cleanup.o: bounce_service.h
bounce_notify_service.o: bounce_notify_service.c
bounce_notify_service.o: ../include/sys_defs.h
bounce_notify_service.o: ../include/vstring.h
bounce_notify_service.o: ../include/vbuf.h
bounce_notify_service.o: ../include/vstream.h
-bounce_notify_service.o: ../include/binattr.h
bounce_notify_service.o: ../include/vstring_vstream.h
bounce_notify_service.o: ../include/mymalloc.h
bounce_notify_service.o: ../include/stringops.h
bounce_recip_service.o: ../include/vstring.h
bounce_recip_service.o: ../include/vbuf.h
bounce_recip_service.o: ../include/vstream.h
-bounce_recip_service.o: ../include/binattr.h
bounce_recip_service.o: ../include/vstring_vstream.h
bounce_recip_service.o: ../include/mymalloc.h
bounce_recip_service.o: ../include/stringops.h
cleanup.o: ../include/vbuf.h
cleanup.o: ../include/dict.h
cleanup.o: ../include/vstream.h
-cleanup.o: ../include/binattr.h
cleanup.o: ../include/argv.h
cleanup.o: ../include/mail_conf.h
cleanup.o: ../include/cleanup_user.h
cleanup_api.o: ../include/cleanup_user.h
cleanup_api.o: ../include/mail_queue.h
cleanup_api.o: ../include/vstream.h
-cleanup_api.o: ../include/binattr.h
cleanup_api.o: ../include/mail_proto.h
cleanup_api.o: ../include/iostuff.h
cleanup_api.o: ../include/bounce.h
cleanup_envelope.o: ../include/vstring.h
cleanup_envelope.o: ../include/vbuf.h
cleanup_envelope.o: ../include/vstream.h
-cleanup_envelope.o: ../include/binattr.h
cleanup_envelope.o: ../include/mymalloc.h
cleanup_envelope.o: ../include/record.h
cleanup_envelope.o: ../include/rec_type.h
cleanup_extracted.o: ../include/vstring.h
cleanup_extracted.o: ../include/vbuf.h
cleanup_extracted.o: ../include/vstream.h
-cleanup_extracted.o: ../include/binattr.h
cleanup_extracted.o: ../include/argv.h
cleanup_extracted.o: ../include/mymalloc.h
cleanup_extracted.o: ../include/cleanup_user.h
cleanup_init.o: ../include/vstring.h
cleanup_init.o: ../include/vbuf.h
cleanup_init.o: ../include/vstream.h
-cleanup_init.o: ../include/binattr.h
cleanup_init.o: ../include/argv.h
cleanup_init.o: ../include/maps.h
cleanup_init.o: ../include/dict.h
cleanup_map11.o: ../include/vbuf.h
cleanup_map11.o: ../include/dict.h
cleanup_map11.o: ../include/vstream.h
-cleanup_map11.o: ../include/binattr.h
cleanup_map11.o: ../include/argv.h
cleanup_map11.o: ../include/mymalloc.h
cleanup_map11.o: ../include/cleanup_user.h
cleanup_map1n.o: ../include/vbuf.h
cleanup_map1n.o: ../include/dict.h
cleanup_map1n.o: ../include/vstream.h
-cleanup_map1n.o: ../include/binattr.h
cleanup_map1n.o: ../include/mail_addr_map.h
cleanup_map1n.o: ../include/maps.h
cleanup_map1n.o: ../include/cleanup_user.h
cleanup_masquerade.o: ../include/quote_822_local.h
cleanup_masquerade.o: cleanup.h
cleanup_masquerade.o: ../include/vstream.h
-cleanup_masquerade.o: ../include/binattr.h
cleanup_masquerade.o: ../include/maps.h
cleanup_masquerade.o: ../include/dict.h
cleanup_masquerade.o: ../include/been_here.h
cleanup_message.o: ../include/vstring.h
cleanup_message.o: ../include/vbuf.h
cleanup_message.o: ../include/vstream.h
-cleanup_message.o: ../include/binattr.h
cleanup_message.o: ../include/argv.h
cleanup_message.o: ../include/split_at.h
cleanup_message.o: ../include/mymalloc.h
cleanup_out.o: ../include/vstring.h
cleanup_out.o: ../include/vbuf.h
cleanup_out.o: ../include/vstream.h
-cleanup_out.o: ../include/binattr.h
cleanup_out.o: ../include/record.h
cleanup_out.o: ../include/rec_type.h
cleanup_out.o: ../include/cleanup_user.h
cleanup_out_recipient.o: ../include/vstring.h
cleanup_out_recipient.o: ../include/vbuf.h
cleanup_out_recipient.o: ../include/vstream.h
-cleanup_out_recipient.o: ../include/binattr.h
cleanup_out_recipient.o: ../include/maps.h
cleanup_out_recipient.o: ../include/dict.h
cleanup_out_recipient.o: ../include/tok822.h
cleanup_rewrite.o: ../include/quote_822_local.h
cleanup_rewrite.o: cleanup.h
cleanup_rewrite.o: ../include/vstream.h
-cleanup_rewrite.o: ../include/binattr.h
cleanup_rewrite.o: ../include/argv.h
cleanup_rewrite.o: ../include/maps.h
cleanup_rewrite.o: ../include/dict.h
cleanup_state.o: ../include/mail_params.h
cleanup_state.o: cleanup.h
cleanup_state.o: ../include/vstream.h
-cleanup_state.o: ../include/binattr.h
cleanup_state.o: ../include/maps.h
cleanup_state.o: ../include/dict.h
cleanup_state.o: ../include/tok822.h
test_dns_lookup.o: ../include/msg.h
test_dns_lookup.o: ../include/msg_vstream.h
test_dns_lookup.o: ../include/vstream.h
-test_dns_lookup.o: ../include/binattr.h
test_dns_lookup.o: dns.h
error.o: ../include/msg.h
error.o: ../include/vstream.h
error.o: ../include/vbuf.h
-error.o: ../include/binattr.h
error.o: ../include/deliver_request.h
error.o: ../include/vstring.h
error.o: ../include/recipient_list.h
debug_peer.c debug_process.c defer.c deliver_completed.c \
deliver_flock.c deliver_pass.c deliver_request.c domain_list.c \
dot_lockfile.c dot_lockfile_as.c ext_prop.c file_id.c \
- header_opts.c is_header.c mail_addr.c \
- mail_addr_crunch.c mail_addr_find.c mail_addr_map.c \
- mail_command_read.c mail_command_write.c mail_conf.c \
- mail_conf_bool.c mail_conf_int.c mail_conf_raw.c mail_conf_str.c \
- mail_connect.c mail_copy.c mail_date.c mail_error.c mail_flush.c \
- mail_open_ok.c mail_params.c mail_pathname.c mail_print.c \
- mail_queue.c mail_run.c mail_scan.c mail_scan_dir.c mail_stream.c \
- mail_task.c mail_trigger.c maps.c mark_corrupt.c mkmap_db.c \
- mkmap_dbm.c mkmap_open.c mynetworks.c mypwd.c namadr_list.c \
- off_cvt.c opened.c own_inet_addr.c peer_name.c pipe_command.c \
- post_mail.c quote_822_local.c rec_streamlf.c rec_type.c \
- recipient_list.c record.c remove.c resolve_clnt.c resolve_local.c \
- rewrite_clnt.c sent.c smtp_stream.c split_addr.c string_list.c \
- sys_exits.c timed_ipc.c tok822_find.c tok822_node.c tok822_parse.c \
+ header_opts.c is_header.c mail_addr.c mail_addr_crunch.c \
+ mail_addr_find.c mail_addr_map.c mail_command_read.c \
+ mail_command_write.c mail_conf.c mail_conf_bool.c mail_conf_int.c \
+ mail_conf_raw.c mail_conf_str.c mail_connect.c mail_copy.c \
+ mail_date.c mail_error.c mail_flush.c mail_open_ok.c mail_params.c \
+ mail_pathname.c mail_print.c mail_queue.c mail_run.c mail_scan.c \
+ mail_scan_dir.c mail_stream.c mail_task.c mail_trigger.c maps.c \
+ mark_corrupt.c mkmap_db.c mkmap_dbm.c mkmap_open.c mynetworks.c \
+ mypwd.c namadr_list.c off_cvt.c opened.c own_inet_addr.c \
+ peer_name.c pipe_command.c post_mail.c quote_821_local.c \
+ quote_822_local.c rec_streamlf.c rec_type.c recipient_list.c \
+ record.c remove.c resolve_clnt.c resolve_local.c rewrite_clnt.c \
+ sent.c smtp_stream.c split_addr.c string_list.c sys_exits.c \
+ timed_ipc.c tok822_find.c tok822_node.c tok822_parse.c \
tok822_resolve.c tok822_rewrite.c tok822_tree.c
OBJS = been_here.o bounce.o canon_addr.o cleanup_strerror.o clnt_stream.o \
debug_peer.o debug_process.o defer.o deliver_completed.o \
deliver_flock.o deliver_pass.o deliver_request.o domain_list.o \
dot_lockfile.o dot_lockfile_as.o ext_prop.o file_id.o \
- header_opts.o is_header.o mail_addr.o \
- mail_addr_crunch.o mail_addr_find.o mail_addr_map.o \
- mail_command_read.o mail_command_write.o mail_conf.o \
- mail_conf_bool.o mail_conf_int.o mail_conf_raw.o mail_conf_str.o \
- mail_connect.o mail_copy.o mail_date.o mail_error.o mail_flush.o \
- mail_open_ok.o mail_params.o mail_pathname.o mail_print.o \
- mail_queue.o mail_run.o mail_scan.o mail_scan_dir.o mail_stream.o \
- mail_task.o mail_trigger.o maps.o mark_corrupt.o mkmap_db.o \
- mkmap_dbm.o mkmap_open.o mynetworks.o mypwd.o namadr_list.o \
- off_cvt.o opened.o own_inet_addr.o peer_name.o pipe_command.o \
- post_mail.o quote_822_local.o rec_streamlf.o rec_type.o \
- recipient_list.o record.o remove.o resolve_clnt.o resolve_local.o \
- rewrite_clnt.o sent.o smtp_stream.o split_addr.o string_list.o \
- sys_exits.o timed_ipc.o tok822_find.o tok822_node.o tok822_parse.o \
+ header_opts.o is_header.o mail_addr.o mail_addr_crunch.o \
+ mail_addr_find.o mail_addr_map.o mail_command_read.o \
+ mail_command_write.o mail_conf.o mail_conf_bool.o mail_conf_int.o \
+ mail_conf_raw.o mail_conf_str.o mail_connect.o mail_copy.o \
+ mail_date.o mail_error.o mail_flush.o mail_open_ok.o mail_params.o \
+ mail_pathname.o mail_print.o mail_queue.o mail_run.o mail_scan.o \
+ mail_scan_dir.o mail_stream.o mail_task.o mail_trigger.o maps.o \
+ mark_corrupt.o mkmap_db.o mkmap_dbm.o mkmap_open.o mynetworks.o \
+ mypwd.o namadr_list.o off_cvt.o opened.o own_inet_addr.o \
+ peer_name.o pipe_command.o post_mail.o quote_821_local.o \
+ quote_822_local.o rec_streamlf.o rec_type.o recipient_list.o \
+ record.o remove.o resolve_clnt.o resolve_local.o rewrite_clnt.o \
+ sent.o smtp_stream.o split_addr.o string_list.o sys_exits.o \
+ timed_ipc.o tok822_find.o tok822_node.o tok822_parse.o \
tok822_resolve.o tok822_rewrite.o tok822_tree.o
HDRS = been_here.h bounce.h canon_addr.h cleanup_user.h clnt_stream.h \
config.h debug_peer.h debug_process.h defer.h deliver_completed.h \
deliver_flock.h deliver_pass.h deliver_request.h domain_list.h \
dot_lockfile.h dot_lockfile_as.h ext_prop.h file_id.h \
- header_opts.h is_header.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_error.h mail_flush.h mail_open_ok.h \
- mail_params.h mail_proto.h mail_queue.h mail_run.h mail_scan_dir.h \
- mail_stream.h mail_task.h mail_version.h maps.h mark_corrupt.h \
- mkmap.h mynetworks.h mypwd.h namadr_list.h off_cvt.h opened.h \
+ header_opts.h is_header.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_error.h mail_flush.h mail_open_ok.h mail_params.h \
+ mail_proto.h mail_queue.h mail_run.h mail_scan_dir.h mail_stream.h \
+ mail_task.h mail_version.h maps.h mark_corrupt.h mkmap.h \
+ mynetworks.h mypwd.h namadr_list.h off_cvt.h opened.h \
own_inet_addr.h peer_name.h pipe_command.h post_mail.h \
- quote_822_local.h rec_streamlf.h rec_type.h recipient_list.h \
- record.h resolve_clnt.h resolve_local.h rewrite_clnt.h sent.h \
- smtp_stream.h split_addr.h string_list.h sys_exits.h timed_ipc.h \
- tok822.h
+ quote_821_local.h quote_822_local.h rec_streamlf.h rec_type.h \
+ recipient_list.h record.h resolve_clnt.h resolve_local.h \
+ rewrite_clnt.h sent.h smtp_stream.h split_addr.h string_list.h \
+ sys_exits.h timed_ipc.h tok822.h
TESTSRC = rec2stream.c stream2rec.c recdump.c
WARN = -W -Wformat -Wimplicit -Wmissing-prototypes \
-Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
mail_addr_map mail_date maps mynetworks mypwd namadr_list \
off_cvt quote_822_local rec2stream recdump resolve_clnt \
- resolve_local rewrite_clnt stream2rec string_list tok822_parse
+ resolve_local rewrite_clnt stream2rec string_list tok822_parse \
+ quote_821_local
LIBS = ../lib/libutil.a
LIB_DIR = ../lib
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
mv junk $@.o
+quote_821_local: quote_821_local.c $(LIBS)
+ $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIBS) $(SYSLIBS)
+
tests: tok822_test
tok822_test: tok822_parse tok822_parse.in tok822_parse.ref
bounce.o: mail_params.h
bounce.o: mail_proto.h
bounce.o: ../include/vstream.h
-bounce.o: ../include/binattr.h
bounce.o: ../include/iostuff.h
bounce.o: defer.h
bounce.o: bounce.h
clnt_stream.o: ../include/mymalloc.h
clnt_stream.o: ../include/vstream.h
clnt_stream.o: ../include/vbuf.h
-clnt_stream.o: ../include/binattr.h
clnt_stream.o: ../include/events.h
clnt_stream.o: ../include/iostuff.h
clnt_stream.o: mail_proto.h
defer.o: ../include/vbuf.h
defer.o: mail_queue.h
defer.o: ../include/vstream.h
-defer.o: ../include/binattr.h
defer.o: mail_proto.h
defer.o: ../include/iostuff.h
defer.o: bounce.h
deliver_completed.o: ../include/msg.h
deliver_completed.o: ../include/vstream.h
deliver_completed.o: ../include/vbuf.h
-deliver_completed.o: ../include/binattr.h
deliver_completed.o: record.h
deliver_completed.o: ../include/vstring.h
deliver_completed.o: rec_type.h
deliver_pass.o: ../include/vstring.h
deliver_pass.o: ../include/vbuf.h
deliver_pass.o: ../include/vstream.h
-deliver_pass.o: ../include/binattr.h
deliver_pass.o: deliver_pass.h
deliver_pass.o: deliver_request.h
deliver_pass.o: recipient_list.h
deliver_request.o: ../include/msg.h
deliver_request.o: ../include/vstream.h
deliver_request.o: ../include/vbuf.h
-deliver_request.o: ../include/binattr.h
deliver_request.o: ../include/vstring.h
deliver_request.o: ../include/mymalloc.h
deliver_request.o: ../include/iostuff.h
mail_addr_find.o: ../include/dict.h
mail_addr_find.o: ../include/vstream.h
mail_addr_find.o: ../include/vbuf.h
-mail_addr_find.o: ../include/binattr.h
mail_addr_find.o: ../include/argv.h
mail_addr_find.o: ../include/stringops.h
mail_addr_find.o: ../include/vstring.h
mail_addr_map.o: ../include/vbuf.h
mail_addr_map.o: ../include/dict.h
mail_addr_map.o: ../include/vstream.h
-mail_addr_map.o: ../include/binattr.h
mail_addr_map.o: ../include/argv.h
mail_addr_map.o: ../include/mymalloc.h
mail_addr_map.o: mail_addr_find.h
mail_command_read.o: ../include/vstring.h
mail_command_read.o: ../include/vbuf.h
mail_command_read.o: ../include/vstream.h
-mail_command_read.o: ../include/binattr.h
mail_command_read.o: mail_proto.h
mail_command_read.o: ../include/iostuff.h
mail_command_write.o: mail_command_write.c
mail_command_write.o: ../include/sys_defs.h
mail_command_write.o: ../include/vstream.h
mail_command_write.o: ../include/vbuf.h
-mail_command_write.o: ../include/binattr.h
mail_command_write.o: mail_proto.h
mail_command_write.o: ../include/iostuff.h
mail_conf.o: mail_conf.c
mail_conf.o: ../include/mymalloc.h
mail_conf.o: ../include/vstream.h
mail_conf.o: ../include/vbuf.h
-mail_conf.o: ../include/binattr.h
mail_conf.o: ../include/vstring.h
mail_conf.o: ../include/dict.h
mail_conf.o: ../include/argv.h
mail_conf_bool.o: ../include/dict.h
mail_conf_bool.o: ../include/vstream.h
mail_conf_bool.o: ../include/vbuf.h
-mail_conf_bool.o: ../include/binattr.h
mail_conf_bool.o: ../include/argv.h
mail_conf_bool.o: mail_conf.h
mail_conf_int.o: mail_conf_int.c
mail_conf_int.o: ../include/dict.h
mail_conf_int.o: ../include/vstream.h
mail_conf_int.o: ../include/vbuf.h
-mail_conf_int.o: ../include/binattr.h
mail_conf_int.o: ../include/argv.h
mail_conf_int.o: ../include/stringops.h
mail_conf_int.o: ../include/vstring.h
mail_connect.o: ../include/msg.h
mail_connect.o: ../include/vstream.h
mail_connect.o: ../include/vbuf.h
-mail_connect.o: ../include/binattr.h
mail_connect.o: ../include/connect.h
mail_connect.o: ../include/iostuff.h
mail_connect.o: ../include/mymalloc.h
mail_copy.o: ../include/htable.h
mail_copy.o: ../include/vstream.h
mail_copy.o: ../include/vbuf.h
-mail_copy.o: ../include/binattr.h
mail_copy.o: ../include/vstring.h
mail_copy.o: ../include/vstring_vstream.h
mail_copy.o: ../include/stringops.h
mail_flush.o: mail_proto.h
mail_flush.o: ../include/vstream.h
mail_flush.o: ../include/vbuf.h
-mail_flush.o: ../include/binattr.h
mail_flush.o: ../include/iostuff.h
mail_flush.o: mail_flush.h
mail_open_ok.o: mail_open_ok.c
mail_open_ok.o: ../include/vstring.h
mail_open_ok.o: ../include/vbuf.h
mail_open_ok.o: ../include/vstream.h
-mail_open_ok.o: ../include/binattr.h
mail_open_ok.o: mail_open_ok.h
mail_params.o: mail_params.c
mail_params.o: ../include/sys_defs.h
mail_pathname.o: ../include/vbuf.h
mail_pathname.o: mail_proto.h
mail_pathname.o: ../include/vstream.h
-mail_pathname.o: ../include/binattr.h
mail_pathname.o: ../include/iostuff.h
mail_print.o: mail_print.c
mail_print.o: ../include/sys_defs.h
mail_print.o: ../include/mymalloc.h
mail_print.o: ../include/vstream.h
mail_print.o: ../include/vbuf.h
-mail_print.o: ../include/binattr.h
mail_print.o: mail_proto.h
mail_print.o: ../include/iostuff.h
mail_queue.o: mail_queue.c
mail_queue.o: ../include/vstring.h
mail_queue.o: ../include/vbuf.h
mail_queue.o: ../include/vstream.h
-mail_queue.o: ../include/binattr.h
mail_queue.o: ../include/mymalloc.h
mail_queue.o: ../include/argv.h
mail_queue.o: ../include/dir_forest.h
mail_scan.o: ../include/vstring.h
mail_scan.o: ../include/vbuf.h
mail_scan.o: ../include/vstream.h
-mail_scan.o: ../include/binattr.h
mail_scan.o: ../include/vstring_vstream.h
mail_scan.o: ../include/mymalloc.h
mail_scan.o: mail_proto.h
mail_stream.o: ../include/vstring.h
mail_stream.o: ../include/vbuf.h
mail_stream.o: ../include/vstream.h
-mail_stream.o: ../include/binattr.h
mail_stream.o: ../include/stringops.h
mail_stream.o: cleanup_user.h
mail_stream.o: mail_proto.h
mail_trigger.o: mail_proto.h
mail_trigger.o: ../include/vstream.h
mail_trigger.o: ../include/vbuf.h
-mail_trigger.o: ../include/binattr.h
mail_version.o: mail_version.c
maps.o: maps.c
maps.o: ../include/sys_defs.h
maps.o: ../include/dict.h
maps.o: ../include/vstream.h
maps.o: ../include/vbuf.h
-maps.o: ../include/binattr.h
maps.o: ../include/stringops.h
maps.o: ../include/vstring.h
maps.o: ../include/split_at.h
mark_corrupt.o: ../include/msg.h
mark_corrupt.o: ../include/vstream.h
mark_corrupt.o: ../include/vbuf.h
-mark_corrupt.o: ../include/binattr.h
mark_corrupt.o: mail_queue.h
mark_corrupt.o: ../include/vstring.h
mark_corrupt.o: mark_corrupt.h
mkmap_db.o: ../include/vbuf.h
mkmap_db.o: ../include/dict.h
mkmap_db.o: ../include/vstream.h
-mkmap_db.o: ../include/binattr.h
mkmap_db.o: ../include/argv.h
mkmap_db.o: ../include/dict_db.h
mkmap_db.o: mkmap.h
mkmap_dbm.o: ../include/vbuf.h
mkmap_dbm.o: ../include/dict.h
mkmap_dbm.o: ../include/vstream.h
-mkmap_dbm.o: ../include/binattr.h
mkmap_dbm.o: ../include/argv.h
mkmap_dbm.o: ../include/dict_dbm.h
mkmap_dbm.o: mkmap.h
mkmap_open.o: ../include/dict.h
mkmap_open.o: ../include/vstream.h
mkmap_open.o: ../include/vbuf.h
-mkmap_open.o: ../include/binattr.h
mkmap_open.o: ../include/argv.h
mkmap_open.o: ../include/sigdelay.h
mkmap_open.o: ../include/mymalloc.h
pipe_command.o: ../include/msg.h
pipe_command.o: ../include/vstream.h
pipe_command.o: ../include/vbuf.h
-pipe_command.o: ../include/binattr.h
pipe_command.o: ../include/vstring.h
pipe_command.o: ../include/stringops.h
pipe_command.o: ../include/iostuff.h
post_mail.o: ../include/msg.h
post_mail.o: ../include/vstream.h
post_mail.o: ../include/vbuf.h
-post_mail.o: ../include/binattr.h
post_mail.o: ../include/vstring.h
post_mail.o: mail_params.h
post_mail.o: record.h
post_mail.o: cleanup_user.h
post_mail.o: post_mail.h
post_mail.o: mail_date.h
+quote_821_local.o: quote_821_local.c
+quote_821_local.o: ../include/sys_defs.h
+quote_821_local.o: ../include/vstring.h
+quote_821_local.o: ../include/vbuf.h
+quote_821_local.o: quote_821_local.h
quote_822_local.o: quote_822_local.c
quote_822_local.o: ../include/sys_defs.h
quote_822_local.o: ../include/vstring.h
rec2stream.o: ../include/vstring.h
rec2stream.o: ../include/vbuf.h
rec2stream.o: ../include/vstream.h
-rec2stream.o: ../include/binattr.h
rec2stream.o: record.h
rec2stream.o: rec_streamlf.h
rec2stream.o: rec_type.h
rec_streamlf.o: ../include/vstring.h
rec_streamlf.o: ../include/vbuf.h
rec_streamlf.o: ../include/vstream.h
-rec_streamlf.o: ../include/binattr.h
rec_streamlf.o: record.h
rec_streamlf.o: rec_type.h
rec_streamlf.o: rec_streamlf.h
recdump.o: ../include/msg_vstream.h
recdump.o: ../include/vstream.h
recdump.o: ../include/vbuf.h
-recdump.o: ../include/binattr.h
recdump.o: record.h
recdump.o: ../include/vstring.h
recdump.o: rec_streamlf.h
record.o: ../include/mymalloc.h
record.o: ../include/vstream.h
record.o: ../include/vbuf.h
-record.o: ../include/binattr.h
record.o: ../include/vstring.h
record.o: record.h
remove.o: remove.c
resolve_clnt.o: ../include/msg.h
resolve_clnt.o: ../include/vstream.h
resolve_clnt.o: ../include/vbuf.h
-resolve_clnt.o: ../include/binattr.h
resolve_clnt.o: ../include/vstring.h
resolve_clnt.o: ../include/vstring_vstream.h
resolve_clnt.o: ../include/events.h
rewrite_clnt.o: ../include/vstring.h
rewrite_clnt.o: ../include/vbuf.h
rewrite_clnt.o: ../include/vstream.h
-rewrite_clnt.o: ../include/binattr.h
rewrite_clnt.o: ../include/vstring_vstream.h
rewrite_clnt.o: ../include/events.h
rewrite_clnt.o: ../include/iostuff.h
smtp_stream.o: ../include/vstring.h
smtp_stream.o: ../include/vbuf.h
smtp_stream.o: ../include/vstream.h
-smtp_stream.o: ../include/binattr.h
smtp_stream.o: ../include/vstring_vstream.h
smtp_stream.o: ../include/msg.h
smtp_stream.o: ../include/iostuff.h
stream2rec.o: ../include/sys_defs.h
stream2rec.o: ../include/vstream.h
stream2rec.o: ../include/vbuf.h
-stream2rec.o: ../include/binattr.h
stream2rec.o: ../include/vstring.h
stream2rec.o: record.h
stream2rec.o: rec_streamlf.h
timed_ipc.o: ../include/msg.h
timed_ipc.o: ../include/vstream.h
timed_ipc.o: ../include/vbuf.h
-timed_ipc.o: ../include/binattr.h
timed_ipc.o: mail_params.h
timed_ipc.o: timed_ipc.h
tok822_find.o: tok822_find.c
extern int var_smtp_quit_tmout;
#define VAR_SMTP_SKIP_4XX "smtp_skip_4xx_greeting"
-#define DEF_SMTP_SKIP_4XX 0
+#define DEF_SMTP_SKIP_4XX 1
extern bool var_smtp_skip_4xx_greeting;
#define VAR_SMTP_SKIP_5XX "smtp_skip_5xx_greeting"
-#define DEF_SMTP_SKIP_5XX 0
+#define DEF_SMTP_SKIP_5XX 1
extern bool var_smtp_skip_5xx_greeting;
#define VAR_IGN_MX_LOOKUP_ERR "ignore_mx_lookup_error"
* Version of this program.
*/
#define VAR_MAIL_VERSION "mail_version"
-#define DEF_MAIL_VERSION "Snapshot-20000505"
+#define DEF_MAIL_VERSION "Snapshot-20000506"
extern char *var_mail_version;
/* LICENSE
void smtp_timeout_setup(VSTREAM *stream, int maxtime)
{
-
- /*
- * Stick your TLS/whatever read-write routines here. Notice that the
- * read/write interface now includes a timeout parameter and application
- * context, and that a read/write routine is supposed to set errno to
- * ETIMEDOUT when the alarm clock goes off.
- */
vstream_control(stream,
VSTREAM_CTL_DOUBLE,
VSTREAM_CTL_TIMEOUT, maxtime,
vstream_printf("%*s %s\n", indent, "", "group \":\"");
} else {
vstream_printf("%*s %s \"%s\"\n", indent, "",
- tp->type == TOK822_COMMENT_TEXT ? "comment text" :
+ tp->type == TOK822_COMMENT_TEXT ? "text" :
tp->type == TOK822_ATOM ? "atom" :
tp->type == TOK822_QSTRING ? "quoted string" :
tp->type == TOK822_DOMLIT ? "domain literal" :
}
vstring_free(vp);
vstring_free(buf);
+ return (0);
}
#endif
lmtp - Postfix local delivery via LMTP
<b>SYNOPSIS</b>
- <b>lmtp</b> [generic Postfix daemon options] [server attributes...]
+ <b>lmtp</b> [generic Postfix daemon options]
<b>DESCRIPTION</b>
The LMTP client processes message delivery requests from
(mail exchanger) lookups since those are defined only for
SMTP.
-<b>SERVER</b> <b>ATTRIBUTE</b> <b>SYNTAX</b>
- The server attributes are given in the <b>master.cf</b> file at
- the end of a service definition. The syntax is as fol-
- lows:
-
- <b>server=</b><i>host</i>
-
- <b>server=</b><i>host</i><b>:</b><i>port</i>
-
- <b>server=[</b><i>ipaddr</i><b>]</b>
-
- <b>server=[</b><i>ipaddr</i><b>]:</b><i>port</i>
- Connect to the specified host or IP address and TCP
- port (default: the <b>lmtp</b> port as specified in the
- <b>services</b> database).
-
-
<b>SECURITY</b>
The LMTP client is moderately security-sensitive. It talks
to LMTP servers and to DNS servers on the network. The
<a href="http://www.faqs.org/rfcs/rfc821.html">RFC 821</a> (SMTP protocol)
<a href="http://www.faqs.org/rfcs/rfc1651.html">RFC 1651</a> (SMTP service extensions)
<a href="http://www.faqs.org/rfcs/rfc1870.html">RFC 1870</a> (Message Size Declaration)
-
-
-
- 1
-
-
-
-
-
-LMTP(8) LMTP(8)
-
-
<a href="http://www.faqs.org/rfcs/rfc2033.html">RFC 2033</a> (LMTP protocol)
<a href="http://www.faqs.org/rfcs/rfc2197.html">RFC 2197</a> (Pipelining)
The following <b>main.cf</b> parameters are especially relevant
to this program. See the Postfix <b>main.cf</b> file for syntax
details and for default values. Use the <b>postfix</b> <b>reload</b>
+
+
+
+ 1
+
+
+
+
+
+LMTP(8) LMTP(8)
+
+
command after a configuration change.
<b>Miscellaneous</b>
The effectiveness of cached connections will be
determined by the number of LMTP servers in use,
and the concurrency limit specified for the LMTP
-
-
-
- 2
-
-
-
-
-
-LMTP(8) LMTP(8)
-
-
client. Cached connections are closed under any of
the following conditions:
<b>o</b> Upon the onset of another delivery request,
the LMTP server associated with the current
+
+
+
+ 2
+
+
+
+
+
+LMTP(8) LMTP(8)
+
+
session does not respond to the <b>RSET</b> com-
mand.
LMTP server. If no connection can be made within
the deadline, the message is deferred.
-
-
- 3
-
-
-
-
-
-LMTP(8) LMTP(8)
-
-
<b>lmtp</b><i>_</i><b>lhlo</b><i>_</i><b>timeout</b>
Timeout in seconds for sending the <b>LHLO</b> command,
and for receiving the server response.
Timeout in seconds for sending the <b>DATA</b> command,
and for receiving the server response.
+
+
+
+ 3
+
+
+
+
+
+LMTP(8) LMTP(8)
+
+
<b>lmtp</b><i>_</i><b>data</b><i>_</i><b>xfer</b><i>_</i><b>timeout</b>
Timeout in seconds for sending the message content.
Alterations for LMTP by:
Philip A. Prindeville
-
-
-
- 4
-
-
-
-
-
-LMTP(8) LMTP(8)
-
-
Mirapoint, Inc.
USA.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
+ 4
</pre> </body> </html>
+++ /dev/null
-2000 Feb 23
-
-* lmtp.c, lmtp_connect.c, global-patch: added the main.cf
- configuration parameter "lmtp_tcp_port". If no port is explicitly
- specificed for the connection to the inet LMTP server, first
- lookup "lmtp" with getservbyname. If that fails, use the value of
- this "lmtp_tcp_port" parameter, which as a default value of 24.
-
-
-2000 Feb 21
-
-* Updated lmtp.c to yield a lmtp.8 man page that more accurately
- reflects the current code.
-
-* Created man-patch so that lmtp.8 man page is created. Updated
- README to include applying this patch.
-
-
-2000 Feb 17
-
-* Correctly handle lmtp master.cf arguments of type "inet".
- Possible uses are:
-
- _USAGE_ _MEANING_
- serv=inet: connect over tcp to $nexthop
- serv=inet:hostname connect to named host port 24
- (Actually, what "lmtp" is defined to be
- in /etc/services.)
- serv=inet:hostname:port connect to named host named port
- serv=inet:[ip.address] connect to named host port 24
- serv=inet:[ip.address]:port connect to named address named port
-
-
-2000 Feb 15
-
-* Put in comment about local_destination_recipient_limit
- in README.local.
-
-* In lmtp_chat.c, changed error reporting so that it goes
- to var_error_rcpt, like the other Postfix services.
-
-
-2000 Jan 31
-
-* lmtp_proto.c:lmtp_lhlo: Don't worry about LMTP_FEATURE_PIPELINING
- for sessions of type LMTP_SERV_TYPE_UNIX.
-
-
-2000 Jan 30
-
-* BIG changes. Removed all the pipe stuff from lmtp.c and
- lmtp_connect.c Now, lmtp will either do a remote connection much
- like the smtp client, or it will connect to a UNIX domain socket
- to an auxiliary service (spawn). This makes the lmtp patch
- simpler because it doesn't have to worry at all about exec-ing an
- external command, and all the resulting security implications.
- See README.local for details.
-
- NOTE: postfix-19991231-pl04 is REQUIRED for this to work!
- (Need the "spawn" service.)
-
-* Updated the makefile-patch for postfix-19991231-pl03.
-
-* lmtp.h: changed the LMTP_ATTR structure to contain "type", "class", and
- "name" fields, reflecting the change from the pipe mechanism to
- the local sockets connection. Changed LMTP_SESSION to contain the
- "type" field. The connection type is recorded in this field in
- case it is needed elsewhere, like in lmtp_proto.
-
-* lmtp.c:get_service_attr altered for new command syntax. Examples:
-
- serv=unix:private/lmtpd
- serv=inet:public/lmtpd
-
- After `serv=' is the "type", followed by `:', then the "class",
- followed by '/', and then finally the "name".
-
-* Added SAME_DESTINATION macro to lmtp.c:deliver_message for
- readability, and simpler logic.
-
-* lmtp_connect.c: changed lmtp_connect to contain logic to determine
- just what kind of connection to make, removing it from lmtp.c;
- removed lmtp_connect_pipe; and added lmtp_connect_local, which
- uses mail_connect_wait to connect to the service running the LMTP
- server (spawn). In lmtp_connect, the connection type stored in
- attr.type is saved into session.type, so it can be used later if
- necessary.
-
-* lmtp_proto.c:lmtp_lhlo: towards the end of this function we check
- to see if service->type is LMTP_SERV_TYPE_UNIX so that we don't
- try to do a getsockopt on a descriptor that doesn't support it.
- Is this the best way to handle this? Or maybe we should just try
- it and if it bombs, check the error code before simply going
- fatal?
-
-* Snagged the latest quota_821_local.c from the smtp client.
-
-* Updated the README files accordingly.
-
-
-2000 Jan 28
-
-* Well, wondering about using REWRITE_ADDRESS in lmtp_proto.c,
- putting the lowercase thing in there. Though, that would also
- apply to sender address. Is that okay?
-
-* We shouldn't be doing DNS lookups at this stage, so can get rid
- of lmtp_unalias.c. Also cut out the unalias portion in
- REWRITE_ADDRESS in lmtp_proto.c
-
-
-2000 Jan 11
-
-* At the suggestion of Rupa Schomaker, added the following to
- lmtp_proto.c:
-
- lowercase(rcpt->address); /* [AAG] rupa */
-
-
-1999 Dec 1 (or thereabouts)
-
-* Added lmtp_session_reset to make it easier to remember to reset
- certain things to 0. Did this to lmtp_chat_reset too.
-
-* Finally, did some work with the connection caching so that an RSET
- is sent to the LMTP server. This is done for two reasons: first,
- to tell the LMTP server to flush out any status information
- because we're about to feed it another message, and second, to
- test the link to see if it is still alive. If the link has died
- for some reason, it is reestablished. Changes to lmtp.c and
- lmtp_proto.c.
-
-* There was also some tidying in lmtp.c so that things were a little
- clearer as to what was going on. I added a few more comments as
- well.
-
-* I tried to make the master.cf argument parsing a little more
- consistent with the other Postfix services. Changes to lmtp.c.
-
-* On the postfix-users mailing list, Valery Brasseur pointed out that
- errors encountered during LMTP delivery were not getting bounced
- as appropriate. This lead me to investigate the matter, wanting
- to put this LMTP capability into service myself. I then realized
- that some of the error checking was a tad over zealous, and so
- simplified things a bit in lmtp_proto.c.
-
SHELL = /bin/sh
-SRCS = lmtp.c quote_821_local.c lmtp_connect.c lmtp_proto.c lmtp_chat.c \
- lmtp_session.c lmtp_addr.c lmtp_trouble.c lmtp_state.c
-OBJS = lmtp.o quote_821_local.o lmtp_connect.o lmtp_proto.o lmtp_chat.o \
- lmtp_session.o lmtp_addr.o lmtp_trouble.o lmtp_state.o
+SRCS = lmtp.c lmtp_connect.c lmtp_proto.c lmtp_chat.c lmtp_session.c \
+ lmtp_addr.c lmtp_trouble.c lmtp_state.c
+OBJS = lmtp.o lmtp_connect.o lmtp_proto.o lmtp_chat.o lmtp_session.o \
+ lmtp_addr.o lmtp_trouble.o lmtp_state.o
HDRS = lmtp.h
TESTSRC =
WARN = -W -Wformat -Wimplicit -Wmissing-prototypes \
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
Makefile: Makefile.in
- (set -e; echo "# DO NOT EDIT"; $(OPTS) sh ../makedefs; cat $?) >$@
+ (set -e; echo "# DO NOT EDIT"; $(OPTS) $(SHELL) ../makedefs; cat $?) >$@
test: $(TESTPROG)
lmtp.o: ../include/dict.h
lmtp.o: ../include/vstream.h
lmtp.o: ../include/vbuf.h
-lmtp.o: ../include/binattr.h
lmtp.o: ../include/argv.h
lmtp.o: ../include/msg.h
lmtp.o: ../include/mymalloc.h
lmtp_addr.o: ../include/dns.h
lmtp_addr.o: lmtp.h
lmtp_addr.o: ../include/vstream.h
-lmtp_addr.o: ../include/binattr.h
lmtp_addr.o: ../include/argv.h
lmtp_addr.o: ../include/deliver_request.h
lmtp_addr.o: ../include/recipient_list.h
lmtp_chat.o: ../include/vstring.h
lmtp_chat.o: ../include/vbuf.h
lmtp_chat.o: ../include/vstream.h
-lmtp_chat.o: ../include/binattr.h
lmtp_chat.o: ../include/argv.h
lmtp_chat.o: ../include/stringops.h
lmtp_chat.o: ../include/line_wrap.h
lmtp_connect.o: ../include/msg.h
lmtp_connect.o: ../include/vstream.h
lmtp_connect.o: ../include/vbuf.h
-lmtp_connect.o: ../include/binattr.h
lmtp_connect.o: ../include/vstring.h
lmtp_connect.o: ../include/split_at.h
lmtp_connect.o: ../include/mymalloc.h
lmtp_proto.o: ../include/vstring.h
lmtp_proto.o: ../include/vbuf.h
lmtp_proto.o: ../include/vstream.h
-lmtp_proto.o: ../include/binattr.h
lmtp_proto.o: ../include/vstring_vstream.h
lmtp_proto.o: ../include/stringops.h
lmtp_proto.o: ../include/mymalloc.h
lmtp_proto.o: ../include/mark_corrupt.h
lmtp_proto.o: lmtp.h
lmtp_proto.o: ../include/argv.h
-lmtp_proto.o: quote_821_local.h
+lmtp_proto.o: ../include/quote_821_local.h
lmtp_session.o: lmtp_session.c
lmtp_session.o: ../include/sys_defs.h
lmtp_session.o: ../include/mymalloc.h
lmtp_session.o: ../include/vstream.h
lmtp_session.o: ../include/vbuf.h
-lmtp_session.o: ../include/binattr.h
+lmtp_session.o: ../include/stringops.h
+lmtp_session.o: ../include/vstring.h
lmtp_session.o: ../include/debug_peer.h
lmtp_session.o: lmtp.h
-lmtp_session.o: ../include/vstring.h
lmtp_session.o: ../include/argv.h
lmtp_session.o: ../include/deliver_request.h
lmtp_session.o: ../include/recipient_list.h
lmtp_state.o: ../include/vstring.h
lmtp_state.o: ../include/vbuf.h
lmtp_state.o: ../include/vstream.h
-lmtp_state.o: ../include/binattr.h
lmtp_state.o: ../include/config.h
lmtp_state.o: ../include/mail_conf.h
lmtp_state.o: lmtp.h
lmtp_trouble.o: ../include/mymalloc.h
lmtp_trouble.o: ../include/smtp_stream.h
lmtp_trouble.o: ../include/vstream.h
-lmtp_trouble.o: ../include/binattr.h
lmtp_trouble.o: ../include/deliver_request.h
lmtp_trouble.o: ../include/recipient_list.h
lmtp_trouble.o: ../include/deliver_completed.h
lmtp_trouble.o: ../include/name_mask.h
lmtp_trouble.o: lmtp.h
lmtp_trouble.o: ../include/argv.h
-quote_821_local.o: quote_821_local.c
-quote_821_local.o: ../include/sys_defs.h
-quote_821_local.o: ../include/vstring.h
-quote_821_local.o: ../include/vbuf.h
-quote_821_local.o: quote_821_local.h
+++ /dev/null
-README
-
-The starting point for this work was the original LMTP patch,
-lmtp-19990427.tar.gz, found in the experimental directory on the
-Postfix mirror ftp sites. Without this original work by Philip A.
-Prindeville, I probably wouldn't have taken the time to dive into
-this issue. Fortunately, this individual's work gave me a good
-starting point to learn about LMTP, and Postfix in general.
-
-First, in the Postfix source directory, apply the following patches:
-
- patch -p0 < lmtp/makefile-patch
- patch -p0 < lmtp/global-patch
- patch -p0 < lmtp/man-patch
-
-Then compile and install Postfix as usual. There really isn't
-anything OS specific so it should compile without problems.
-
-NOTE: Previously this patch would do a pipe to an external command
- to perform local delivery. That is no longer the case! This
- version now requires the "spawn" service be defined. See
- README.local for details.
-
-The other way to use this lmtp service is to talk to a remote LMTP
-server. An example of this would be if an MX host is to insert
-incoming mail directly into a message store that supports the LMTP
-protocol. This is described in README.inet.
-
-The file CHANGES lists some of the changes that have been made
-since lmtp-19990427.tar.gz, and TODO discusses some thoughts
-that are currently floating around.
-
-Amos
-
+++ /dev/null
-README.inet
-
-This is an example of how to set up a remote LMTP server. This can
-be useful if you have a central/firewall mail router that feeds
-incoming mail into the appropriate inbox server(s), the central box
-can stuff the incoming mail directly into the message store on the
-inbox machine using LMTP. This also means the inbox machine doesn't
-have to have a SMTP server to handle this intermediate step. Tidy
-all the way around.
-
-
-** Inbox Server:
-
-On the inbox server, in this case a CMU Cyrus imapd/popd server, add
-the following to /etc/services:
-
-pop3 110/tcp # Cyrus POP3
-imap 143/tcp # Cyrus IMAP4
-lmtp 24/tcp
-
-
-Next, put the following in /etc/inetd.conf:
-
-lmtp stream tcp nowait cyrus /usr/sbin/tcpd /usr/local/cyrus/bin/deliver -e -l
-
-
-(/usr/sbin/tcpd is from the tcp_wrappers package. You want this to
-make sure only your central box can do the stuffing.)
-
-
-** Central Server:
-
-Similar changes to /etc/services:
-
-lmtp 24/tcp
-
-
-Now we add this to /etc/postfix/master.cf:
-
-lmtp unix - - n - - lmtp
-
-
-NOTES: No arguments are specified to lmtp!
- Root privs are not necessary!
-
-We put this in /etc/postfix/transport:
-
-inbox.domain.org lmtp:inbox.domain.org
-
-
-Naturally, this means we also have to have in
-/etc/postfix/main.cf:
-
-transport_maps = hash:/etc/postfix/transport
-
-
-Use the map type of your choice.
-
-That's it.
-
-
-Oh, it may be necessary to apply the following patch to deliver so
-that the final "bye" is not lost. This should not be necessary in
-releases subsequent to 1.6.20 of cyrus-imapd.
-
-*** deliver.c._orig Tue Dec 21 11:12:47 1999
---- deliver.c Wed Dec 22 20:12:54 1999
-***************
-*** 1753,1758 ****
---- 1753,1759 ----
- case 'Q':
- if (!strcasecmp(buf, "quit")) {
- prot_printf(deliver_out,"221 2.0.0 bye\r\n");
-+ prot_flush(deliver_out);
- exit(0);
- }
- goto syntaxerr;
-
-
-
+# script to compare common code between smtp and lmtp
+
sed '
s/SMTP/LMTP/g
s/smtp/lmtp/g
/* SUMMARY
/* Postfix local delivery via LMTP
/* SYNOPSIS
-/* \fBlmtp\fR [generic Postfix daemon options] [server attributes...]
+/* \fBlmtp\fR [generic Postfix daemon options]
/* DESCRIPTION
/* The LMTP client processes message delivery requests from
/* the queue manager. Each request specifies a queue file, a sender
/* service is found, the \fBlmtp_tcp_port\fR configuration parameter
/* (default value of 24) will be used. The LMTP client does not perform
/* MX (mail exchanger) lookups since those are defined only for SMTP.
-/* SERVER ATTRIBUTE SYNTAX
-/* .ad
-/* .fi
-/* The server attributes are given in the \fBmaster.cf\fR file at
-/* the end of a service definition. The syntax is as follows:
-/* .IP "\fBserver=\fR\fIhost\fR"
-/* .IP "\fBserver=\fR\fIhost\fR\fB:\fR\fIport\fR"
-/* .IP "\fBserver=[\fR\fIipaddr\fR\fB]\fR"
-/* .IP "\fBserver=[\fR\fIipaddr\fR\fB]:\fR\fIport\fR"
-/* Connect to the specified host or IP address and TCP port (default: the
-/* \fBlmtp\fR port as specified in the \fBservices\fR database).
-/* .PP
/* SECURITY
/* .ad
/* .fi
int lmtp_errno;
static LMTP_STATE *state = 0;
-/* get_service_attr - get command-line attributes */
-
-static void get_service_attr(LMTP_STATE *state, char **argv)
-{
- char *myname = "get_service_attr";
-
- /*
- * Iterate over the command-line attribute list.
- */
- if (msg_verbose)
- msg_info("%s: checking argv for lmtp server", myname);
-
- for ( /* void */ ; *argv != 0; argv++) {
-
- /*
- * Connect to a fixed LMTP server.
- */
- if (strncasecmp("server=", *argv, sizeof("server=") - 1) == 0) {
- state->fixed_dest = *argv + sizeof("server=") - 1;
- if (state->fixed_dest[0] == 0)
- msg_fatal("invalid destination: %s", *argv);
- }
-
- /*
- * Bad.
- */
- else
- msg_fatal("unknown attribute name: %s", *argv);
- }
-}
-
/* deliver_message - deliver message with extreme prejudice */
static int deliver_message(DELIVER_REQUEST *request, char **unused_argv)
{
char *myname = "deliver_message";
- char *destination;
VSTRING *why;
int result;
why = vstring_alloc(100);
state->request = request;
state->src = request->fp;
- destination = state->fixed_dest ? state->fixed_dest : request->nexthop;
/*
* See if we can reuse an existing connection.
/*
* Disconnect if we're going to a different destination. Discard
- * transcript and status information from sending QUIT.
+ * transcript and status information for sending QUIT.
*/
- if (strcasecmp(state->session->dest, destination) != 0) {
+ if (strcasecmp(state->session->dest, request->nexthop) != 0) {
lmtp_quit(state);
lmtp_chat_reset(state);
state->session = lmtp_session_free(state->session);
/*
* Disconnect if RSET can't be sent over an existing connection.
- * Discard transcript and status information from sending RSET.
+ * Discard transcript and status information for sending RSET.
*/
else if (lmtp_rset(state) != 0) {
lmtp_chat_reset(state);
/*
* Bounce or defer the recipients if no connection can be made.
*/
- if ((state->session = lmtp_connect(destination, why)) == 0) {
+ if ((state->session = lmtp_connect(request->nexthop, why)) == 0) {
lmtp_site_fail(state, lmtp_errno == LMTP_RETRY ? 450 : 550,
"%s", vstring_str(why));
}
lmtp_xfer(state);
/*
- * Optionally, notify the postmaster of problems.
+ * Optionally, notify the postmaster of problems with establishing a
+ * session or with delivering mail.
*/
if (state->history != 0
&& (state->error_mask & name_mask(mail_error_masks, var_notify_classes)))
/*
* Disconnect if we're not cacheing connections. The pipelined protocol
- * state machine knows to send QUIT as appropriate.
+ * state machine knows if it should have sent a QUIT command.
*/
- if (!var_lmtp_cache_conn && state->session != 0)
+ if (state->session != 0 && !var_lmtp_cache_conn)
state->session = lmtp_session_free(state->session);
/*
/* post_init - post-jail initialization */
-static void post_init(char *unused_name, char **argv)
+static void post_init(char *unused_name, char **unused_argv)
{
state = lmtp_state_alloc();
- get_service_attr(state, argv);
}
/* pre_init - pre-jail initialization */
int sndbufsize; /* total window size */
int sndbuffree; /* remaining window */
int reuse; /* connection being reused */
- char *fixed_dest; /* fixed remote server */
} LMTP_STATE;
#define LMTP_FEATURE_ESMTP (1<<0)
/*
* Append the addresses for this host to the address list.
*/
- switch (dns_lookup(host, T_A, 0, &addr, (VSTRING *) 0, why)) {
+ switch (dns_lookup(host, T_A, RES_DEFNAMES, &addr, (VSTRING *) 0, why)) {
case DNS_OK:
for (rr = addr; rr; rr = rr->next)
rr->pref = pref;
/*
/* lmtp_rset() sends a lone RSET command and waits for the response.
/*
-/* lmtp_quit() sends a lone QUIT command and waits for the response.
+/* lmtp_quit() sends a lone QUIT command and waits for the response
+/* only if waiting for QUIT replies is enabled.
/* DIAGNOSTICS
/* lmtp_lhlo(), lmtp_xfer(), lmtp_rset() and lmtp_quit() return 0 in
/* case of success, -1 in case of failure. For lmtp_xfer(), lmtp_rset()
/* lmtp_loop - the LMTP state machine */
-static int lmtp_loop(LMTP_STATE *state, int init_state)
+static int lmtp_loop(LMTP_STATE *state, int send_state, int recv_state)
{
char *myname = "lmtp_loop";
DELIVER_REQUEST *request = state->request;
int *survivors = 0;
int next_state;
int next_rcpt;
- int send_state;
- int recv_state;
int send_rcpt;
int recv_rcpt;
int nrcpt;
* LMTP dialog with RSET.
*/
nrcpt = 0;
- recv_state = send_state = init_state;
next_rcpt = send_rcpt = recv_rcpt = recv_dot = 0;
mail_from_rejected = 0;
sndbuffree = state->sndbufsize;
if (++recv_dot >= nrcpt) {
if (msg_verbose)
msg_info("%s: finished . command", myname);
- recv_state = var_lmtp_cache_conn ?
+ recv_state = var_lmtp_skip_quit_resp || var_lmtp_cache_conn ?
LMTP_STATE_LAST : LMTP_STATE_QUIT;
}
break;
* Ignore the RSET response.
*/
case LMTP_STATE_ABORT:
- recv_state = var_lmtp_cache_conn ?
+ recv_state = var_lmtp_skip_quit_resp || var_lmtp_cache_conn ?
LMTP_STATE_LAST : LMTP_STATE_QUIT;
break;
int lmtp_xfer(LMTP_STATE *state)
{
- return (lmtp_loop(state, LMTP_STATE_MAIL));
+ return (lmtp_loop(state, LMTP_STATE_MAIL, LMTP_STATE_MAIL));
}
-/* lmtp_rset - send a lone RSET command */
+/* lmtp_rset - send a lone RSET command and wait for response */
int lmtp_rset(LMTP_STATE *state)
{
- return (lmtp_loop(state, LMTP_STATE_RSET));
+ return (lmtp_loop(state, LMTP_STATE_RSET, LMTP_STATE_RSET));
}
/* lmtp_quit - send a lone QUIT command */
int lmtp_quit(LMTP_STATE *state)
{
- return (lmtp_loop(state, LMTP_STATE_QUIT));
+ return (lmtp_loop(state, LMTP_STATE_QUIT, var_lmtp_skip_quit_resp ?
+ LMTP_STATE_LAST : LMTP_STATE_QUIT));
}
state->sndbufsize = 0;
state->sndbuffree = 0;
state->reuse = 0;
- state->fixed_dest = 0;
return (state);
}
+++ /dev/null
-From wietse@porcupine.org Sat Apr 15 10:47:09 2000
-Return-Path: <wietse@porcupine.org>
-Delivered-To: wietse@hades.porcupine.org
-Received: from spike.porcupine.org (spike.porcupine.org [168.100.189.2])
- by hades.porcupine.org (Postfix) with ESMTP id 567DC18A54
- for <wietse@hades.porcupine.org>; Sat, 15 Apr 2000 10:47:09 -0400 (EDT)
-Received: by spike.porcupine.org (Postfix, from userid 100)
- id BE9C14563D; Sat, 15 Apr 2000 10:47:08 -0400 (EDT)
-Delivered-To: wietse@porcupine.org
-Received: from ns0.utdallas.edu (ns0.utdallas.edu [129.110.10.1])
- by spike.porcupine.org (Postfix) with ESMTP id E91E045630
- for <wietse@porcupine.org>; Sat, 15 Apr 2000 09:37:17 -0400 (EDT)
-Received: from spartacus.utdallas.edu (spartacus.utdallas.edu [129.110.3.11])
- by ns0.utdallas.edu (Postfix) with SMTP id 7D0601A00B9
- for <wietse@porcupine.org>; Sat, 15 Apr 2000 08:36:35 -0500 (CDT)
-To: Wietse Venema <wietse@porcupine.org>
-Subject: [Markku Järvinen <Markku.Jarvinen@tpo.fi>] postfix lmtp
-From: Amos Gouaux <amos@utdallas.edu>
-Date: 15 Apr 2000 08:37:54 -0500
-Message-ID: <q6m66tj32od.fsf@spartacus.utdallas.edu>
-Lines: 73
-User-Agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/21.1 (Bryce Canyon)
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="=-=-="
-Sender: wietse@porcupine.org
-Status: ROr
-
---=-=-=
-
-I suspect you've already dealt with this one during the merging, but
-forwarding in case not.
-
-I do recall one reason why I just inserted RSET into the state
-machine as I did--I wanted to check the response. Though, this is
-easily remedied by having a mini state machine in the lmtp_rset
-function.
-
-I guess I thought that having RSET in the state machine would be
-okay because of this:
-
- while ((rec_type = rec_get(state->src, state->scratch, 0)) > 0) {
- if (rec_type != REC_TYPE_NORM && rec_type != REC_TYPE_CONT)
- break;
- if (prev_type != REC_TYPE_CONT)
- if (vstring_str(state->scratch)[0] == '.')
- smtp_fputc('.', session->stream);
- if (rec_type == REC_TYPE_CONT)
- smtp_fwrite(vstring_str(state->scratch),
- VSTRING_LEN(state->scratch),
- session->stream);
- else
- smtp_fputs(vstring_str(state->scratch),
- VSTRING_LEN(state->scratch),
- session->stream);
- prev_type = rec_type;
- }
-
-Wouldn't this just suck in the entire message text, then put a '.'
-into the dialog? How would a RSET in the message text jumble up the
-state machine?
-
-Amos
-
-
-
---=-=-=
-Content-Type: message/rfc822; charset=""
-Content-Disposition: inline
-Content-Transfer-Encoding: quoted-printable
-
-Return-Path: <markku.jarvinen@tpo.fi>
-X-Sieve: cmu-sieve 1.3
-Received: from antivirus.tpo.fi (ns3.tpo.fi [212.63.10.250])
- by ns0.utdallas.edu (Postfix) with ESMTP id 0700019FFF2
- for <amos@utdallas.edu>; Fri, 14 Apr 2000 04:14:18 -0500 (CDT)
-Received: from ky.tpo.fi (localhost [127.0.0.1])
- by antivirus.tpo.fi (8.9.3/8.9.3) with ESMTP id MAA09192
- for <amos@utdallas.edu>; Fri, 14 Apr 2000 12:14:51 +0300 (EET DST)
-Rec=
-eived: from mtaj (home-f.ttk.tpo.fi [212.63.14.2])
- by ky.tpo.fi (Postfix) with SMTP id 801AFF568
- for <amos@utdallas.edu>; Fri, 14 Apr 2000 12:14:50 +0300 (EET DST)
-Mes=
-sage-ID: <05f601bfa5f1$bb2097c0$69fd1fac@ttk.tpo.fi>
-From: Markku J=E4rvinen <Markku.Jarvinen@tpo.fi>
-To: <amos@utdallas.edu>
-Subject: postfix lmtp
-Date: Fri, 14 Apr 2000 12:13:42 +0300
-MIME-Version: 1.0
-Content-Type: text/plain;
- charset=3D"iso-8859-1"
-Content-Transfer-Encoding: 7bit
-X-Priority: 3
-X-MSMail-Priority: Normal
-X-Mailer: Microsoft Outlook Express 5.00.2919.6600
-X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
-
-Hi!
-
-In line 349 of lmtp_proto.c you just print the sender into LMTP-transac=
-tion.
-vstring_sprintf(next_command, "MAIL FROM:<%s>", request->sender);
-This fails when the sender address has spaces in it, you should first r=
-un it
-through quota_821_local to get it into the right format for LMTP (same =
-as
-SMTP).
-
- - Markku
-
-
-
---=-=-=--
-
-
-
-
-From wietse@porcupine.org Sat Feb 26 09:17:05 2000
-Return-Path: <wietse@porcupine.org>
-Delivered-To: wietse@hades.porcupine.org
-Received: from spike.porcupine.org (spike.porcupine.org [168.100.189.2])
- by hades.porcupine.org (Postfix) with ESMTP id E0D7F1886D
- for <wietse@hades.porcupine.org>; Sat, 26 Feb 2000 09:17:04 -0500 (EST)
-Received: by spike.porcupine.org (Postfix, from userid 100)
- id A520145659; Sat, 26 Feb 2000 09:17:04 -0500 (EST)
-Delivered-To: wietse@porcupine.org
-Received: from ns0.utdallas.edu (ns0.utdallas.edu [129.110.10.1])
- by spike.porcupine.org (Postfix) with ESMTP id 5773F45657
- for <wietse@porcupine.org>; Fri, 25 Feb 2000 19:41:51 -0500 (EST)
-Received: from spartacus.utdallas.edu (spartacus.utdallas.edu [129.110.3.11])
- by ns0.utdallas.edu (Postfix) with SMTP id 782F91A00D7
- for <wietse@porcupine.org>; Fri, 25 Feb 2000 18:04:16 -0600 (CST)
-To: wietse@porcupine.org (Wietse Venema)
-Subject: Re: lmtp update
-References: <20000221181534.11F7C45659@spike.porcupine.org>
-From: Amos Gouaux <amos@utdallas.edu>
-Date: 25 Feb 2000 18:04:54 -0600
-In-Reply-To: wietse@porcupine.org's message of "Mon, 21 Feb 2000 13:15:34 -0500 (EST)"
-Message-ID: <q6mitzcvnfd.fsf@spartacus.utdallas.edu>
-Lines: 6
-User-Agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/21.1 (Bryce Canyon)
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="=-=-="
-Sender: wietse@porcupine.org
-Status: RO
-
---=-=-=
-
-How's this?
-
-Amos
-
-
---=-=-=
-Content-Disposition: attachment; filename=lmtp-man
-Content-Description: lmtp-man
-
-.TH LMTP 8
-.ad
-.fi
-.SH NAME
-lmtp
-\-
-Postfix local delivery via LMTP
-.SH SYNOPSIS
-.na
-.nf
-\fBlmtp\fR [generic Postfix daemon options] [server attributes...]
-.SH DESCRIPTION
-.ad
-.fi
-The LMTP client processes message delivery requests from
-the queue manager. Each request specifies a queue file, a sender
-address, a domain or host to deliver to, and recipient information.
-This program expects to be run from the \fBmaster\fR(8) process
-manager.
-
-The LMTP client updates the queue file and marks recipients
-as finished, or it informs the queue manager that delivery should
-be tried again at a later time. Delivery problem reports are sent
-to the \fBbounce\fR(8) or \fBdefer\fR(8) daemon as appropriate.
-
-There are two basic modes of operation for the LMTP client:
-.IP \(bu
-Communication with a local LMTP server via UNIX domain sockets.
-.IP \(bu
-Communication with a (possibly remote) LMTP server via
-Internet sockets.
-.PP
-If no server attributes are specified, the LMTP client will contact
-the destination host derived from the message delivery request using
-the TCP port defined as \fBlmtp\fR in \fBservices\fR(4). If no such
-service is found, the \fBlmtp_tcp_port\fR configuration parameter
-(default value of 24) will be used.
-
-In order to use a local LMTP server, this LMTP server will need to
-be specified via the server attributes described in the following
-section. Typically, the LMTP client would also be configured as the
-\fBlocal\fR delivery agent in the \fBmaster.cf\fR file.
-.SH SERVER ATTRIBUTE SYNTAX
-.na
-.nf
-.ad
-.fi
-The server attributes are given in the \fBmaster.cf\fR file at
-the end of a service definition. The syntax is as follows:
-.IP "\fBserv\fR=\fItype\fR:\fIserver\fR"
-The LMTP server to connect to for final delivery. The \fItype\fR
-portion can be either \fBunix\fR or \fBinet\fR. The \fIserver\fR
-portion is the path or address of the LMTP server, depending on the
-value of \fItype\fR, as shown below:
-.RS
-.IP "\fBserv=unix:\fR\fIclass\fR\fB/\fR\fIservname\fR"
-This specifies that the local LMTP server \fIservname\fR should be
-contacted for final delivery. Both \fIclass\fR (either \fBpublic\fR
-or \fBprivate\fR) and \fIservname\fR correspond to the LMTP server
-entry in the \fBmaster.cf\fR file. This LMTP server will likely
-be defined as a \fBspawn\fR(8) service.
-.IP "\fBserv=inet:"
-If nothing follows the \fBinet:\fR type specifier, a connection will
-be attempted to the destination host indicated in the delivery request.
-This simplest case is identical to defining the LMTP client without
-any server attributes at all.
-.IP "\fBserv=inet:\fR\fIaddress\fR"
-In this case, an Internet socket will be made to the server
-specified by \fIaddress\fR. The connection will use a destination
-port as described in the previous section.
-.IP "\fBserv=inet:\fR\fIaddress\fR\fB:\fR\fIport\fR"
-Connect to the LMTP server at \fIaddress\fR, but this time use port
-\fIport\fR instead of the default \fBlmtp\fR port.
-.IP "\fBserv=inet:[\fR\fIipaddr\fR\fB]\fR"
-The LMTP server to contact is specified using an Internet address
-in the "dot notation". That is, the numeric IP address rather
-than the DNS name for the server. The default \fBlmtp\fR port
-is used.
-.IP "\fBserv=inet:[\fR\fIipaddr\fR\fB]:\fR\fIport\fR"
-The LMTP server to contact is specified using the numeric IP address,
-at the port specified.
-.RE
-.PP
-.SH SECURITY
-.na
-.nf
-.ad
-.fi
-The LMTP client is moderately security-sensitive. It talks to LMTP
-servers and to DNS servers on the network. The LMTP client can be
-run chrooted at fixed low privilege.
-.SH STANDARDS
-.na
-.nf
-RFC 2033 (LMTP protocol)
-RFC 821 (SMTP protocol)
-RFC 1651 (SMTP service extensions)
-RFC 1870 (Message Size Declaration)
-RFC 2197 (Pipelining)
-.SH DIAGNOSTICS
-.ad
-.fi
-Problems and transactions are logged to \fBsyslogd\fR(8).
-Corrupted message files are marked so that the queue manager can
-move them to the \fBcorrupt\fR queue for further inspection.
-
-Depending on the setting of the \fBnotify_classes\fR parameter,
-the postmaster is notified of bounces, protocol problems, and of
-other trouble.
-.SH BUGS
-.ad
-.fi
-.SH CONFIGURATION PARAMETERS
-.na
-.nf
-.ad
-.fi
-The following \fBmain.cf\fR parameters are especially relevant to
-this program. See the Postfix \fBmain.cf\fR file for syntax details
-and for default values. Use the \fBpostfix reload\fR command after
-a configuration change.
-.SH Miscellaneous
-.ad
-.fi
-.IP \fBdebug_peer_level\fR
-Verbose logging level increment for hosts that match a
-pattern in the \fBdebug_peer_list\fR parameter.
-.IP \fBdebug_peer_list\fR
-List of domain or network patterns. When a remote host matches
-a pattern, increase the verbose logging level by the amount
-specified in the \fBdebug_peer_level\fR parameter.
-.IP \fBerror_notice_recipient\fR
-Recipient of protocol/policy/resource/software error notices.
-.IP \fBnotify_classes\fR
-When this parameter includes the \fBprotocol\fR class, send mail to the
-postmaster with transcripts of LMTP sessions with protocol errors.
-.IP \fBlmtp_skip_quit_response\fR
-Do not wait for the server response after sending QUIT.
-.IP \fBlmtp_tcp_port\fR
-The TCP port to be used when connecting to a LMTP server. Used as
-backup if the \fBlmtp\fR service is not found in \fBservices\fR(4).
-.SH "Resource controls"
-.ad
-.fi
-.IP \fBlmtp_cache_connection\fR
-Should we cache the connection to the LMTP server? The effectiveness
-of cached connections will be determined by the number of LMTP servers
-in use, and the concurrency limit specified for the LMTP client.
-Cached connections are closed under any of the following conditions:
-.RS
-.IP \(bu
-The idle timeout for the LMTP client is reached. This limit is
-enforced by \fBmaster\fR(8).
-.IP \(bu
-A message request to a different destination than the one currently
-cached.
-.IP \(bu
-The maximum number of requests per session is reached. This limit is
-enforced by \fBmaster\fR(8).
-.IP \(bu
-Upon the onset of another delivery request, the LMTP server associated
-with the current session does not respond to the \fBRSET\fR command.
-.RE
-.IP \fBlmtp_destination_concurrency_limit\fR
-Limit the number of parallel deliveries to the same destination.
-The default limit is taken from the
-\fBdefault_destination_concurrency_limit\fR parameter.
-.IP \fBlmtp_destination_recipient_limit\fR
-Limit the number of recipients per message delivery.
-The default limit is taken from the
-\fBdefault_destination_recipient_limit\fR parameter.
-.IP \fBlocal_destination_recipient_limit\fR
-Limit the number of recipients per message delivery.
-The default limit is taken from the
-\fBdefault_destination_recipient_limit\fR parameter.
-
-This parameter becomes significant if the LMTP client is used
-for local delivery. Some LMTP servers can optimize final delivery
-if multiple recipients are allowed. Therefore, it may be advantageous
-to set this to some number greater than one, depending on the capabilities
-of the machine.
-
-Setting this parameter to 0 will lead to an unlimited number of
-recipients per delivery. However, this could be risky since it may
-make the machine vulnerable to running out of resources if messages
-are encountered with an inordinate number of recipients. Exercise
-care when setting this parameter.
-.SH "Timeout controls"
-.ad
-.fi
-.IP \fBlmtp_connect_timeout\fR
-Timeout in seconds for opening a connection to the LMTP server.
-If no connection can be made within the deadline, the message
-is deferred.
-.IP \fBlmtp_lhlo_timeout\fR
-Timeout in seconds for sending the \fBLHLO\fR command, and for
-receiving the server response.
-.IP \fBlmtp_mail_timeout\fR
-Timeout in seconds for sending the \fBMAIL FROM\fR command, and for
-receiving the server response.
-.IP \fBlmtp_rcpt_timeout\fR
-Timeout in seconds for sending the \fBRCPT TO\fR command, and for
-receiving the server response.
-.IP \fBlmtp_data_init_timeout\fR
-Timeout in seconds for sending the \fBDATA\fR command, and for
-receiving the server response.
-.IP \fBlmtp_data_xfer_timeout\fR
-Timeout in seconds for sending the message content.
-.IP \fBlmtp_data_done_timeout\fR
-Timeout in seconds for sending the "\fB.\fR" command, and for
-receiving the server response. When no response is received, a
-warning is logged that the mail may be delivered multiple times.
-.IP \fBlmtp_rset_timeout\fR
-Timeout in seconds for sending the \fBRSET\fR command, and for
-receiving the server response.
-.IP \fBlmtp_quit_timeout\fR
-Timeout in seconds for sending the \fBQUIT\fR command, and for
-receiving the server response.
-.SH SEE ALSO
-.na
-.nf
-bounce(8) non-delivery status reports
-local(8) local mail delivery
-master(8) process manager
-qmgr(8) queue manager
-services(4) Internet services and aliases
-spawn(8) auxiliary command spawner
-syslogd(8) system logging
-.SH LICENSE
-.na
-.nf
-.ad
-.fi
-The Secure Mailer license must be distributed with this software.
-.SH AUTHOR(S)
-.na
-.nf
-Wietse Venema
-IBM T.J. Watson Research
-P.O. Box 704
-Yorktown Heights, NY 10598, USA
-
-Alterations for LMTP by:
-Philip A. Prindeville
-Mirapoint, Inc.
-USA.
-
-Additional work on LMTP by:
-Amos Gouaux
-University of Texas at Dallas
-P.O. Box 830688, MC34
-Richardson, TX 75083, USA
-
---=-=-=--
-
-
-
-
-From wietse@porcupine.org Sat Feb 5 09:32:03 2000
-Return-Path: <wietse@porcupine.org>
-Delivered-To: wietse@hades.porcupine.org
-Received: from spike.porcupine.org (spike.porcupine.org [168.100.189.2])
- by hades.porcupine.org (Postfix) with ESMTP id A7661188A7
- for <wietse@hades.porcupine.org>; Sat, 5 Feb 2000 09:32:03 -0500 (EST)
-Received: by spike.porcupine.org (Postfix, from userid 100)
- id 700394563E; Sat, 5 Feb 2000 09:32:03 -0500 (EST)
-Delivered-To: wietse@porcupine.org
-Received: from ns0.utdallas.edu (ns0.utdallas.edu [129.110.10.1])
- by spike.porcupine.org (Postfix) with ESMTP id 605FE4563C
- for <wietse@porcupine.org>; Mon, 31 Jan 2000 18:35:02 -0500 (EST)
-Received: from spartacus.utdallas.edu (spartacus.utdallas.edu [129.110.3.11])
- by ns0.utdallas.edu (Postfix) with SMTP id 02E4C1A005D
- for <wietse@porcupine.org>; Mon, 31 Jan 2000 17:34:59 -0600 (CST)
-To: wietse@porcupine.org (Wietse Venema)
-Subject: Re: lmtp-20000130.tar.gz
-References: <20000131225228.008114563F@spike.porcupine.org>
-From: Amos Gouaux <amos@utdallas.edu>
-Date: 31 Jan 2000 17:35:34 -0600
-In-Reply-To: wietse@porcupine.org's message of "Mon, 31 Jan 2000 17:52:28 -0500 (EST)"
-Message-ID: <q6mzotlvmpl.fsf@spartacus.utdallas.edu>
-Lines: 119
-User-Agent: Gnus/5.0803 (Gnus v5.8.3) XEmacs/21.1 (Bryce Canyon)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Sender: wietse@porcupine.org
-Status: O
-
->>>>> On Mon, 31 Jan 2000 17:52:28 -0500 (EST),
->>>>> Wietse Venema <wietse@porcupine.org> (wv) writes:
-
-wv> For local transports, command pipelining does not have the benefit
-wv> that it has for TCP over non-local connections.
-
-So in other words I was making things too complicated.
-Figures. I have a knack for doing that.
-
-I've updated alpha-lmtp.tar.gz again.
-
-Here's the CHANGES file:
-
-
-2000 Jan 31
-
-* lmtp_proto.c:lmtp_lhlo: Don't worry about LMTP_FEATURE_PIPELINING
- for sessions of type LMTP_SERV_TYPE_UNIX.
-
-
-2000 Jan 30
-
-* BIG changes. Removed all the pipe stuff from lmtp.c and
- lmtp_connect.c Now, lmtp will either do a remote connection much
- like the smtp client, or it will connect to a UNIX domain socket
- to an auxiliary service (spawn). This makes the lmtp patch
- simpler because it doesn't have to worry at all about exec-ing an
- external command, and all the resulting security implications.
- See README.local for details.
-
- NOTE: postfix-19991231-pl04 is REQUIRED for this to work!
- (Need the "spawn" service.)
-
-* Updated the makefile-patch for postfix-19991231-pl03.
-
-* lmtp.h: changed the LMTP_ATTR structure to contain "type", "class", and
- "name" fields, reflecting the change from the pipe mechanism to
- the local sockets connection. Changed LMTP_SESSION to contain the
- "type" field. The connection type is recorded in this field in
- case it is needed elsewhere, like in lmtp_proto.
-
-* lmtp.c:get_service_attr altered for new command syntax. Examples:
-
- serv=unix:private/lmtpd
- serv=inet:public/lmtpd
-
- After `serv=' is the "type", followed by `:', then the "class",
- followed by '/', and then finally the "name".
-
-* Added SAME_DESTINATION macro to lmtp.c:deliver_message for
- readability, and simpler logic.
-
-* lmtp_connect.c: changed lmtp_connect to contain logic to determine
- just what kind of connection to make, removing it from lmtp.c;
- removed lmtp_connect_pipe; and added lmtp_connect_local, which
- uses mail_connect_wait to connect to the service running the LMTP
- server (spawn). In lmtp_connect, the connection type stored in
- attr.type is saved into session.type, so it can be used later if
- necessary.
-
-* lmtp_proto.c:lmtp_lhlo: towards the end of this function we check
- to see if service->type is LMTP_SERV_TYPE_UNIX so that we don't
- try to do a getsockopt on a descriptor that doesn't support it.
- Is this the best way to handle this? Or maybe we should just try
- it and if it bombs, check the error code before simply going
- fatal?
-
-* Snagged the latest quota_821_local.c from the smtp client.
-
-* Updated the README files accordingly.
-
-
-2000 Jan 28
-
-* Well, wondering about using REWRITE_ADDRESS in lmtp_proto.c,
- putting the lowercase thing in there. Though, that would also
- apply to sender address. Is that okay?
-
-* We shouldn't be doing DNS lookups at this stage, so can get rid
- of lmtp_unalias.c. Also cut out the unalias portion in
- REWRITE_ADDRESS in lmtp_proto.c
-
-
-2000 Jan 11
-
-* At the suggestion of Rupa Schomaker, added the following to
- lmtp_proto.c:
-
- lowercase(rcpt->address); /* [AAG] rupa */
-
-
-1999 Dec 1 (or thereabouts)
-
-* Added lmtp_session_reset to make it easier to remember to reset
- certain things to 0. Did this to lmtp_chat_reset too.
-
-* Finally, did some work with the connection caching so that an RSET
- is sent to the LMTP server. This is done for two reasons: first,
- to tell the LMTP server to flush out any status information
- because we're about to feed it another message, and second, to
- test the link to see if it is still alive. If the link has died
- for some reason, it is reestablished. Changes to lmtp.c and
- lmtp_proto.c.
-
-* There was also some tidying in lmtp.c so that things were a little
- clearer as to what was going on. I added a few more comments as
- well.
-
-* I tried to make the master.cf argument parsing a little more
- consistent with the other Postfix services. Changes to lmtp.c.
-
-* On the postfix-users mailing list, Valery Brasseur pointed out that
- errors encountered during LMTP delivery were not getting bounced
- as appropriate. This lead me to investigate the matter, wanting
- to put this LMTP capability into service myself. I then realized
- that some of the error checking was a tad over zealous, and so
- simplified things a bit in lmtp_proto.c.
-
-
-
-
-
-
-From wietse@porcupine.org Wed Dec 8 19:50:01 1999
-Return-Path: <wietse@porcupine.org>
-Delivered-To: wietse@hades.porcupine.org
-Received: from spike.porcupine.org (spike.porcupine.org [168.100.189.2])
- by hades.porcupine.org (Postfix) with ESMTP id D83EE18868
- for <wietse@hades.porcupine.org>; Wed, 8 Dec 1999 19:50:00 -0500 (EST)
-Received: by spike.porcupine.org (Postfix, from userid 100)
- id 827F645AFB; Wed, 8 Dec 1999 10:51:18 -0500 (EST)
-Delivered-To: wietse@porcupine.org
-Received: from ns0.utdallas.edu (ns0.utdallas.edu [129.110.10.1])
- by spike.porcupine.org (Postfix) with ESMTP id 90E1A457F8
- for <wietse@porcupine.org>; Tue, 7 Dec 1999 11:37:16 -0500 (EST)
-Received: from spartacus.utdallas.edu (spartacus.utdallas.edu [129.110.3.11])
- by ns0.utdallas.edu (Postfix) with SMTP id 139E719FFFE
- for <wietse@porcupine.org>; Tue, 7 Dec 1999 10:37:02 -0600 (CST)
-To: wietse@porcupine.org (Wietse Venema)
-Subject: Re: LMTP stuff
-References: <19991206162939.1C9BB458EB@spike.porcupine.org>
-From: Amos Gouaux <amos+lists.postfix@utdallas.edu>
-Date: 07 Dec 1999 10:37:25 -0600
-In-Reply-To: wietse@porcupine.org's message of "Mon, 6 Dec 1999 11:29:38 -0500 (EST)"
-Message-ID: <q6m7liqiu62.fsf@spartacus.utdallas.edu>
-Lines: 46
-User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) XEmacs/21.1 (Bryce Canyon)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Sender: wietse@porcupine.org
-Status: RO
-
-Okay, I put out the following tar file:
-
-ftp://ftp.utdallas.edu/pub/staff/amos/postfix/lmtp-19990427-02.tar.gz
-
-It's not quite as tidy as I would like it, and hope to eventually
-make it. I've been making changes gradually, in part because it
-might be fun to play with the connection caching later, and in part
-because I'm new to the internals of Postfix. Speaking of which, I
-must say it has been a real pleasure poking around this code. It's
-fascinating to see how you've created this infrastructure by which
-all the various components communicate with one another. Pretty
-slick stuff. Very educational too.
-
-Most of the changes are in lmtp_proto.c and lmtp.c. I noticed in
-the former that he's passing status around a lot, using the
-recv_state and send_state members instead of using local vars for
-these values. I'm guess that was to keep track of the state
-throughout the connection caching. I left that as is.
-
-In lmtp.c I removed the for loop he had, and parse the argv in a
-separate function to make it a bit cleaner. I'm assuming that with
-the lmtp service there won't be much of a need to expand the argv
-like it is with the pipe service, correct?
-
-After seeing one of your posts yesterday about the nexthop arg to
-pipe, I'm wondering if this lmtp should support that as well. I
-noticed in the LMTP RFC that this LMTP can either be a local
-program, or communicate to a "Gateway Delivery Agent". If there was
-a nexthop arg to lmtp, folks could specify this gateway host there.
-Or, they could use the transport map and not define any args to lmtp
-at all.
-
-It's amazing how much time can be consumed just contemplating what
-args should be permissible, and what's the most efficient way to
-process them. I was even wondering, if no variable expansion should
-take place, if `LMTP_ATTR attr' should be global, and the call to
-get_service_attr placed in a function pointed to by
-MAIL_SERVER_PRE_INIT so it's only invoked once. Still more things
-to learn.
-
-Oh well, I've flung quite a bit mail at this thing and it seems to
-be handling it fine. So perhaps it will at least be sufficient to
-satisfy folks for the time being.
-
-Amos
-
-
-
-
-
-From wietse@porcupine.org Tue Nov 23 18:09:44 1999
-Return-Path: <wietse@porcupine.org>
-Delivered-To: wietse@hades.porcupine.org
-Received: from spike.porcupine.org (spike.porcupine.org [168.100.189.2])
- by hades.porcupine.org (Postfix) with ESMTP id BD43F18864
- for <wietse@hades.porcupine.org>; Tue, 23 Nov 1999 18:09:44 -0500 (EST)
-Received: by spike.porcupine.org (Postfix, from userid 100)
- id 4CC0445A9B; Tue, 23 Nov 1999 13:24:06 -0500 (EST)
-Delivered-To: wietse@porcupine.org
-Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4])
- by spike.porcupine.org (Postfix) with ESMTP id 979F145A9A
- for <wietse@porcupine.org>; Tue, 23 Nov 1999 13:19:06 -0500 (EST)
-Received: by russian-caravan.cloud9.net (Postfix)
- id AE6E576434; Tue, 23 Nov 1999 13:16:34 -0500 (EST)
-Delivered-To: postfix-users-outgoing@cloud9.net
-Received: by russian-caravan.cloud9.net (Postfix, from userid 54)
- id 340DA76423; Tue, 23 Nov 1999 13:16:34 -0500 (EST)
-Delivered-To: postfix-users@cloud9.net
-Received: from atn01.axime.com (atn01.axime.com [160.92.1.141])
- by russian-caravan.cloud9.net (Postfix) with ESMTP id 32BE6763C6
- for <postfix-users@postfix.org>; Tue, 23 Nov 1999 13:16:32 -0500 (EST)
-Received: from atos-group.com (sys-pc21.segin.com [172.18.2.119])
- by atn01.axime.com (8.8.8/8.8.8[Atos Multimedia]) with ESMTP id TAA25333;
- Tue, 23 Nov 1999 19:16:20 +0100 (MET)
-Message-ID: <383AD9F2.8915CCA6@atos-group.com>
-Date: Tue, 23 Nov 1999 18:16:18 +0000
-From: valery brasseur <vbrasseur@atos-group.com>
-Organization: Atos Multimedia
-X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12 i686)
-X-Accept-Language: en, fr-FR
-MIME-Version: 1.0
-To: Amos Gouaux <amos+lists.postfix@utdallas.edu>
-Cc: postfix-users@postfix.org
-Subject: Re: LMTP?
-References: <q6memdj3djk.fsf@spartacus.utdallas.edu> <3839189C.C4E94EA1@atos-group.com> <q6mso1yn00k.fsf@spartacus.utdallas.edu>
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-Precedence: bulk
-Sender: wietse@porcupine.org
-Status: RO
-
-Here is the patch a use on the lmtp part of postfix for using LMTP on
-Solaris (note that these diffs are not necessary for Linux !)
-It's seems that the probleme come from the interpretation of the return
-code from cyrus-deliver.
-
-note : they are against lmtp-19990427.tar.gz
-
---- lmtp/lmtp_proto.c Tue Apr 20 09:42:45 1999
-+++ /postfix-19990906/lmtp/lmtp_proto.c Thu Sep 2 15:04:57 1999
-@@ -445,12 +445,12 @@
- if (resp->code / 100 == 2) {
- ++nrcpt;
- recipient_list_add(&survivors, rcpt->offset,
-rcpt->address);
-- } else if (resp->code == 550
-+ } else /* if (resp->code == 550
- && strncmp(resp->str, "550 5.1.1", 9)
-== 0) {
- deliver_completed(state->src, -1);
- state->status |= -1;
- rcpt->offset = 0;
-- } else {
-+ } else */ {o
- lmtp_rcpt_fail(state, resp->code, rcpt,
- "host %s said: %s",
-session->host,
- translit(resp->str, "\n", "
-"));
-
-
-Hope it will help.
-
-Amos Gouaux wrote:
->
-> >>>>> On Mon, 22 Nov 1999 10:19:08 +0000,
-> >>>>> valery brasseur <vbrasseur@atos-group.com> (vb) writes:
->
-> vb> I use it with cyrus, but I have done made some patch to the LMTP code
-> vb> and deliver code because return code where not what the other was
-> vb> expected !!!
->
-> Do you think you could submit these patches to the list?
->
-> I knew something had to be amiss. Using the Postfix sendmail
-> command I attempted to send mail to a non-existent user, jdoe. The
-> syslog from Postfix indicated successful delivery:
->
-> Nov 22 07:03:45 area52 postfix/pipe[3082]: 6316124718: to=<jdoe@area52.utdallas.edu>, relay=lmtp, delay=0, status=sent (jdoe@area52.utdallas.edu)
->
-> However, when I run deliver by hand, the response isn't so positive:
->
-> rcpt to:<jdoe@area52.utdallas.edu>
-> 550 5.1.1 User unknown
->
-> Thanks,
-> Amos
-
---
-Valery BRASSEUR | Phone # +33 320 60 7982
-Atos Branche Multimedia | Fax # +33 320 60 7649
- "Unix -- where you can do anything in two keystrokes or less..."
- -- Unknown
-
-
-
-
+++ /dev/null
-*** ../../orig/Makefile.in Fri Dec 31 09:49:41 1999
---- Makefile.in Fri Feb 25 16:27:24 2000
-***************
-*** 4,10 ****
- DIRS = util global dns master postfix smtpstone sendmail error \
- pickup cleanup smtpd local trivial-rewrite qmgr smtp bounce pipe \
- showq postalias postcat postconf postdrop postkick postlock postlog \
-! postmap postsuper # spawn man html
-
- default: update
-
---- 4,10 ----
- DIRS = util global dns master postfix smtpstone sendmail error \
- pickup cleanup smtpd local trivial-rewrite qmgr smtp bounce pipe \
- showq postalias postcat postconf postdrop postkick postlock postlog \
-! postmap postsuper lmtp spawn man # html
-
- default: update
-
+++ /dev/null
-/*++
-/* NAME
-/* quote_821_local 3
-/* SUMMARY
-/* quote local part of address
-/* SYNOPSIS
-/* #include "quote_821_local.h"
-/*
-/* VSTRING *quote_821_local(dst, src)
-/* VSTRING *dst;
-/* char *src;
-/* DESCRIPTION
-/* quote_821_local() quotes the local part of a mailbox address and
-/* returns a result that can be used in SMTP commands as specified
-/* by RFC 821.
-/*
-/* Arguments:
-/* .IP dst
-/* The result.
-/* .IP src
-/* The input address.
-/* STANDARDS
-/* RFC 821 (SMTP protocol)
-/* BUGS
-/* The code assumes that the domain is RFC 821 clean.
-/* 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
-/*
-/* Alterations for LMTP by:
-/* Philip A. Prindeville
-/* Mirapoint, Inc.
-/* USA.
-/*
-/* Additional work on LMTP by:
-/* Amos Gouaux
-/* University of Texas at Dallas
-/* P.O. Box 830688, MC34
-/* Richardson, TX 75083, USA
-/*--*/
-
-/* System library. */
-
-#include <sys_defs.h>
-#include <string.h>
-#include <ctype.h>
-
-/* Utility library. */
-
-#include <vstring.h>
-
-/* Global library. */
-
-#include "quote_821_local.h"
-
-/* Application-specific. */
-
-#define YES 1
-#define NO 0
-
-/* is_821_dot_string - is this local-part an rfc 821 dot-string? */
-
-static int is_821_dot_string(char *local_part, char *end)
-{
- char *cp;
- int ch;
-
- /*
- * Detect any deviations from the definition of dot-string. We could use
- * lookup tables to speed up some of the work, but hey, how large can a
- * local-part be anyway?
- */
- if (local_part[0] == 0 || local_part[0] == '.')
- return (NO);
- for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) {
- if (ch == '.' && cp[1] == '.')
- return (NO);
- if (ch > 127)
- return (NO);
- if (ch == ' ')
- return (NO);
- if (ISCNTRL(ch))
- return (NO);
- if (ch == '<' || ch == '>'
- || ch == '(' || ch == ')'
- || ch == '[' || ch == ']'
- || ch == '\\' || ch == ','
- || ch == ';' || ch == ':'
- /* || ch == '@' */ || ch == '"')
- return (NO);
- }
- if (cp[-1] == '.')
- return (NO);
- return (YES);
-}
-
-/* make_821_quoted_string - make quoted-string from local-part */
-
-static VSTRING *make_821_quoted_string(VSTRING *dst, char *local_part, char *end)
-{
- char *cp;
- int ch;
-
- /*
- * Put quotes around the result, and prepend a backslash to characters
- * that need quoting when they occur in a quoted-string.
- */
- VSTRING_RESET(dst);
- VSTRING_ADDCH(dst, '"');
- for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) {
- if (ch > 127 || ch == '\r' || ch == '\n' || ch == '"' || ch == '\\')
- VSTRING_ADDCH(dst, '\\');
- VSTRING_ADDCH(dst, ch);
- }
- VSTRING_ADDCH(dst, '"');
- VSTRING_TERMINATE(dst);
- return (dst);
-}
-
-/* quote_821_local - quote local part of address according to rfc 821 */
-
-VSTRING *quote_821_local(VSTRING *dst, char *addr)
-{
- char *at;
-
- /*
- * According to RFC 821, a local-part is a dot-string or a quoted-string.
- * We first see if the local-part is a dot-string. If it is not, we turn
- * it into a quoted-string. Anything else would be too painful.
- */
- if ((at = strrchr(addr, '@')) == 0) /* just in case */
- at = addr + strlen(addr); /* should not happen */
- if (is_821_dot_string(addr, at)) {
- return (vstring_strcpy(dst, addr));
- } else {
- make_821_quoted_string(dst, addr, at);
- return (vstring_strcat(dst, at));
- }
-}
-
-#ifdef TEST
-
- /*
- * Test program for local-part quoting as per rfc 821
- */
-#include <stdlib.h>
-#include <vstream.h>
-#include <vstring_vstream.h>
-#include "quote_821_local.h"
-
-main(void)
-{
- VSTRING *src = vstring_alloc(100);
- VSTRING *dst = vstring_alloc(100);
-
- while (vstring_fgets_nonl(src, VSTREAM_IN)) {
- vstream_fprintf(VSTREAM_OUT, "%s\n",
- vstring_str(quote_821_local(dst, vstring_str(src))));
- vstream_fflush(VSTREAM_OUT);
- }
- exit(0);
-}
-
-#endif
+++ /dev/null
-/*++
-/* NAME
-/* quote_821_local 3h
-/* SUMMARY
-/* quote rfc 821 local part
-/* SYNOPSIS
-/* #include "quote_821_local.h"
-/* DESCRIPTION
-/* .nf
-
- /*
- * Utility library.
- */
-#include <vstring.h>
-
- /*
- * External interface.
- */
-extern VSTRING *quote_821_local(VSTRING *, 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
-/*
-/* Alterations for LMTP by:
-/* Philip A. Prindeville
-/* Mirapoint, Inc.
-/* USA.
-/*
-/* Additional work on LMTP by:
-/* Amos Gouaux
-/* University of Texas at Dallas
-/* P.O. Box 830688, MC34
-/* Richardson, TX 75083, USA
-/*--*/
alias.o: ../include/dict.h
alias.o: ../include/vstream.h
alias.o: ../include/vbuf.h
-alias.o: ../include/binattr.h
alias.o: ../include/argv.h
alias.o: ../include/stringops.h
alias.o: ../include/vstring.h
command.o: ../include/vstring.h
command.o: ../include/vbuf.h
command.o: ../include/vstream.h
-command.o: ../include/binattr.h
command.o: ../include/argv.h
command.o: ../include/defer.h
command.o: ../include/bounce.h
deliver_attr.o: ../include/msg.h
deliver_attr.o: ../include/vstream.h
deliver_attr.o: ../include/vbuf.h
-deliver_attr.o: ../include/binattr.h
deliver_attr.o: local.h
deliver_attr.o: ../include/htable.h
deliver_attr.o: ../include/vstring.h
delivered.o: ../include/vstring.h
delivered.o: ../include/vbuf.h
delivered.o: ../include/vstream.h
-delivered.o: ../include/binattr.h
delivered.o: ../include/vstring_vstream.h
delivered.o: ../include/stringops.h
delivered.o: ../include/record.h
dotforward.o: ../include/vstring.h
dotforward.o: ../include/vbuf.h
dotforward.o: ../include/vstream.h
-dotforward.o: ../include/binattr.h
dotforward.o: ../include/htable.h
dotforward.o: ../include/open_as.h
dotforward.o: ../include/lstat_as.h
file.o: ../include/vstring.h
file.o: ../include/vbuf.h
file.o: ../include/vstream.h
-file.o: ../include/binattr.h
file.o: ../include/deliver_flock.h
file.o: ../include/open_as.h
file.o: ../include/mail_copy.h
forward.o: ../include/vstring.h
forward.o: ../include/vbuf.h
forward.o: ../include/vstream.h
-forward.o: ../include/binattr.h
forward.o: ../include/vstring_vstream.h
forward.o: ../include/iostuff.h
forward.o: ../include/stringops.h
include.o: ../include/mymalloc.h
include.o: ../include/vstream.h
include.o: ../include/vbuf.h
-include.o: ../include/binattr.h
include.o: ../include/open_as.h
include.o: ../include/stat_as.h
include.o: ../include/iostuff.h
indirect.o: local.h
indirect.o: ../include/vstream.h
indirect.o: ../include/vbuf.h
-indirect.o: ../include/binattr.h
indirect.o: ../include/vstring.h
indirect.o: ../include/tok822.h
indirect.o: ../include/resolve_clnt.h
local.o: ../include/vstring.h
local.o: ../include/vbuf.h
local.o: ../include/vstream.h
-local.o: ../include/binattr.h
local.o: ../include/iostuff.h
local.o: ../include/name_mask.h
local.o: ../include/set_eugid.h
local_expand.o: local.h
local_expand.o: ../include/htable.h
local_expand.o: ../include/vstream.h
-local_expand.o: ../include/binattr.h
local_expand.o: ../include/been_here.h
local_expand.o: ../include/tok822.h
local_expand.o: ../include/resolve_clnt.h
mailbox.o: ../include/vstring.h
mailbox.o: ../include/vbuf.h
mailbox.o: ../include/vstream.h
-mailbox.o: ../include/binattr.h
mailbox.o: ../include/mymalloc.h
mailbox.o: ../include/stringops.h
mailbox.o: ../include/set_eugid.h
maildir.o: ../include/vstring.h
maildir.o: ../include/vbuf.h
maildir.o: ../include/vstream.h
-maildir.o: ../include/binattr.h
maildir.o: ../include/make_dirs.h
maildir.o: ../include/set_eugid.h
maildir.o: ../include/get_hostname.h
recipient.o: ../include/vbuf.h
recipient.o: ../include/dict.h
recipient.o: ../include/vstream.h
-recipient.o: ../include/binattr.h
recipient.o: ../include/argv.h
recipient.o: ../include/bounce.h
recipient.o: ../include/mail_params.h
resolve.o: ../include/htable.h
resolve.o: ../include/mail_proto.h
resolve.o: ../include/vstream.h
-resolve.o: ../include/binattr.h
resolve.o: ../include/iostuff.h
resolve.o: ../include/resolve_clnt.h
resolve.o: ../include/rewrite_clnt.h
token.o: ../include/vstring.h
token.o: ../include/vbuf.h
token.o: ../include/vstream.h
-token.o: ../include/binattr.h
token.o: ../include/htable.h
token.o: ../include/readlline.h
token.o: ../include/mymalloc.h
unknown.o: ../include/mail_params.h
unknown.o: ../include/mail_proto.h
unknown.o: ../include/vstream.h
-unknown.o: ../include/binattr.h
unknown.o: ../include/iostuff.h
unknown.o: ../include/bounce.h
unknown.o: local.h
+++ /dev/null
-#!/bin/sh
-
-# makelinks - create shadow tree with links to source files
-
-case $# in
- 2) src=`cd $1 || kill $$; pwd`; dst=$2;;
- *) echo "Usage: $0 source-dir dest-dir" 1>&2; exit 1;;
-esac
-
-test -d $dst && { echo "$0: destination directory $dst exists" 1>&2; exit 1; }
-mkdir -p $dst || exit 1
-cd $dst
-(cd $src; find . -type d -print) | xargs mkdir -p
-(cd $src; find . ! -type d -print) | while read name
-do
- ln -s $src/$name $name
-done
.SH SYNOPSIS
.na
.nf
-\fBlmtp\fR [generic Postfix daemon options] [server attributes...]
+\fBlmtp\fR [generic Postfix daemon options]
.SH DESCRIPTION
.ad
.fi
service is found, the \fBlmtp_tcp_port\fR configuration parameter
(default value of 24) will be used. The LMTP client does not perform
MX (mail exchanger) lookups since those are defined only for SMTP.
-.SH SERVER ATTRIBUTE SYNTAX
-.na
-.nf
-.ad
-.fi
-The server attributes are given in the \fBmaster.cf\fR file at
-the end of a service definition. The syntax is as follows:
-.IP "\fBserver=\fR\fIhost\fR"
-.IP "\fBserver=\fR\fIhost\fR\fB:\fR\fIport\fR"
-.IP "\fBserver=[\fR\fIipaddr\fR\fB]\fR"
-.IP "\fBserver=[\fR\fIipaddr\fR\fB]:\fR\fIport\fR"
-Connect to the specified host or IP address and TCP port (default: the
-\fBlmtp\fR port as specified in the \fBservices\fR database).
-.PP
.SH SECURITY
.na
.nf
master.o: ../include/mymalloc.h
master.o: ../include/iostuff.h
master.o: ../include/vstream.h
-master.o: ../include/binattr.h
master.o: ../include/stringops.h
master.o: ../include/myflock.h
master.o: ../include/watchdog.h
master_ent.o: ../include/vstring.h
master_ent.o: ../include/vbuf.h
master_ent.o: ../include/vstream.h
-master_ent.o: ../include/binattr.h
master_ent.o: ../include/argv.h
master_ent.o: ../include/stringops.h
master_ent.o: ../include/readlline.h
master_wakeup.o: ../include/mail_proto.h
master_wakeup.o: ../include/vstream.h
master_wakeup.o: ../include/vbuf.h
-master_wakeup.o: ../include/binattr.h
master_wakeup.o: ../include/iostuff.h
master_wakeup.o: mail_server.h
master_wakeup.o: master.h
multi_server.o: ../include/vstring.h
multi_server.o: ../include/vbuf.h
multi_server.o: ../include/vstream.h
-multi_server.o: ../include/binattr.h
multi_server.o: ../include/msg_vstream.h
multi_server.o: ../include/mymalloc.h
multi_server.o: ../include/stringops.h
single_server.o: ../include/vstring.h
single_server.o: ../include/vbuf.h
single_server.o: ../include/vstream.h
-single_server.o: ../include/binattr.h
single_server.o: ../include/msg_vstream.h
single_server.o: ../include/mymalloc.h
single_server.o: ../include/events.h
trigger_server.o: ../include/vstring.h
trigger_server.o: ../include/vbuf.h
trigger_server.o: ../include/vstream.h
-trigger_server.o: ../include/binattr.h
trigger_server.o: ../include/msg_vstream.h
trigger_server.o: ../include/mymalloc.h
trigger_server.o: ../include/events.h
pickup.o: ../include/vstring.h
pickup.o: ../include/vbuf.h
pickup.o: ../include/vstream.h
-pickup.o: ../include/binattr.h
pickup.o: ../include/open_as.h
pickup.o: ../include/set_eugid.h
pickup.o: ../include/mail_queue.h
pipe.o: ../include/msg.h
pipe.o: ../include/vstream.h
pipe.o: ../include/vbuf.h
-pipe.o: ../include/binattr.h
pipe.o: ../include/vstring.h
pipe.o: ../include/argv.h
pipe.o: ../include/htable.h
postalias.o: ../include/vstring.h
postalias.o: ../include/vbuf.h
postalias.o: ../include/vstream.h
-postalias.o: ../include/binattr.h
postalias.o: ../include/msg_vstream.h
postalias.o: ../include/readlline.h
postalias.o: ../include/stringops.h
postcat.o: ../include/msg.h
postcat.o: ../include/vstream.h
postcat.o: ../include/vbuf.h
-postcat.o: ../include/binattr.h
postcat.o: ../include/vstring.h
postcat.o: ../include/msg_vstream.h
postcat.o: ../include/vstring_vstream.h
postconf.o: ../include/msg.h
postconf.o: ../include/vstream.h
postconf.o: ../include/vbuf.h
-postconf.o: ../include/binattr.h
postconf.o: ../include/msg_vstream.h
postconf.o: ../include/get_hostname.h
postconf.o: ../include/stringops.h
postdrop.o: ../include/mymalloc.h
postdrop.o: ../include/vstream.h
postdrop.o: ../include/vbuf.h
-postdrop.o: ../include/binattr.h
postdrop.o: ../include/vstring.h
postdrop.o: ../include/msg_vstream.h
postdrop.o: ../include/msg_syslog.h
postfix.o: ../include/sys_defs.h
postfix.o: ../include/vstream.h
postfix.o: ../include/vbuf.h
-postfix.o: ../include/binattr.h
postfix.o: ../include/msg.h
postfix.o: ../include/msg_vstream.h
postfix.o: ../include/msg_syslog.h
postkick.o: ../include/mymalloc.h
postkick.o: ../include/vstream.h
postkick.o: ../include/vbuf.h
-postkick.o: ../include/binattr.h
postkick.o: ../include/msg_vstream.h
postkick.o: ../include/safe.h
postkick.o: ../include/mail_proto.h
postlock.o: ../include/vstring.h
postlock.o: ../include/vbuf.h
postlock.o: ../include/vstream.h
-postlock.o: ../include/binattr.h
postlock.o: ../include/msg_vstream.h
postlock.o: ../include/iostuff.h
postlock.o: ../include/mail_params.h
postlog.o: ../include/vstring.h
postlog.o: ../include/vbuf.h
postlog.o: ../include/vstream.h
-postlog.o: ../include/binattr.h
postlog.o: ../include/vstring_vstream.h
postlog.o: ../include/msg_output.h
postlog.o: ../include/msg_vstream.h
postmap.o: ../include/vstring.h
postmap.o: ../include/vbuf.h
postmap.o: ../include/vstream.h
-postmap.o: ../include/binattr.h
postmap.o: ../include/msg_vstream.h
postmap.o: ../include/readlline.h
postmap.o: ../include/stringops.h
postsuper.o: ../include/msg_syslog.h
postsuper.o: ../include/vstream.h
postsuper.o: ../include/vbuf.h
-postsuper.o: ../include/binattr.h
postsuper.o: ../include/msg_vstream.h
postsuper.o: ../include/scan_dir.h
postsuper.o: ../include/vstring.h
qmgr.o: ../include/events.h
qmgr.o: ../include/vstream.h
qmgr.o: ../include/vbuf.h
-qmgr.o: ../include/binattr.h
qmgr.o: ../include/dict.h
qmgr.o: ../include/argv.h
qmgr.o: ../include/mail_queue.h
qmgr_active.o: ../include/mymalloc.h
qmgr_active.o: ../include/vstream.h
qmgr_active.o: ../include/vbuf.h
-qmgr_active.o: ../include/binattr.h
qmgr_active.o: ../include/mail_params.h
qmgr_active.o: ../include/mail_open_ok.h
qmgr_active.o: ../include/mail_queue.h
qmgr_bounce.o: ../include/deliver_completed.h
qmgr_bounce.o: ../include/vstream.h
qmgr_bounce.o: ../include/vbuf.h
-qmgr_bounce.o: ../include/binattr.h
qmgr_bounce.o: qmgr.h
qmgr_bounce.o: ../include/scan_dir.h
qmgr_bounce.o: ../include/maps.h
qmgr_defer.o: ../include/msg.h
qmgr_defer.o: ../include/vstream.h
qmgr_defer.o: ../include/vbuf.h
-qmgr_defer.o: ../include/binattr.h
qmgr_defer.o: ../include/defer.h
qmgr_defer.o: ../include/bounce.h
qmgr_defer.o: qmgr.h
qmgr_deliver.o: ../include/vstring.h
qmgr_deliver.o: ../include/vbuf.h
qmgr_deliver.o: ../include/vstream.h
-qmgr_deliver.o: ../include/binattr.h
qmgr_deliver.o: ../include/vstring_vstream.h
qmgr_deliver.o: ../include/events.h
qmgr_deliver.o: ../include/iostuff.h
qmgr_enable.o: ../include/msg.h
qmgr_enable.o: ../include/vstream.h
qmgr_enable.o: ../include/vbuf.h
-qmgr_enable.o: ../include/binattr.h
qmgr_enable.o: qmgr.h
qmgr_enable.o: ../include/scan_dir.h
qmgr_enable.o: ../include/maps.h
qmgr_entry.o: ../include/events.h
qmgr_entry.o: ../include/vstream.h
qmgr_entry.o: ../include/vbuf.h
-qmgr_entry.o: ../include/binattr.h
qmgr_entry.o: ../include/mail_params.h
qmgr_entry.o: qmgr.h
qmgr_entry.o: ../include/scan_dir.h
qmgr_message.o: ../include/vstring.h
qmgr_message.o: ../include/vbuf.h
qmgr_message.o: ../include/vstream.h
-qmgr_message.o: ../include/binattr.h
qmgr_message.o: ../include/split_at.h
qmgr_message.o: ../include/valid_hostname.h
qmgr_message.o: ../include/argv.h
qmgr_move.o: ../include/vstring.h
qmgr_move.o: ../include/vbuf.h
qmgr_move.o: ../include/vstream.h
-qmgr_move.o: ../include/binattr.h
qmgr_move.o: ../include/mail_scan_dir.h
qmgr_move.o: qmgr.h
qmgr_move.o: ../include/maps.h
qmgr_queue.o: qmgr.h
qmgr_queue.o: ../include/vstream.h
qmgr_queue.o: ../include/vbuf.h
-qmgr_queue.o: ../include/binattr.h
qmgr_queue.o: ../include/scan_dir.h
qmgr_queue.o: ../include/maps.h
qmgr_queue.o: ../include/dict.h
qmgr_rcpt_list.o: qmgr.h
qmgr_rcpt_list.o: ../include/vstream.h
qmgr_rcpt_list.o: ../include/vbuf.h
-qmgr_rcpt_list.o: ../include/binattr.h
qmgr_rcpt_list.o: ../include/scan_dir.h
qmgr_rcpt_list.o: ../include/maps.h
qmgr_rcpt_list.o: ../include/dict.h
qmgr_scan.o: qmgr.h
qmgr_scan.o: ../include/vstream.h
qmgr_scan.o: ../include/vbuf.h
-qmgr_scan.o: ../include/binattr.h
qmgr_scan.o: ../include/maps.h
qmgr_scan.o: ../include/dict.h
qmgr_scan.o: ../include/argv.h
qmgr_transport.o: ../include/mymalloc.h
qmgr_transport.o: ../include/vstream.h
qmgr_transport.o: ../include/vbuf.h
-qmgr_transport.o: ../include/binattr.h
qmgr_transport.o: ../include/iostuff.h
qmgr_transport.o: ../include/mail_proto.h
qmgr_transport.o: ../include/recipient_list.h
sendmail.o: ../include/mymalloc.h
sendmail.o: ../include/vstream.h
sendmail.o: ../include/vbuf.h
-sendmail.o: ../include/binattr.h
sendmail.o: ../include/vstring.h
sendmail.o: ../include/msg_vstream.h
sendmail.o: ../include/msg_syslog.h
showq.o: ../include/vstring.h
showq.o: ../include/vbuf.h
showq.o: ../include/vstream.h
-showq.o: ../include/binattr.h
showq.o: ../include/vstring_vstream.h
showq.o: ../include/stringops.h
showq.o: ../include/mymalloc.h
SHELL = /bin/sh
-SRCS = smtp.c quote_821_local.c smtp_connect.c smtp_proto.c smtp_chat.c \
- smtp_session.c smtp_addr.c smtp_trouble.c smtp_unalias.c smtp_state.c \
+SRCS = smtp.c smtp_connect.c smtp_proto.c smtp_chat.c smtp_session.c \
+ smtp_addr.c smtp_trouble.c smtp_unalias.c smtp_state.c \
smtp_sasl_proto.c smtp_sasl_glue.c
-OBJS = smtp.o quote_821_local.o smtp_connect.o smtp_proto.o smtp_chat.o \
- smtp_session.o smtp_addr.o smtp_trouble.o smtp_unalias.o smtp_state.o \
+OBJS = smtp.o smtp_connect.o smtp_proto.o smtp_chat.o smtp_session.o \
+ smtp_addr.o smtp_trouble.o smtp_unalias.o smtp_state.o \
smtp_sasl_proto.o smtp_sasl_glue.o
HDRS = smtp.h smtp_sasl.h
TESTSRC =
-Wunused
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
-TESTPROG= quote_821_local smtp_unalias
+TESTPROG= smtp_unalias
PROG = smtp
INC_DIR = ../include
LIBS = ../lib/libmaster.a ../lib/libglobal.a ../lib/libdns.a ../lib/libutil.a
tidy: clean
-quote_821_local: quote_821_local.c $(LIBS)
- $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIBS) $(SYSLIBS)
-
smtp_unalias: smtp_unalias.c $(LIBS)
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIBS) $(SYSLIBS)
@$(EXPORT) make -f Makefile.in Makefile 1>&2
# do not edit below this line - it is generated by 'make depend'
-quote_821_local.o: quote_821_local.c
-quote_821_local.o: ../include/sys_defs.h
-quote_821_local.o: ../include/vstring.h
-quote_821_local.o: ../include/vbuf.h
-quote_821_local.o: quote_821_local.h
smtp.o: smtp.c
smtp.o: ../include/sys_defs.h
smtp.o: ../include/dict.h
smtp.o: ../include/vstream.h
smtp.o: ../include/vbuf.h
-smtp.o: ../include/binattr.h
smtp.o: ../include/argv.h
smtp.o: ../include/msg.h
smtp.o: ../include/mymalloc.h
smtp_addr.o: ../include/dns.h
smtp_addr.o: smtp.h
smtp_addr.o: ../include/vstream.h
-smtp_addr.o: ../include/binattr.h
smtp_addr.o: ../include/argv.h
smtp_addr.o: ../include/deliver_request.h
smtp_addr.o: ../include/recipient_list.h
smtp_chat.o: ../include/vstring.h
smtp_chat.o: ../include/vbuf.h
smtp_chat.o: ../include/vstream.h
-smtp_chat.o: ../include/binattr.h
smtp_chat.o: ../include/argv.h
smtp_chat.o: ../include/stringops.h
smtp_chat.o: ../include/line_wrap.h
smtp_connect.o: ../include/msg.h
smtp_connect.o: ../include/vstream.h
smtp_connect.o: ../include/vbuf.h
-smtp_connect.o: ../include/binattr.h
smtp_connect.o: ../include/vstring.h
smtp_connect.o: ../include/split_at.h
smtp_connect.o: ../include/mymalloc.h
smtp_proto.o: ../include/vstring.h
smtp_proto.o: ../include/vbuf.h
smtp_proto.o: ../include/vstream.h
-smtp_proto.o: ../include/binattr.h
smtp_proto.o: ../include/vstring_vstream.h
smtp_proto.o: ../include/stringops.h
smtp_proto.o: ../include/mymalloc.h
smtp_proto.o: ../include/mark_corrupt.h
smtp_proto.o: smtp.h
smtp_proto.o: ../include/argv.h
-smtp_proto.o: quote_821_local.h
+smtp_proto.o: ../include/quote_821_local.h
smtp_proto.o: smtp_sasl.h
smtp_sasl_glue.o: smtp_sasl_glue.c
smtp_sasl_glue.o: ../include/sys_defs.h
smtp_sasl_glue.o: ../include/maps.h
smtp_sasl_glue.o: ../include/dict.h
smtp_sasl_glue.o: ../include/vstream.h
-smtp_sasl_glue.o: ../include/binattr.h
smtp_sasl_glue.o: ../include/argv.h
smtp_sasl_glue.o: smtp.h
smtp_sasl_glue.o: ../include/deliver_request.h
smtp_sasl_proto.o: smtp.h
smtp_sasl_proto.o: ../include/vstream.h
smtp_sasl_proto.o: ../include/vbuf.h
-smtp_sasl_proto.o: ../include/binattr.h
smtp_sasl_proto.o: ../include/vstring.h
smtp_sasl_proto.o: ../include/argv.h
smtp_sasl_proto.o: ../include/deliver_request.h
smtp_session.o: ../include/mymalloc.h
smtp_session.o: ../include/vstream.h
smtp_session.o: ../include/vbuf.h
-smtp_session.o: ../include/binattr.h
smtp_session.o: ../include/stringops.h
smtp_session.o: ../include/vstring.h
smtp_session.o: smtp.h
smtp_state.o: ../include/vstring.h
smtp_state.o: ../include/vbuf.h
smtp_state.o: ../include/vstream.h
-smtp_state.o: ../include/binattr.h
smtp_state.o: ../include/mail_conf.h
smtp_state.o: smtp.h
smtp_state.o: ../include/argv.h
smtp_trouble.o: ../include/mymalloc.h
smtp_trouble.o: ../include/smtp_stream.h
smtp_trouble.o: ../include/vstream.h
-smtp_trouble.o: ../include/binattr.h
smtp_trouble.o: ../include/deliver_request.h
smtp_trouble.o: ../include/recipient_list.h
smtp_trouble.o: ../include/deliver_completed.h
smtp_unalias.o: ../include/dns.h
smtp_unalias.o: smtp.h
smtp_unalias.o: ../include/vstream.h
-smtp_unalias.o: ../include/binattr.h
smtp_unalias.o: ../include/argv.h
smtp_unalias.o: ../include/deliver_request.h
smtp_unalias.o: ../include/recipient_list.h
/*
* Append the addresses for this host to the address list.
*/
- switch (dns_lookup(host, T_A, 0, &addr, (VSTRING *) 0, why)) {
+ switch (dns_lookup(host, T_A, RES_DEFNAMES, &addr, (VSTRING *) 0, why)) {
case DNS_OK:
for (rr = addr; rr; rr = rr->next)
rr->pref = pref;
cp = saved_fallback_relay = mystrdup(var_fallback_relay);
for (pref = FB_PREF; (relay = mystrtok(&cp, " \t\r\n,")) != 0; pref++) {
smtp_errno = 0;
- switch (dns_lookup(relay, T_MX, 0, &mx_names, (VSTRING *) 0, why)) {
+ switch (dns_lookup(relay, T_MX, RES_DEFNAMES, &mx_names, (VSTRING *) 0, why)) {
default:
smtp_errno = SMTP_RETRY;
break;
smtpd.o: ../include/vstring.h
smtpd.o: ../include/vbuf.h
smtpd.o: ../include/vstream.h
-smtpd.o: ../include/binattr.h
smtpd.o: ../include/vstring_vstream.h
smtpd.o: ../include/stringops.h
smtpd.o: ../include/events.h
smtpd_chat.o: ../include/vstring.h
smtpd_chat.o: ../include/vbuf.h
smtpd_chat.o: ../include/vstream.h
-smtpd_chat.o: ../include/binattr.h
smtpd_chat.o: ../include/stringops.h
smtpd_chat.o: ../include/line_wrap.h
smtpd_chat.o: ../include/mymalloc.h
smtpd_check.o: ../include/mymalloc.h
smtpd_check.o: ../include/dict.h
smtpd_check.o: ../include/vstream.h
-smtpd_check.o: ../include/binattr.h
smtpd_check.o: ../include/htable.h
smtpd_check.o: ../include/dns.h
smtpd_check.o: ../include/namadr_list.h
smtpd_peer.o: ../include/vbuf.h
smtpd_peer.o: smtpd.h
smtpd_peer.o: ../include/vstream.h
-smtpd_peer.o: ../include/binattr.h
smtpd_peer.o: ../include/argv.h
smtpd_peer.o: ../include/mail_stream.h
smtpd_sasl_glue.o: smtpd_sasl_glue.c
smtpd_sasl_glue.o: ../include/vstring.h
smtpd_sasl_glue.o: ../include/vbuf.h
smtpd_sasl_glue.o: ../include/vstream.h
-smtpd_sasl_glue.o: ../include/binattr.h
smtpd_sasl_glue.o: smtpd.h
smtpd_sasl_glue.o: ../include/argv.h
smtpd_sasl_glue.o: ../include/mail_stream.h
smtpd_sasl_proto.o: ../include/mail_proto.h
smtpd_sasl_proto.o: ../include/vstream.h
smtpd_sasl_proto.o: ../include/vbuf.h
-smtpd_sasl_proto.o: ../include/binattr.h
smtpd_sasl_proto.o: ../include/iostuff.h
smtpd_sasl_proto.o: ../include/mail_error.h
smtpd_sasl_proto.o: ../include/name_mask.h
smtpd_state.o: ../include/mymalloc.h
smtpd_state.o: ../include/vstream.h
smtpd_state.o: ../include/vbuf.h
-smtpd_state.o: ../include/binattr.h
smtpd_state.o: ../include/name_mask.h
smtpd_state.o: ../include/msg.h
smtpd_state.o: ../include/cleanup_user.h
const char *errstr = 0;
#define IFELSE(e1,e2,e3) ((e1) ? (e2) : (e3))
-#define LOG_IFSET(text,var) IFELSE((var),(text),""), IFELSE((var),(var),"")
if (msg_verbose)
msg_info("%s: sasl_method %s%s%s", myname, sasl_method,
- LOG_IFSET(", init_response ", init_response));
+ IFELSE(init_response, ", init_response ", ""),
+ IFELSE(init_response, init_response, ""));
/*
* Sanity check.
void smtpd_sasl_mail_log(SMTPD_STATE *state)
{
#define IFELSE(e1,e2,e3) ((e1) ? (e2) : (e3))
-#define LOG_IFSET(text,var) IFELSE((var),(text),""), IFELSE((var),(var),"")
- msg_info("%s: client=%s[%s]%s%s%s%s",
+ msg_info("%s: client=%s[%s]%s%s%s%s%s%s",
state->queue_id, state->name, state->addr,
- LOG_IFSET(", sasl_method=", state->sasl_method),
- LOG_IFSET(", sasl_username=", state->sasl_username),
- LOG_IFSET(", sasl_sender=", state->sasl_sender));
+ IFELSE(state->sasl_method, ", sasl_method=", ""),
+ IFELSE(state->sasl_method, state->sasl_method, ""),
+ IFELSE(state->sasl_username, ", sasl_username=", ""),
+ IFELSE(state->sasl_username, state->sasl_username, ""),
+ IFELSE(state->sasl_sender, ", sasl_sender=", ""),
+ IFELSE(state->sasl_sender, state->sasl_sender, ""));
}
/* smtpd_sasl_mail_reset - SASL-specific MAIL FROM cleanup */
smtp-sink.o: ../include/vstring.h
smtp-sink.o: ../include/vbuf.h
smtp-sink.o: ../include/vstream.h
-smtp-sink.o: ../include/binattr.h
smtp-sink.o: ../include/vstring_vstream.h
smtp-sink.o: ../include/get_hostname.h
smtp-sink.o: ../include/listen.h
smtp-source.o: ../include/msg_vstream.h
smtp-source.o: ../include/vstream.h
smtp-source.o: ../include/vbuf.h
-smtp-source.o: ../include/binattr.h
smtp-source.o: ../include/vstring.h
smtp-source.o: ../include/vstring_vstream.h
smtp-source.o: ../include/get_hostname.h
spawn.o: ../include/dict.h
spawn.o: ../include/vstream.h
spawn.o: ../include/vbuf.h
-spawn.o: ../include/binattr.h
spawn.o: ../include/mymalloc.h
spawn.o: ../include/spawn_command.h
spawn.o: ../include/split_at.h
resolve.o: ../include/vstring.h
resolve.o: ../include/vbuf.h
resolve.o: ../include/vstream.h
-resolve.o: ../include/binattr.h
resolve.o: ../include/vstring_vstream.h
resolve.o: ../include/split_at.h
resolve.o: ../include/mail_params.h
rewrite.o: ../include/vstring.h
rewrite.o: ../include/vbuf.h
rewrite.o: ../include/vstream.h
-rewrite.o: ../include/binattr.h
rewrite.o: ../include/vstring_vstream.h
rewrite.o: ../include/split_at.h
rewrite.o: ../include/mail_params.h
transport.o: ../include/split_at.h
transport.o: ../include/dict.h
transport.o: ../include/vstream.h
-transport.o: ../include/binattr.h
transport.o: ../include/argv.h
transport.o: ../include/mail_params.h
transport.o: ../include/maps.h
trivial-rewrite.o: ../include/vstring.h
trivial-rewrite.o: ../include/vbuf.h
trivial-rewrite.o: ../include/vstream.h
-trivial-rewrite.o: ../include/binattr.h
trivial-rewrite.o: ../include/vstring_vstream.h
trivial-rewrite.o: ../include/split_at.h
trivial-rewrite.o: ../include/stringops.h
write_buf.c write_wait.c dict_unix.c dict_pcre.c stream_listen.c \
stream_connect.c stream_trigger.c dict_regexp.c mac_expand.c \
clean_env.c watchdog.c spawn_command.c duplex_pipe.c sane_rename.c \
- sane_link.c unescape.c timed_read.c timed_write.c binattr.c
+ sane_link.c unescape.c timed_read.c timed_write.c
OBJS = argv.o argv_split.o attr.o basename.o binhash.o chroot_uid.o \
close_on_exec.o concatenate.o dict.o dict_db.o dict_dbm.o \
dict_env.o dict_ht.o dict_ldap.o dict_mysql.o dict_ni.o dict_nis.o \
write_buf.o write_wait.o dict_unix.o dict_pcre.o stream_listen.o \
stream_connect.o stream_trigger.o dict_regexp.o mac_expand.o \
clean_env.o watchdog.o spawn_command.o duplex_pipe.o sane_rename.o \
- sane_link.o unescape.o timed_read.o timed_write.o binattr.o
+ sane_link.o unescape.o timed_read.o timed_write.o
HDRS = argv.h attr.h binhash.h chroot_uid.h connect.h dict.h dict_db.h \
dict_dbm.h dict_env.h dict_ht.h dict_ldap.h dict_mysql.h \
dict_ni.h dict_nis.h dict_nisplus.h dir_forest.h events.h \
timed_connect.h timed_wait.h trigger.h username.h valid_hostname.h \
vbuf.h vbuf_print.h vstream.h vstring.h vstring_vstream.h \
dict_unix.h dict_pcre.h dict_regexp.h mac_expand.h clean_env.h \
- watchdog.h spawn_command.h sane_fsops.h binattr.h
+ watchdog.h spawn_command.h sane_fsops.h
TESTSRC = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
stream_test.c dup2_pass_on_exec.c
WARN = -W -Wformat -Wimplicit -Wmissing-prototypes \
basename.o: stringops.h
basename.o: vstring.h
basename.o: vbuf.h
-binattr.o: binattr.c
-binattr.o: sys_defs.h
-binattr.o: mymalloc.h
-binattr.o: htable.h
-binattr.o: binattr.h
binhash.o: binhash.c
binhash.o: sys_defs.h
binhash.o: mymalloc.h
dict.o: mymalloc.h
dict.o: vstream.h
dict.o: vbuf.h
-dict.o: binattr.h
dict.o: vstring.h
dict.o: readlline.h
dict.o: mac_parse.h
dict_db.o: myflock.h
dict_db.o: dict.h
dict_db.o: vstream.h
-dict_db.o: binattr.h
dict_db.o: argv.h
dict_db.o: dict_db.h
dict_dbm.o: dict_dbm.c
dict_env.o: dict.h
dict_env.o: vstream.h
dict_env.o: vbuf.h
-dict_env.o: binattr.h
dict_env.o: argv.h
dict_env.o: dict_env.h
dict_ht.o: dict_ht.c
dict_ht.o: dict.h
dict_ht.o: vstream.h
dict_ht.o: vbuf.h
-dict_ht.o: binattr.h
dict_ht.o: argv.h
dict_ht.o: dict_ht.h
dict_ldap.o: dict_ldap.c
dict_nis.o: vbuf.h
dict_nis.o: dict.h
dict_nis.o: vstream.h
-dict_nis.o: binattr.h
dict_nis.o: argv.h
dict_nis.o: dict_nis.h
dict_nisplus.o: dict_nisplus.c
dict_nisplus.o: dict.h
dict_nisplus.o: vstream.h
dict_nisplus.o: vbuf.h
-dict_nisplus.o: binattr.h
dict_nisplus.o: argv.h
dict_nisplus.o: dict_nisplus.h
dict_open.o: dict_open.c
dict_open.o: dict.h
dict_open.o: vstream.h
dict_open.o: vbuf.h
-dict_open.o: binattr.h
dict_open.o: dict_env.h
dict_open.o: dict_unix.h
dict_open.o: dict_dbm.h
dict_regexp.o: safe.h
dict_regexp.o: vstream.h
dict_regexp.o: vbuf.h
-dict_regexp.o: binattr.h
dict_regexp.o: vstring.h
dict_regexp.o: stringops.h
dict_regexp.o: readlline.h
dict_unix.o: vbuf.h
dict_unix.o: dict.h
dict_unix.o: vstream.h
-dict_unix.o: binattr.h
dict_unix.o: argv.h
dict_unix.o: dict_unix.h
dir_forest.o: dir_forest.c
match_list.o: vstring.h
match_list.o: vbuf.h
match_list.o: vstream.h
-match_list.o: binattr.h
match_list.o: vstring_vstream.h
match_list.o: stringops.h
match_list.o: argv.h
match_ops.o: dict.h
match_ops.o: vstream.h
match_ops.o: vbuf.h
-match_ops.o: binattr.h
match_ops.o: argv.h
match_ops.o: match_ops.h
match_ops.o: stringops.h
msg_output.o: vstring.h
msg_output.o: vbuf.h
msg_output.o: vstream.h
-msg_output.o: binattr.h
msg_output.o: msg_vstream.h
msg_output.o: stringops.h
msg_output.o: percentm.h
msg_vstream.o: sys_defs.h
msg_vstream.o: vstream.h
msg_vstream.o: vbuf.h
-msg_vstream.o: binattr.h
msg_vstream.o: msg.h
msg_vstream.o: msg_output.h
msg_vstream.o: msg_vstream.h
open_lock.o: msg.h
open_lock.o: vstream.h
open_lock.o: vbuf.h
-open_lock.o: binattr.h
open_lock.o: vstring.h
open_lock.o: safe_open.h
open_lock.o: myflock.h
readlline.o: sys_defs.h
readlline.o: vstream.h
readlline.o: vbuf.h
-readlline.o: binattr.h
readlline.o: vstring.h
readlline.o: readlline.h
ring.o: ring.c
safe_open.o: msg.h
safe_open.o: vstream.h
safe_open.o: vbuf.h
-safe_open.o: binattr.h
safe_open.o: vstring.h
safe_open.o: safe_open.h
sane_accept.o: sane_accept.c
select_bug.o: msg.h
select_bug.o: vstream.h
select_bug.o: vbuf.h
-select_bug.o: binattr.h
select_bug.o: msg_vstream.h
set_eugid.o: set_eugid.c
set_eugid.o: sys_defs.h
stream_test.o: msg_vstream.h
stream_test.o: vstream.h
stream_test.o: vbuf.h
-stream_test.o: binattr.h
stream_test.o: listen.h
stream_test.o: connect.h
stream_trigger.o: stream_trigger.c
vstream.o: iostuff.h
vstream.o: vstring.h
vstream.o: vstream.h
-vstream.o: binattr.h
vstream_popen.o: vstream_popen.c
vstream_popen.o: sys_defs.h
vstream_popen.o: msg.h
vstream_popen.o: exec_command.h
vstream_popen.o: vstream.h
vstream_popen.o: vbuf.h
-vstream_popen.o: binattr.h
vstream_popen.o: argv.h
vstream_popen.o: set_ugid.h
vstream_popen.o: clean_env.h
vstring_vstream.o: vstring.h
vstring_vstream.o: vbuf.h
vstring_vstream.o: vstream.h
-vstring_vstream.o: binattr.h
vstring_vstream.o: vstring_vstream.h
watchdog.o: watchdog.c
watchdog.o: sys_defs.h
+++ /dev/null
-/*++
-/* NAME
-/* binattr 3
-/* SUMMARY
-/* binary-valued attribute list manager
-/* SYNOPSIS
-/* #include <binattr.h>
-/*
-/* typedef struct {
-/* .in +4
-/* char *key;
-/* char *value;
-/* /* private fields... */
-/* .in -4
-/* } BINATTR_ENTRY;
-/*
-/* BINATTR *binattr_create(size)
-/* int size;
-/*
-/* char *binattr_get(table, name)
-/* BINATTR *table;
-/* const char *name;
-/*
-/* BINATTR_ENTRY *binattr_set(table, name, value, free_fn)
-/* BINATTR *table;
-/* const char *name;
-/* void (*free_fn)(char *);
-/*
-/* void binattr_unset(table, name)
-/* BINATTR *table;
-/* const char *name;
-/*
-/* void binattr_free(table)
-/* BINATTR *table;
-/* DESCRIPTION
-/* This module maintains open attribute lists of arbitrary
-/* binary values. Each attribute has a string-valued name.
-/* The caller specifies the memory management policy for
-/* attribute values, which can be arbitrary binary data.
-/* Attribute lists grow on demand as entries are added.
-/*
-/* binattr_create() creates a table of the specified size,
-/* or whatever the underlying code deems suitable.
-/*
-/* binattr_get() looks up the named attribute in the specified
-/* attribute list, and returns the value that was stored with
-/* binattr_set(). The result is a null pointer when the requested
-/* information is not found.
-/*
-/* binattr_set() adds or replaces the named entry in the specified
-/* attribute list. This function expects as attribute value a
-/* generic character pointer. Use proper casts when storing data of
-/* a different type, or the result will be undefined.
-/*
-/* binattr_unset() removes the named attribute from the specified
-/* attribute list. This operation is undefined for non-existing
-/* attributes.
-/*
-/* binattr_free() destroys the specified attribute list including
-/* the information that is stored in it.
-/*
-/* Arguments:
-/* .IP table
-/* Open attribute list created with binattr_create.
-/* .IP name
-/* Attribute name. Attribute names are unique within a list.
-/* .IP value
-/* The value stored under the named attribute.
-/* .IP free_fn
-/* Pointer to function that destroys the value stored under the
-/* named attribute, or a null pointer.
-/* DIAGNOSTICS
-/* Panic: interface violations and internal consistency problems.
-/* Fatal errors: out of memory.
-/* 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>
-
-/* Utility library. */
-
-#include <mymalloc.h>
-#include <htable.h>
-#include "binattr.h"
-
-/* binattr_create - create binary attribute list */
-
-BINATTR *binattr_create(int size)
-{
- return (htable_create(size));
-}
-
-/* binattr_free - destroy binary attribute list */
-
-void binattr_free(BINATTR *table)
-{
- HTABLE_INFO **info;
- HTABLE_INFO **ht;
- BINATTR_INFO *h;
-
- for (ht = info = htable_list(table); *ht != 0; ht++) {
- h = (BINATTR_INFO *) (ht[0]->value);
- if (h->free_fn)
- h->free_fn(h->value);
- }
- myfree((char *) info);
-}
-
-/* binattr_get - look up binary attribute */
-
-char *binattr_get(BINATTR *table, const char *name)
-{
- BINATTR_INFO *info;
-
- return ((info = (BINATTR_INFO *) htable_find(table, name)) == 0 ? 0 : info->value);
-}
-
-/* binattr_set - set or replace binary attribute */
-
-BINATTR_INFO *binattr_set(BINATTR *table, const char *name, char *value, BINATTR_FREE_FN free_fn)
-{
- BINATTR_INFO *info;
-
- if ((info = (BINATTR_INFO *) htable_find(table, name)) != 0) {
- if (info->value != value) {
- if (info->free_fn)
- info->free_fn(info->value);
- info->value = value;
- }
- info->free_fn = free_fn;
- } else {
- info = (BINATTR_INFO *) mymalloc(sizeof(*info));
- info->value = value;
- info->free_fn = free_fn;
- htable_enter(table, name, (char *) info);
- }
- return (info);
-}
-
-/* binattr_free_callback - destructor callback */
-
-static void binattr_free_callback(char *ptr)
-{
- BINATTR_INFO *info = (BINATTR_INFO *) ptr;
-
- if (info->free_fn)
- info->free_fn(info->value);
-}
-
-/* binattr_unset - remove attribute */
-
-void binattr_unset(BINATTR *table, const char *name)
-{
- htable_delete(table, name, binattr_free_callback);
-}
+++ /dev/null
-#ifndef _BINATTR_H_INCLUDED_
-#define _BINATTR_H_INCLUDED_
-
-/*++
-/* NAME
-/* binattr 3h
-/* SUMMARY
-/* binary-valued attribute list manager
-/* SYNOPSIS
-/* #include <binattr.h>
-/* DESCRIPTION
-/* .nf
-
- /* Structure of one hash table entry. */
-
-typedef void (*BINATTR_FREE_FN) (char *);
-
-typedef struct BINATTR_INFO {
- char *key; /* lookup key */
- char *value; /* associated value */
- BINATTR_FREE_FN free_fn; /* destructor */
-} BINATTR_INFO;
-
- /* Structure of one hash table. */
-
-typedef struct HTABLE BINATTR;
-
-extern BINATTR *binattr_create(int);
-extern void binattr_free(BINATTR *);
-extern char *binattr_get(BINATTR *, const char *);
-extern BINATTR_INFO *binattr_set(BINATTR *, const char *, char *, BINATTR_FREE_FN);
-extern void binattr_unset(BINATTR *, 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
-/* CREATION DATE
-/* Fri Feb 14 13:43:19 EST 1997
-/* LAST MODIFICATION
-/* %E% %U%
-/* VERSION/RELEASE
-/* %I%
-/*--*/
-
-#endif
* Utility library.
*/
#include <vbuf.h>
-#include <binattr.h>
/*
* Simple buffered stream. The members of this structure are not part of the