When I create a new identity, the RC sends a confirmation from
[email protected]($rcmail_config['admin_email'] = "
[email protected]") address (MAIL FROM), but with the currently logged on user.
However, the postfix restrictions make it impossible to send messages as another user.
Why do not currently have a plug SendMessage? I think that in another way I can send a confirmation of a new identity?
I do not want and I can not change the configuration of postfix.
I use RC 4.2 and a collection of myroundcube plugins and others.
Fragment of postfix's log:
Oct 18 14:23:31 mailserver postfix/smtpd[4620]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Oct 18 14:23:31 mailserver postfix/smtpd[4620]: NOQUEUE: reject: MAIL from localhost[127.0.0.1]: 553 5.7.1 <[email protected]>: Sender address rejected: not owned by user piecia; from=<[email protected]> proto=ESMTP helo=<mailserver>
Try in checked_identities config:
$rcmail_config['bounce_is_safe'] = TRUE;
Thanks, it helped me almost. But unfortunately for me username_domain* option is not set and takes the form MAIL FROM: . Then it is blocked in the session postfix:
localhost[127.0.0.1]: 504 5.5.2 <piecia>: Sender address rejected: need fully-qualified address
Maybe this should be dependent on such $rcmail_config['mail_domain']?
I'll try to fix it but unfortunately I'm not a programmer in PHP.
*) I use shell system users not virtual (in database)
Maybe this:
--- plugins/checked_identities/checked_identities.php.orig 2010-08-09 15:38:44.000000000 +0200
+++ plugins/checked_identities/checked_identities.php 2010-10-20 11:17:31.000000000 +0200
@@ -381,10 +381,21 @@
$body = str_replace("\r","",$body);
$body = str_replace("\n","\r\n",$body);
if($rcmail->config->get('bounce_is_safe')){
- $from = $_SESSION['username'] . $rcmail->config->get('username_domain');
- if (!preg_match("/$this->EMAIL_ADDRESS_PATTERN/i", $from)){
- $from = $rcmail->config->get('admin_email');
- }
+ if($rcmail->config->get('username_domain') === ''){
+ if(is_array($rcmail->config->get('mail_domain'))){
+ reset($rcmail->config->get('mail_domain'));
+ $from = $_SESSION['username'] . '@' . current($rcmail->config->get('mail_domain'));
+ }//mail_domain is array
+ else{
+ $from = $_SESSION['username'] . '@' . $rcmail->config->get('mail_domain');
+ }//mail_domain is not array
+ }//username_domain===''
+ else{
+ $from = $_SESSION['username'] . $rcmail->config->get('username_domain');
+ }//username_domain!==''
+ if (!preg_match("/$this->EMAIL_ADDRESS_PATTERN/i", $from)){
+ $from = $rcmail->config->get('admin_email');
+ }
}
else{
$from = $rcmail->config->get('admin_email');