Andreas Altenburg <[EMAIL PROTECTED]> writes:

> no, definitly the mail-function is right. the script works at another
> server. can there be a problem with the user rights??

qmail's sendmail emulation isn't absolutely completely compatible with
everything that sendmail does.  It's possible that the script is expecting
some of the less standardized behavior.

> @4000000038987c19390ada14 new msg 26694
>  @4000000038987c19390b14ac info msg 26694: bytes 282 from
> <[EMAIL PROTECTED]> qp 2576 uid 30
>  @4000000038987c193915ab9c end msg 26694

> This mail should be sent by the user wwwuser. If I send mails through a
> mail client, they are send with user "root".

qmail-inject(8) says:

     The user name in the From header field is set by QMAILUSER, MAILUSER,
     USER, or LOGNAME, whichever comes first.

[...]

     The default envelope sender address is the same as the default From
     address, but it can be overridden with QMAILSUSER and QMAILSHOST.  It
     may also be modified by the r and m letters described below.  Bounces
     will be sent to this address.

The sendmail emulation invokes (I believe) qmail-inject.  I know from
experience that if none of QMAILUSER, MAILUSER, USER, or LOGNAME are set,
qmail will set the envelope sender to anonymous@hostname.  I'm not sure
where this is documented (or if it is; the string "anonymous" appears
nowhere in the qmail documentation).

qmail-1.03/qmail-inject.c has the relevant code:

 mailuser = env_get("QMAILUSER");
 if (!mailuser) mailuser = env_get("MAILUSER");
 if (!mailuser) mailuser = env_get("USER");
 if (!mailuser) mailuser = env_get("LOGNAME");
 if (!mailuser) mailuser = "anonymous";

-- 
Russ Allbery ([EMAIL PROTECTED])         <URL:http://www.eyrie.org/~eagle/>

Reply via email to