[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zmailer accepts mail from <> (empty address) - causes problems




  Well, since the only possible cause for this that was suggested was 
configuration:executable mismatch and I checked for this, I went ahead and
patched the code to errormail to count <> as an empty sender also.  I 
provide it here in case anyone else has the symptoms:

----BEGIN---------------------BEGIN-------------------BEGIN---------------
*** errormail.c.~1.12.~	Wed Apr 17 10:42:23 2002
--- errormail.c	Mon Oct 28 11:14:02 2002
***************
*** 236,241 ****
--- 236,242 ----
  	Sfio_t *mfp, *efp;
  	int n;
  	struct rcpt *rp;
+ 	struct taddress *sp;
  	char boundarystr[400];
  	char lastchar;
  	int reportcnt = 0;
***************
*** 261,266 ****
--- 262,296 ----
  	    diagnostic(verboselog, rp, EX_OK, 0, "error bounce dropped");
  	  return;
  	}
+ 	else {
+ 	  char emptyness = 1; /* Boolean whether it is empty. */
+           /* Check the senders for blank-ness with "<>" */
+           for (sp=dp->senders; sp != NULL; sp = sp->link) {
+             const char *user = sp->user, 
+ 	      *host = sp->host;
+ 	    
+             if  ( ( strncmp (user, "<>", 3) == 0 ) || 
+                   (strncmp (user, "", 2) == 0) ) {
+ 	      /* emptyness = 1;  */   /* This is the default */
+             }
+             else {
+ 	      emptyness = 0;
+             }
+           }
+           if ( emptyness ) {
+ 	    /*
+ 	     * If there was no error return address
+ 	     * it might be because this message was
+ 	     * an error message being bounced back.
+ 	     * We do NOT want to bounce this, but
+ 	     * instead just drop it on the floor.
+ 	     */
+ 	    for (rp = dp->recipients; rp != NULL; rp = rp->next)
+ 	      diagnostic(rp, EX_OK, 0, "error bounce dropped");
+ 	    return;
+           }
+         }
+ 	
  
  	if ((mfp = sfmail_open(MSG_RFC822)) == NULL) {
  	  for (rp = dp->recipients; rp != NULL; rp = rp->next)

---END-----------------------END-----------------------END--------------


  diff seems to have done something sort of odd with the indentation.
It looks fine in emacs, but does not look right when I do a diff.  Oh well, 
you get the idea.

  Have a nice day all,


-- 
  Chris Maxwell
  Unix SysAdmin, Faculty of Computer Science, 
  Dalhousie University, Halifax, Nova Scotia, Canada
  (902) 494-1369 / chris.maxwell@dal.ca / FAX: (902) 492-1517


On Fri, Oct 11, 2002 at 02:31:46PM -0300, Chris Maxwell wrote:
>   I have a problem that is sort of related.
> 
> 
> Running: Zmailer 2.99.55 on  Solaris 8
> 
> 
>   This is all well and good, and I have been forced to go back to being 
> compliant because I was also losing listserv responses.  However, I am getting 
> many messages sent to the mailer-demon, which we have aliased to 
> our support group alias.  The messages look like this:
> 
> 
> ======================================================================
> To:	mailer-daemon@cs.dal.ca
> From:	The Post Office <postmaster@cs.dal.ca>
> Sender:	mailer-daemon@cs.dal.ca
> Subject: Invalid message envelope information
> 
> Error in "to" envelope address:
> 
> 	<< > >
> 	 ^-expected word, illegal end of route address, missing end of address
> 
> 
> Error in "To" header address:
> 
> 	<< > >
> 	 ^-expected word, illegal end of route address, missing end of address
> 
> 
> 
> The entire original message file follows.
> 
> -----------------------------------------
> rcvdfrom STDIN ("??"@waffle.cs.dal.ca)
> channel error
> todsn NOTIFY=NEVER ORCPT=RFC822;<>
> to <<>>
> env-end
> To: <<>>
> From: The Post Office <postmaster@cs.dal.ca>
> Sender:	mailer-daemon@cs.dal.ca
> Subject: Errors: No such user(s)
> MIME-Version: 1.0
> Content-Type: multipart/report; report-type=delivery-status;
> 	boundary="S247969AbSJISYP=_/errmail/waffle.cs.dal.ca"
> 
> 
> --S247969AbSJISYP=_/errmail/waffle.cs.dal.ca
> Content-Type: text/plain
> 
> This is a collection of reports about email delivery
> process concerning a message you originated:
> 
> 
> error: nosuchuser: cweqx@cs.dal.ca
> 
> --S247969AbSJISYP=_/errmail/waffle.cs.dal.ca
> Content-Type: message/delivery-status
> 
> Reporting-MTA: dns; waffle.cs.dal.ca
> Arrival-Date: Wed, 9 Oct 2002 15:24:14 -0300
> 
> Original-Recipient: rfc822;cweqx@cs.dal.ca
> Final-Recipient: RFC822; cweqx@cs.dal.ca
> Action: failed
> Status: 5.0.0
> Diagnostic-Code: X-LOCAL; 500 (nosuchuser)
> 
> --S247969AbSJISYP=_/errmail/waffle.cs.dal.ca
> Content-Type: message/rfc822
> 
> Date:	Thu, 10 Oct 2002 00:03:11 +0900
> From:	Mail Delivery Subsystem <MAILER-DAEMON@newtiis.co.kr>
> Message-Id: <200210091503.g99F3Bj13747@newtiis.co.kr>
> To:	<cweqx@cs.dal.ca>
> Subject: Returned mail: see transcript for details
> Auto-Submitted:	auto-generated (failure)
> 
> 
> This is a MIME-encapsulated message
> 
> --g99F3Bj13747.1034175791/newtiis.co.kr
> 
> The original message was received at Wed, 9 Oct 2002 23:53:23 +0900
> from 200-204-118-235.dsl.telesp.net.br [200.204.118.235]
> 
>    ----- The following addresses had permanent fatal errors -----
> <tamtheram@ipxnet.com>
>     (reason: 550 Host unknown)
> <onesti@ix.netcom.com>
>     (reason: 550 Dialups/open relays blocked. Contact <openrelay@abuse.earthlink.net>.)
> <rogbabb@ix.netcom.com>
>     (reason: 550 Dialups/open relays blocked. Contact <openrelay@abuse.earthlink.net>.)
> 
> [.....]
> 
> ======================================================================
> 
> 
>   So, here is my take:
> 
> +random_spam.net -> newtiis.co.kr
>   MAIL From: <cweqx@cs.dal.ca>
>   RCPT To: <various recipients>
> 
>    Hi!  I am a spammer!
> 
> +newtiss.co.kr -> cs.dal.ca [smtpserver]
>   MAIL FROM: <> 
>   RCPT To: <cweqx@cs.dal.ca> 
> 
>    Failed to deliver to <various recipients>
> 
> +cs.dal.ca [router] -> [scheduler]
>    todsn NOTIFY=NEVER ORCPT=RFC822;<>
>    to: <>
> 
>         cweqx does not exist
> 
> +cs.dal.ca [router]
>    rfc822.c: parse envelope.
>     Parse error in envelope, before checking that NOTIFY=NEVER.
>     Must tell mailer-daemon.
> 
>   I can not quite figure out if this is fixed in a newer version, or if I 
> have an incorrect configuration that is leading to this making it further
> in the process than it should.
> 
>   We were not getting this behavior in what I think was a 2.99.54 
> configuration.
> 
> 
>   Any comments?  Help?
> 
> -- 
>   Chris Maxwell
>   Unix SysAdmin, Faculty of Computer Science, 
>   Dalhousie University, Halifax, Nova Scotia, Canada
>   (902) 494-1369 / chris.maxwell_AT_dal.ca / FAX: (902) 492-1517


-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi