1 (edited by Blisk 2021-02-02 03:50:04)

Topic: forwardings and alias not working

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.3.2
- Deployed with iRedMail Easy or the downloadable installer? download installer
- Linux/BSD distribution name and version: centos 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): apache
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

When I try to froward email to gmail it doesn't work, I made a filter in roundcube and nowthing.

Also when I add alias I get mail back userunknown or when I try to send email on alias from user account I get
Recipient address rejected: User unknown (Code: 550) in /opt/www/roundcubemail-1.4.9/program/lib/Roundcube/rcube.php on line 1702

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: forwardings and alias not working

I solved problem with alias it was wrong virtual_alias_maps.cf in postfix. Now it works
but still can not find a reason why in roundcubemail forwardings not working

3

Re: forwardings and alias not working

I still can't find why my managesieve doesn't work.
I have enabled debug and in logs can't find anything.
plugin is enabled in roundcubemail

here is my log from managesieve
https://privatebin.povej.net/?999418140 … HKwrdJJBz7

Can someone help me please to solve this?

4

Re: forwardings and alias not working

1: please show us your full sieve rule file.
2: Please extract related log lines of your testing email which is supposed to trigger the sieve forwarding.

5

Re: forwardings and alias not working

ZhangHuangbin wrote:

1: please show us your full sieve rule file.
2: Please extract related log lines of your testing email which is supposed to trigger the sieve forwarding.

I am sorry this is dumb question, but I really don't know which sieve rule file, is it in roundcube plugin or settings in dovecot?

And seconf which log? I use centos 8 is that maillog or there is a specific log for every mailbox and I don't know about it?

6

Re: forwardings and alias not working

Blisk wrote:

I am sorry this is dumb question, but I really don't know which sieve rule file, is it in roundcube plugin or settings in dovecot?

Run command "doveadm user -f home <email>" (replace <email> by the real user email address), it will show you a absolute path, you can find the sieve rule file "sieve/dovecot.sieve" under that directory.

Blisk wrote:

And seconf which log? I use centos 8 is that maillog or there is a specific log for every mailbox and I don't know about it?

Check /var/log/dovecot/lda.log.

7

Re: forwardings and alias not working

Here is my sieve rule file
require ["body","copy","duplicate","fileinto","vacation"];
# rule:[SporoÄŤilo o odsotnosti]
if false # true
{
    vacation :days 1 :addresses "dennis@mydomain.com" :subject "ni me" :from "dennis@mydomain.com" "ni me";
}
# rule:[posreduj]
if allof (not duplicate)
{
    redirect :copy "dennis@seconddomain.com";
}
# rule:[posreduj2]
if true
{
    redirect "dennis@seconddomain.com";
}
# rule:[test]
if allof (body :text :contains "test")
{
    fileinto "INBOX/spam";
}
# rule:[root]
if allof (header :contains "Subject" "Cron  /usr/bin/php /opt/www/roundcubemail/bin/cleandb.sh >/dev/null", header :contains "From" "root@mydomain.com", header :contains "To" "root@mydomain.com")
{
    fileinto "INBOX/root";
    stop;
}


lda.log is empty and user permission is vmail for that file

8

Re: forwardings and alias not working

Please turn on debug mode in Dovecot, send a testing email to trigger the issue, extract related log from /var/log/dovecot/*.log and paste here for troubleshooting.

9

Re: forwardings and alias not working

ZhangHuangbin wrote:

Please turn on debug mode in Dovecot, send a testing email to trigger the issue, extract related log from /var/log/dovecot/*.log and paste here for troubleshooting.

Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Loading modules from directory: /usr/lib64/dovecot
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Module loaded: /usr/lib64/dovecot/lib01_acl_plugin.so
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Module loaded: /usr/lib64/dovecot/lib10_quota_plugin.so
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Module loaded: /usr/lib64/dovecot/lib15_notify_plugin.so
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Module loaded: /usr/lib64/dovecot/lib20_mail_log_plugin.so
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Module loaded: /usr/lib64/dovecot/lib20_mailbox_alias_plugin.so
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: auth-master: userdb lookup(dennis@myseconddomain.com): Started userdb lookup
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: auth-master: conn unix:/run/dovecot/auth-userdb: Connecting
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: auth-master: conn unix:/run/dovecot/auth-userdb (pid=1396,uid=0): Client connected (fd=14)
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: auth-master: userdb lookup(dennis@myseconddomain.com): auth USER input: dennis@myseconddomain.com master_user=dennis@myseconddomain.com home=/var/vmail/vmail1/myseconddomain.com/dennis/ mail=maildir:~/Maildir quota_rule=*:bytes=0
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: auth-master: userdb lookup(dennis@myseconddomain.com): Finished userdb lookup (username=dennis@myseconddomain.com master_user=dennis@myseconddomain.com home=/var/vmail/vmail1/myseconddomain.com/dennis/ mail=maildir:~/Maildir quota_rule=*:bytes=0)
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Added userdb setting: mail=maildir:~/Maildir
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Added userdb setting: plugin/master_user=dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><>: Debug: Added userdb setting: plugin/quota_rule=*:bytes=0
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/myseconddomain.com/dennis/
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota rule: root=user mailbox=* bytes=0 messages=0
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota warning: bytes=0 (100%) messages=0 reverse=no command=quota-warning 100 dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=quota-warning 95 dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota warning: bytes=0 (90%) messages=0 reverse=no command=quota-warning 90 dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota warning: bytes=0 (85%) messages=0 reverse=no command=quota-warning 85 dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Quota grace: root=user bytes=0 (10%)
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: quota-dict: user=dennis@myseconddomain.com, uri=proxy::quotadict, noenforcing=0
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: maildir++: root=/var/vmail/vmail1/myseconddomain.com/dennis//Maildir, index=, indexpvt=, control=, inbox=/var/vmail/vmail1/myseconddomain.com/dennis//Maildir, alt=
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl: initializing backend with data: vfile
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl: acl username = dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl: owner = 1
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl vfile: Global ACLs disabled
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/Shared/%Ld/%Ln
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: shared: root=/run/dovecot, index=, indexpvt=, control=, inbox=, alt=
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl: initializing backend with data: vfile
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl: acl username = dennis@myseconddomain.com
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl: owner = 0
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: acl vfile: Global ACLs disabled
Feb 12 17:44:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: quota: quota_over_flag check: quota_over_script unset - skipping
Feb 12 17:45:00 quota-status(dennis@myseconddomain.com)<1627502><dk3PFVCwJmBu1RgAbL5TFQ>: Debug: auth-master: conn unix:/run/dovecot/auth-userdb (pid=1396,uid=0): Disconnected: Connection closed (fd=14)

10

Re: forwardings and alias not working

Any idea regarding this issue?

11

Re: forwardings and alias not working

No any sieve related log in pasted log lines. Could you please try again and extract sieve log lines from /var/log/dovecot/*.log?

12 (edited by Blisk 2021-03-24 04:56:12)

Re: forwardings and alias not working

I checked now for 3 times and no relevant sieve log.
Maybe I didn't enable that log. Is there anything which should be set to record sieve log?

But I get php error for sieve

PHP Warning:  Use of undefined constant managesieve - assumed 'managesieve' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant acl - assumed 'acl' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant additional_message_headers - assumed 'additional_message_headers' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant archive - assumed 'archive' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant attachment_reminder - assumed 'attachment_reminder' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant autologon - assumed 'autologon' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant emoticons - assumed 'emoticons' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant enigma - assumed 'enigma' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant example_addressbook - assumed 'example_addressbook' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant filesystem_attachments - assumed 'filesystem_attachments' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant identicon - assumed 'identicon' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant identity_select - assumed 'identity_select' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant jqueryui - assumed 'jqueryui' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant markasjunk - assumed 'markasjunk' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant newmail_notifier - assumed 'newmail_notifier' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant password - assumed 'password' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant redundant_attachments - assumed 'redundant_attachments' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant show_additional_headers - assumed 'show_additional_headers' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant subscriptions_option - assumed 'subscriptions_option' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant userinfo - assumed 'userinfo' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant vcard_attachments - assumed 'vcard_attachments' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84 PHP Warning:  Use of undefined constant zipdownload - assumed 'zipdownload' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.9/config/config.inc.php on line 84
ERROR: Can use only one plugin for attachments/file uploads! Using 'filesystem_attachments', ignoring others.

13

Re: forwardings and alias not working

Looks like you have some configuration issue (php syntax error?) in /opt/www/roundcubemail-1.4.9/config/config.inc.php.

14

Re: forwardings and alias not working

here is my config file.

<?php

// SQL DATABASE
$config['db_dsnw'] = 'mysqli://xxx:xxxs@127.0.0.1:3306/roundcubemail';



$config['debug_level'] = 4;
// Log SQL queries
$config['sql_debug'] = true;
// Log IMAP conversation
$config['imap_debug'] = true;
// Log LDAP conversation
$config['ldap_debug'] = true;
// Log SMTP conversation
$config['smtp_debug'] = true;



// LOGGING
$config['log_driver'] = 'syslog';
$config['syslog_facility'] = LOG_MAIL;

// IMAP
$config['default_host'] = '127.0.0.1';
$config['default_port'] = 143;
$config['imap_auth_type'] = 'LOGIN';
$config['imap_delimiter'] = '/';
// Required if you're running PHP 5.6 or later
$config['imap_conn_options'] = array(
    'ssl' => array(
        'verify_peer'  => false,
        'verify_peer_name' => false,
    ),
);

// SMTP
$config['smtp_server'] = 'tls://127.0.0.1';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';
// Required if you're running PHP 5.6 or later
$config['smtp_conn_options'] = array(
    'ssl' => array(
        'verify_peer'      => false,
        'verify_peer_name' => false,
    ),
);

// Use user's identity as envelope sender for 'return receipt' responses,
// otherwise it will be rejected by iRedAPD plugin `reject_null_sender`.
$config['mdn_use_from'] = true;

// SYSTEM
$config['force_https'] = true;
$config['login_autocomplete'] = 2;
$config['ip_check'] = true;
$config['des_key'] = 'xxxxxx';
$config['cipher_method'] = 'AES-256-CBC';
$config['useragent'] = 'Roundcube Webmail'; // Hide version number
//$config['username_domain'] = 'mydomain.com';
$config['mime_types'] = '/etc/mime.types';
$config['max_message_size'] = '15M';

// USER INTERFACE
$config['create_default_folders'] = true;
$config['quota_zero_as_unlimited'] = true;
$config['spellcheck_engine'] = 'pspell';

// USER PREFERENCES
$config['default_charset'] = 'UTF-8';
//$config['addressbook_sort_col'] = 'name';
$config['draft_autosave'] = 60;
$config['default_list_mode'] = 'threads';
$config['autoexpand_threads'] = 2;
$config['check_all_folders'] = true;
$config['default_font_size'] = '12pt';
$config['message_show_email'] = true;
$config['layout'] = 'widescreen';   // three columns
//$config['skip_deleted'] = true;

// PLUGINS (acl, additional_message_headers, archive, attachment_reminder, autologon, emoticons, enigma, example_addressbook, filesystem_attachments, identicon, identity_select, jqueryui, markasjunk, newmail_notifier, password, redundant_attachments, show_additional_headers, subscriptions_option, userinfo, vcard_attachments, zipdownload)
$config['plugins'] = array('managesieve');

15

Re: forwardings and alias not working

According to the error message, seems all plugins are enabled somewhere.