Working Vacation?? [solved?]

Mark Keasling mark at air.co.jp
Fri Jan 24 03:21:45 EST 2003


Hi,

>Gary Mills says
> Sendmail can rewrite header addresses for local delivery.  This works
> well.  It's only the envelope recipient that has the domain stripped.

And it has only taken a week or two to figure out how to prevent that...
cyrusv2.mc patch:
-----cyrusv2.mc-----
  # divert(-1)
  #
  #       (C) Copyright 2000 by Carnegie Mellon University
  #
  #       This sample mc file is for a site that uses the Cyrus IMAP server
  #       exclusively for local mail. This requires Sendmail 8.10 or later.
  #
  # $Id: cyrusv2.mc,v 1.4 2001/08/23 23:26:56 leg Exp $
  
  divert(0)dnl
  VERSIONID(`cyrus v2 sample configuartion')
  
  OSTYPE(linux)
  define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
  define(`confTO_IDENT',`0')
  
  dnl setting cyrus as the trusted user will make it easier to pass
  dnl Sendmail's safefile checks.  however, it means that someone with the
  dnl "cyrus" password could easily become root.
  dnl define(`confTRUSTED_USER', `cyrus')
  
  define(`confLOCAL_MAILER', `cyrus')
  
  dnl if you aren't using Sendmail 8.12, you might need to remove
  dnl the following feature.
  FEATURE(`preserve_local_plus_detail')
  
  FEATURE(`nocanonify')
  FEATURE(`always_add_domain')
  MAILER(`local')
  MAILER(`smtp')
  
  MAILER_DEFINITIONS
  Mcyrus,         P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
-                 S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, 
+                 S=EnvFromL, R=HdrToL, T=DNS/RFC822/X-Unix, 
                A=FILE /var/imap/socket/lmtp
  
  LOCAL_RULE_0
  Rbb + $+ < @ $=w . >    $#cyrus $: + $1
  
--------------------

Dump `EnvToL/' from R= and you get working sieve vacations.
The fix turned out to be rather trivial.

Does anyone spot problems with this?

On Thu, 23 Jan 2003 08:25:05 -0600, Gary Mills <mills at cc.umanitoba.ca> wrote...
> On Thu, Jan 23, 2003 at 08:02:42PM +0900, Mark Keasling wrote:
> > 
> > Sendmail is removing the domain part from smtp envelope TO
> > addresses (RCPT TO) when they are sent to the local deliverer
> > in my case LMTP.  Apparently, there is no way to avoid this
> > obnoxious behavior.  Hacking on sendmail.cf has had no effect.
> 
> Yes, sendmail assumes that the domain name is not needed for the
> envelope recipient for local delivery.
> 
> > No vacation reply gets sent because lmtpd substitutes "unspecified-domain"
> > for the domain which was removed by sendmail.  Its "to me" check
> > fails because user at unspecified-domain is definitely not in the
> > message's headers.
> 
> Yes, when I was debugging this, I found that CCing the message to
> user at unspecified-domain would cause vacation to work!
> 
> > The following patches seem to fix the sieve vacation problem.
> > It would be nice if these patches could be incorporated into
> > the main source so that other people who use sendmail can have
> > vacations too.  If someone spots a problem with these patches
> > or notices a deficiency PLEASE let me know how they should be
> > fixed as I'll be putting them into production use RSN.
> 
> I'm using a similar set of patches.  I did submit them to the Cyrus
> maintainers, but they were rejected as unnecessary.
> 
> > There will be some interactions with aliases where user at domain.com
> > user at subdomain.domain.com and user at hostname.subdomain.domain.com
> > are all equivalent and all are used.  Mail sent to one address will
> > get vacation replies while mail sent to the others will not.  I
> > know of no simple way to solve this unless sendmail is kind enough
> > to rewrite the addresses in the message header.
> 
> Sendmail can rewrite header addresses for local delivery.  This works
> well.  It's only the envelope recipient that has the domain stripped.
> 
> -- 
> -Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

Regards,
Mark Keasling <mark at air.co.jp>





More information about the Info-cyrus mailing list