Index: head/mail/sendmail/files/CYRUS_LOOKUP =================================================================== --- head/mail/sendmail/files/CYRUS_LOOKUP (revision 118770) +++ head/mail/sendmail/files/CYRUS_LOOKUP (revision 118771) @@ -1,80 +1,79 @@ CYRUS MAILBOX LOOKUP FOR SENDMAIL --------------------------------- You have enabled modifications for sendmail for looking up whether a cyrus (2.2.3+) mailbox exists and is under quota before accepting any mail to be relayed to cyrus. They are based on the idea and work by -Andrzej Filip +Andrzej Filip, http://anfi.homeunix.net/sendmail/rtcyrus2.html +and +Mike Boev, http://tric.ru/users/mike/ckuser_cyrus/ -published at - -http://anfi.homeunix.net/sendmail/rtcyrus2.html. - -Please, use this url to learn all configuration details +Please, use these urls to learn all configuration details (although a quick recipe is provided below) and may be to give -credits to the author. - +credits to the authors. ****************************************************************** +IMPORTANT: +Now that the mrs_cyrus.m4 has been updated, you may need to adjust +the modifications you made to your .mc file if you used the old one! +See http://anfi.homeunix.net/sendmail/rtcyrus2.html for current +installation instructions. +****************************************************************** HOW TO : --------- 0. Build the `mail/sendmail' sendmail port with SENDMAIL_WITH_SOCKETMAP=yes SENDMAIL_WITH_CYRUSLOOKUP=yes This is what you've just obviously done, unless you are just browsing the ports tree. To stick with these settings, you can place something like the following in your `/etc/make.conf'. PORTSDIR?= /usr/ports .if ${.CURDIR} == ${PORTSDIR}/mail/sendmail SENDMAIL_WITH_CYRUSLOOKUP= yes SENDMAIL_WITH_SOCKETMAP= yes # possibly other sendmail knobs here too. .endif You should have also installed and configured Cyrus IMAP server, version 2.2.3 or higher. Not the worst idea is to utilize the `mail/cyrus-imapd22' port. 1. Insert the following lines to the SERVICES sections of `cyrus.conf'. By default, the port installs it to `/usr/local/etc'. # Sendmail socket map smmapd(8) smmap cmd="smmapd" listen="/var/imap/socket/smmapd" prefork=0 A SIGHUP would make the Cyrus master(8) process catch this change on-the-fly. Please, also note, that if sendmail and cyrus run on separate machines, you will obviously need to modify this line and a couple of others. 2. As per the `install-configure' from Cyrus IMAP server's documentation, - in the simplest case, you add: + in the simplest case, you added: define(`confLOCAL_MAILER', `cyrusv2')dnl MAILER(`cyrusv2')dnl to your sendmail's .mc file to make local delivery to Cyrus mailboxes. - Per the instructions, provided by Andrzej Filip (see the above URL), - these lines should become: + Now, simply add (somewhere near other FEATURES, before MAILER lines): - define(`LOCAL_RELAY',`mrs_cyrus_user:stripdom')dnl - FEATURE(`mrs')dnl - FEATURE(`mrs_cyrus')dnl - MODIFY_MAILER_FLAGS(`CYRUSV2',`-A5')dnl - MAILER(`cyrusv2')dnl + FEATURE(`ckuser_cyrus')dnl for sendmail to start rejecting local addresses for nonexisting and full mailboxes. Rebuild your sendmail.cf, restart sendmail, and enjoy! - If your configuration is more complicated than the above two lines, - read Andrzej's article. It contains more examples. + If your configuration is more complicated than just defining Cyrus + as your local mailer, read Andrzej's article. It covers more of the + other cases. ****************************************************************** -2004, April 8th +2004, September 16th Michael O. Boev, mike@tric.ru. Property changes on: head/mail/sendmail/files/CYRUS_LOOKUP ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/mail/sendmail/files/cyruslookup.patch =================================================================== --- head/mail/sendmail/files/cyruslookup.patch (revision 118770) +++ head/mail/sendmail/files/cyruslookup.patch (revision 118771) @@ -1,119 +1,157 @@ -*** cf/m4/proto.m4 2004/03/09 15:49:38 1.1 ---- cf/m4/proto.m4 2004/03/10 20:29:48 -*************** -*** 1299,1304 **** ---- 1299,1307 ---- - R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 - R< error : $+ > $* $#error $: $1 - R< local : $* > $* $>CanonLocal < $1 > $2 -+ ifdef(`_MRS_RELAY_',`dnl -+ R< $={MRS} : $* > $* $@ $> $1 < $2 > $3 -+ dnl') - dnl it is $~[ instead of $- to avoid matches on IPv6 addresses - R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user - R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer ---- /dev/null Wed Apr 7 20:03:20 2004 -+++ cf/feature/mrs.m4 Tue Mar 23 14:00:30 2004 -@@ -0,0 +1,25 @@ +diff -ruN cf.orig/feature/ckuser_cyrus.m4 cf/feature/ckuser_cyrus.m4 +--- cf.orig/feature/ckuser_cyrus.m4 Thu Jan 1 07:00:00 1970 ++++ cf/feature/ckuser_cyrus.m4 Wed Sep 22 19:53:53 2004 +@@ -0,0 +1,34 @@ +divert(-1) ++# Written by Mike Boev , 2004. ++# Homepage: http://tric.ru/users/mike/ckuser_cyrus/ ++# Inspired by: mrs_cyrus.m4 by Andrzej Adam Filip ++# ++# By using this file, you agree to the terms and conditions set ++# forth in the LICENSE file which can be found at the top level of ++# the sendmail distribution. ++# ++divert(0) ++VERSIONID(`Id: ckuser_cyrus.m4,v 1.4 2004/09/21 19:02:17 m Exp ') ++divert(-1) ++define(`CYRUS_SMMAPD_SOCKET', ++ ifelse(len(X`'_ARG_), `1', `local:/var/imap/socket/smmapd', _ARG_)) ++ ++MODIFY_MAILER_FLAGS(`CYRUSV2',`+5') ++ ++LOCAL_CONFIG ++# Cyrus smmapd(8)'s map for verifying mailboxes of local recipients ++Kcyrus socket -a -T CYRUS_SMMAPD_SOCKET ++ ++LOCAL_RULESETS ++SLocal_localaddr ++R$+ $: $> "ckuser_cyrus" $1 ++ ++Sckuser_cyrus ++#Query smmapd(8) ++R$+ $: $1 $| $(cyrus $1 $: $) ++#Cyrus OK, skip ++R $* $| $* $@ $1 ++#Over quota or lookup failure ++R $* $| $* $# error $@ 4.3.0 $: "451 TEMPFAIL." ++#Mailbox doesn't exist or its ACL forbids posting ++R $* $| $* $# error $@ 5.1.1 $: "550 Mailbox is not available." +diff -ruN cf.orig/feature/mrs_cyrus.m4 cf/feature/mrs_cyrus.m4 +--- cf.orig/feature/mrs_cyrus.m4 Thu Jan 1 07:00:00 1970 ++++ cf/feature/mrs_cyrus.m4 Wed Sep 22 19:55:05 2004 +@@ -0,0 +1,77 @@ ++divert(-1) +dnl -+dnl Updates: http://anfi.homeunix.net/sendmail/mrs.html ++dnl Updates: http://anfi.webhop.net/sendmail/mrs.html +dnl +dnl By using this file, you agree to the terms and conditions set +dnl forth in the LICENSE file which can be found at the top level of +dnl the sendmail distribution (sendmail-8.12). +dnl +dnl Contributed by Andrzej Filip +dnl +dnl THE FEATURE REQUIRES PATCHING cf/m4/proto.m4 +dnl SEE THE LINK AFTER "Updates:" +dnl +dnl $Log: mrs.m4,v $ +dnl Revision 8.3 2004/03/18 21:39:22 anfi +dnl Changed comments prefixes to dnl to avoid m4 expansions +dnl +dnl Revision 8.2 2004/03/15 09:14:28 anfi +dnl Added "Updates:" web link. +dnl +divert(0) +VERSIONID(`$Id: mrs.m4,v 8.3 2004/03/18 21:39:22 anfi Exp $') +divert(-1) + +define(`_MRS_RELAY_', `') --- /dev/null Thu Apr 8 15:55:21 2004 +++ cf/feature/mrs_cyrus.m4 Thu Apr 1 21:37:05 2004 @@ -0,0 +1,74 @@ +divert(-1) +dnl +dnl Updates: http://anfi.homeunix.net/sendmail/rtcyrus2.html +dnl +dnl By using this file, you agree to the terms and conditions set +dnl forth in the LICENSE file which can be found at the top level of +dnl the sendmail distribution (sendmail-8.12). +dnl +dnl Contributed by Andrzej Filip +dnl +dnl $Log: mrs_cyrus.m4,v $ +dnl Revision 8.7 2004/04/01 14:29:50 anfi +dnl Added "stripdom" handling in mrs_cyrus_user. +dnl Fully defined error mailer details. +dnl +dnl Revision 8.6 2004/03/18 23:17:57 anfi +dnl Fundamental rewrite. +dnl +ifdef(`_MRS_RELAY_',`', + `errprint(`*** ERROR: FEATURE(mrs_cyrus) requires FEATURE(mrs) +')') +ifdef(`_MRS_CYRUS_', + `errprint(`*** ERROR: There can be only one FEATURE(mrs_cyrus*) +')') +define(`_MRS_CYRUS_',`') + +divert(0) -+VERSIONID(`$Id: mrs_cyrus.m4,v 8.7 2004/04/01 14:29:50 anfi Exp $') ++VERSIONID(`$Id: mrs_cyrus.m4,v 8.8 2004/08/11 18:20:05 anfi Exp $') +divert(-1) +define(`CYRUS_SMMAPD_SOCKET', + ifelse(len(X`'_ARG_), `1', `/var/imap/socket/smmapd', _ARG_)) +define(`CYRUS_SMMAPD_SOCKET_TYPE', + ifelse(len(X`'_ARG2_), `1', `local', _ARG2_)) +LOCAL_CONFIG +# Add 3 mrs_cyrus rule sets to list of valid mrs rule sets +C{MRS}mrs_cyrus_user mrs_cyrus_mailertable mrs_cyrus_stickyhub +# map for checking cyrus imap mailbox existence +Kcyrus socket -a -T CYRUS_SMMAPD_SOCKET_TYPE:CYRUS_SMMAPD_SOCKET + +LOCAL_RULESETS +###################################################################### +### feature mrs_cyrus rulesets to be used by feature mrs +###################################################################### + +Smrs_cyrus_user +R<$*> $+ <@$+.> $: <$1> $2 <@ $3 > +R<$*> $+ <@$*> $: <$1> $2 <@$3> $| $(cyrus $2 $: $) +R<$*> $+ <@$*> $| $* $# error $@ 4.3.0 $: "451 Temporary system failure. Please try again later." +R<$*> $+ <@$*> $| $* $# cyrusv2 $@ dummy $: $4 +R<$*> $+ <@$*> $| $* $: <$1> $2 <@$3> -+R $+ <@stripdom> $@ $1 ++R $+ <@dummy> $@ $1 +R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 +R< $+ > $* $>MailerToTriple < $1 > $2 +R< > $* $# error $@ 5.1.1 $: "550 User unknown" + +Smrs_cyrus_mailertable +R<$*> $+ <@$+.> $: <$1> $2 <@ $3 > +R<$*> $+ <@$+> $: <$1> $2 <@$3> $| $(cyrus $2@$3 $: $) +R<$*> $+ <@$+> $| $* $# error $@ 4.3.0 $: "451 Temporary system failure. Please try again later." +R<$*> $+ <@$+> $| $* $# cyrusv2d $@ dummy $: $2 <@$3> +R<$*> $+ <@$*> $| $* $: <$1> $2 <@$3> +R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 +R< $+ > $* $>MailerToTriple < $1 > $2 +R< > $* $# error $@ 5.1.1 $: "550 User unknown" + +Smrs_cyrus_stickyhub +R $+ <@$+.> $: $1 <@ $2 > +R $* <@dummy> $@ $1 +R $+ <@$={VirtCyrus}> $: $1 <@$2> $| $(cyrus $1@$2 $: $) +R $+ <@$={VirtCyrus}> $| $* $# error $@ 4.3.0 $: "451 Temporary system failure. Please try again later." +R $+ <@$={VirtCyrus}> $| $* $# cyrusv2d $@ dummy $: $1 <@$2> +R $+ <@$={VirtCyrus}> $| $* $# error $@ 5.1.1 $: "550 User unknown" +R $=L <@$*> $# ifdef(`confLOCAL_MAILER',confLOCAL_MAILER,`local') $: @$1 +R $* <@$*> $# ifdef(`confLOCAL_MAILER',confLOCAL_MAILER,`local') $: $1 +diff -ruN cf.orig/m4/proto.m4 cf/m4/proto.m4 +--- cf.orig/m4/proto.m4 Wed Sep 22 20:15:04 2004 ++++ cf/m4/proto.m4 Wed Sep 22 19:52:41 2004 +@@ -1315,6 +1315,9 @@ + R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 + R< error : $+ > $* $#error $: $1 + R< local : $* > $* $>CanonLocal < $1 > $2 ++ifdef(`_MRS_RELAY_',`dnl ++R< $={MRS} : $* > $* $@ $> $1 < $2 > $3 ++dnl') + dnl it is $~[ instead of $- to avoid matches on IPv6 addresses + R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user + R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer Property changes on: head/mail/sendmail/files/cyruslookup.patch ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/mail/sendmail/files/pkg-milter =================================================================== --- head/mail/sendmail/files/pkg-milter (revision 118770) +++ head/mail/sendmail/files/pkg-milter (revision 118771) @@ -1,43 +1,50 @@ include/libmilter/mfapi.h include/libmilter/mfdef.h lib/libmilter.a @dirrm include/libmilter %%PORTDOCS%%share/doc/sendmail/MILTER %%PORTDOCS%%share/doc/sendmail/libmilter/api.html %%PORTDOCS%%share/doc/sendmail/libmilter/design.html %%PORTDOCS%%share/doc/sendmail/libmilter/figure1.fig %%PORTDOCS%%share/doc/sendmail/libmilter/figure1.jpg %%PORTDOCS%%share/doc/sendmail/libmilter/figure1.ps %%PORTDOCS%%share/doc/sendmail/libmilter/figure2.fig %%PORTDOCS%%share/doc/sendmail/libmilter/figure2.jpg %%PORTDOCS%%share/doc/sendmail/libmilter/figure2.ps %%PORTDOCS%%share/doc/sendmail/libmilter/index.html %%PORTDOCS%%share/doc/sendmail/libmilter/installation.html %%PORTDOCS%%share/doc/sendmail/libmilter/other.html %%PORTDOCS%%share/doc/sendmail/libmilter/overview.html %%PORTDOCS%%share/doc/sendmail/libmilter/sample.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_addheader.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_addrcpt.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_chgheader.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_delrcpt.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_getpriv.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_getsymval.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_insheader.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_main.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_opensocket.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_progress.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_quarantine.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_register.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_replacebody.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setbacklog.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setconn.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setdbg.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setmlreply.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setpriv.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_setreply.html %%PORTDOCS%%share/doc/sendmail/libmilter/smfi_settimeout.html +%%PORTDOCS%%share/doc/sendmail/libmilter/smfi_stop.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_abort.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_body.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_close.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_connect.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_envfrom.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_envrcpt.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_eoh.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_eom.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_header.html %%PORTDOCS%%share/doc/sendmail/libmilter/xxfi_helo.html %%PORTDOCS%%@dirrm share/doc/sendmail/libmilter Property changes on: head/mail/sendmail/files/pkg-milter ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.6 \ No newline at end of property +1.7 \ No newline at end of property