# KMail, several identitys & qmail

## mvo

Hi!

I'm using KMail with several identitys and want to setup qmail for sending the messages. KMail can't use qmail directly, so it's using the "sendmail" wrapper for qmail.

Works fine with one problem: The envelope sender address is set to username@hostname, but I want to have the From adress in there.

I can override this with QMAILSUSER  and  QMAILSHOST, but KMail is not able to set this variables depending on the From-adress or to pass an "-f adress" to sendmail. I don't want to restart KMail with new env variables every time I switch the identity  :Sad: .

How can I configure this? Or should I use another MUA?

TIA, Michael

----------

## klieber

 *mvo wrote:*   

> Works fine with one problem: The envelope sender address is set to username@hostname, but I want to have the From adress in there.

 

Not sure that the problem is with KMail.  I'm not familiar with qmail, but I have almost the exact same setup you describe, except with exim as my mta.  Exim has a feature called "local_from_check" which, when set to false, does not check to make sure the address specified in the "from" header matches the correct local sender of the message.  Exim just trusts that the mail being handed to it has the correct from header. This setup works great and I'm able to send email from several different email addresses across multiple domains without exim munging the headers.

You might research whether or not a similar global override exists for the qmail configuration.

--kurt

----------

## mvo

 *klieber wrote:*   

> 
> 
> You might research whether or not a similar global override exists for the qmail configuration.
> 
> 

 

This is what I have found in the documentaion:

 *man qmail-inject wrote:*   

> 
> 
> The default envelope sender address is the same as the default From address,  but it  can  be  overridden with  QMAILSUSER  and  QMAILSHOST.
> 
> ...
> ...

 

So there are three ways for the MUA to set the envelope sender adress: Set the environment variables or supply the Return-Path or use the -fsender option.

Two questions: What means "default From adress", the qmail default or the From adress of the mail header? Is the complete header including the X-Envelope-From createt by KMail?

----------

