Author Topic: How to change "sender" from www@ to RC user?  (Read 3233 times)

Offline kondybas

  • Jr. Member
  • **
  • Posts: 36
How to change "sender" from www@ to RC user?
« on: September 14, 2009, 05:13:50 AM »
When RC sends message, it acts as a apache user "www@domain". Accordingly, all bounces are sent to www@domain, not to the issuer of the original message. No relevant config options found in the "main.inc.php" and google gives no help too :(

Mail accounts are virtual and stored in MySQL, db  made by Postfixadmin. MTA = Exim.

Offline dano

  • Full Member
  • ***
  • Posts: 124
How to change "sender" from www@ to RC user?
« Reply #1 on: September 16, 2009, 12:28:21 PM »
Do you have your config set to this?

Code: [Select]
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

I've never used MySQL for users but I should think it would work the same.

Offline kondybas

  • Jr. Member
  • **
  • Posts: 36
How to change "sender" from www@ to RC user?
« Reply #2 on: September 17, 2009, 04:32:59 AM »
Quote from: dano;21365
Do you have your config set to this?

Code: [Select]
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';


I've never used MySQL for users but I should think it would work the same.


Yes, both parameters are defined as shown. I'll try to debug, are they evaluated from DB on the stage of message sending. Thanks for advise!

Offline kondybas

  • Jr. Member
  • **
  • Posts: 36
Problem solved
« Reply #3 on: November 22, 2009, 05:10:51 AM »
At least, it was completely my own fault, but seems that some unobvious details must be explained.

Cause of trouble was in the Exim misconfiguration. When I've try to set
Code: [Select]
$rcmail_config['smtp_server'] = '';
to anything instead empty '' - to 'localhost' or 'my.domain.com' -  RC was rejected by Exim. Changing ACL rules order was enough to fix that.

If you don't want to fall in trouble like me, keep in mind that settings
Code: [Select]
$rcmail_config['smtp_server'] = 'localhost';
$rcmail_config['smtp_port'] = 25;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';

are functional ONLY when 'smtp_server' in non-empty and normal smtp-session occurs.

Yes, you can still use non-smtp connection between RC and MTA but remember, that "envelope-from" and "Return-Path" in headers become www@your.domain.com, where "www" - is the account your http-server have use. That means, that all bounces and delivery service messages will be sent by outer MTAs to www@ instead original sender.

Have a nice day.