On Thu, Apr 22, 1999 at 10:23:39PM -0400, Hal Burgiss wrote:
> On Thu, Apr 22, 1999 at 07:08:51PM -0500, Ronny Haryanto wrote:
> > On 22-Apr-1999 07:40PM, Hal Burgiss wrote:
> > > Using mutt .95 with sendmail on a standalone home box. My mail headers are
> > > apparently showing 'sender' as $user@$HOSTNAME. Some mail servers ignore this,
> > > but others complain -- 'BadReturnPath' or '(mail may be forged)' -- and some are
> > > bouncing mail back to me undelivered.

[..]

> My username is 'hal', the hostname here is 'hals.box'. My email
> address is '[EMAIL PROTECTED]' (of course). I get a 'BadReturnPath' in the
> header if I try emailing myself as a test. The 'From' field seems
> correct to me.

[..]

> :    ----- The following addresses had permanent fatal errors -----
> : [EMAIL PROTECTED]
> : 
> :    ----- Transcript of session follows -----
> : ... while talking to jonesy.conman.ugg.edu.:
> : >>> MAIL From:<[EMAIL PROTECTED]> SIZE=1620
> : <<< 501 <[EMAIL PROTECTED]>... Sender domain must exist
> : 501 [EMAIL PROTECTED] Data format error

Hhere is no such domain as "hals.box" and some (but, as you found out, not
all) systems won't talk to you because of it. This is generally done as a
spam protection technique (all those mails coming from "[EMAIL PROTECTED]" and
such nonsense).

Some sites bounce it immediately, like the example above, and some give a
temporary error which causes your system (or relay) to try again later.
The temporary error makes more sense to me, as if the receiving site's DNS
is either down or having problems it can come up with false positives, so
retrying later prevents valid mail from being bounced.  On the other hand,
if a name is completely bogus, it'll sit in the queue for potentially days
before the user who sent it knows what happened.

Either way, what you need to do is arrange for your envelope sender to be
something valid.  Probably the most elegant way to do this is to use
sendmail's genericstable feature to rewrite '[EMAIL PROTECTED]' to
'[EMAIL PROTECTED]'.  A less elegant, but simpler, way would be to change your
$sendmail variable to something like:

set sendmail="/usr/sbin/sendmail -oem -oi [EMAIL PROTECTED]"

That should work in most setups, but it might (again, depending on your
configuration) add a header to your mail saying:

X-Authentication-Warning: hals.box: hal set sender to hdb using -f

If that bothers you, either add yourself to the "trusted user" section of
/etc/sendmail.cf or just use genericstable. :)

David

-- 
   David Shaw  |  [EMAIL PROTECTED]  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson

Reply via email to