On Sun, Feb 05, 2006 at 02:19:14PM +0100, Maurice de Laat wrote:
> Using cgiemail on centos+bq.
> I would like to set the smtp envelope from to the user of the vsite.
> Cgiemail has an option for this, --enable-owner-bounce.
> In the source of cgiemail, I see an attempt to get the owner of the
> template file, and use that as the smtp envelope from:
>
> /* Get owner of template */
> if (0 == stat(templatefile, &st))
> {
> pw = getpwuid(st.st_uid);
> if (pw)
> owner = pw->pw_name;
> }
A little bit further.
Cgiemail does manage to get the owner of the templatefile correctly, and
passes this username with the -f parameter to sendmail.
However, sendmail appends the domainname of the box to that username,
which leads to sendmail's error 'No such user here'.
Not only the username should be passed to sendmail, but the full
mailaddress of that user should be passed with -f to sendmail.
Is there a call to get the full mailaddress (from p.e. the virtusertable)
when I know the username?
Thank you
--
Maurice de Laat