Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Virtual mailboxes / forwarders not working since 0.9.36

Featured Replies

Hi there,
 
just upgraded to 0.9.36 and noticed that the virtual mailboxes and forwarders seems to have stopped working.
 
MTA is postfix, MDA is dovecot - both latest on debian jessie stable.
 
Checked the mail_virtual table and the virtual mailbox entry seems to be ok:
 
mysql> select * from mail_virtual WHERE email LIKE 'foo@bar.com';
+-----+-----------------+------------------+------------------+----------+------------+--------------+------------+
| id  | email           | email_full       | destination      | domainid | customerid | popaccountid | iscatchall |
+-----+-----------------+------------------+------------------+----------+------------+--------------+------------+
| 282 | foo@bar.com     | foo@bar.com      | lorem@bar.com    |       26 |         12 |            0 |          0 |
+-----+-----------------+------------------+------------------+----------+------------+--------------+------------+
tail -f /var/log/mail.log | grep "foo@bar.com" 
Jun  3 21:58:53 mail postfix/pipe[15688]: 1003848297A: to=<foo@bar.com>, relay=dovecot, delay=0.2, delays=0.19/0/0/0.01, dsn=5.1.1, status=bounced (user unknown)
root@mail:/etc/postfix# cat main.cf | grep virtual
virtual_mailbox_limit = 0
virtual_transport = dovecot
virtual_mailbox_base = /var/customers/mail/
virtual_mailbox_maps = mysql:${config_directory}/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:${config_directory}/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:${config_directory}/mysql-virtual_alias_maps.cf
smtpd_sender_login_maps = mysql:${config_directory}/mysql-virtual_sender_permissions.cf
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
root@mail:/etc/postfix# cat master.cf | grep virtual
virtual   unix  -       n       n       -       -       virtual
root@mail:/etc/postfix# cat mysql-virtual_sender_permissions.cf 
user = froxlor
password = secret
dbname = froxlor
hosts = localhost
query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_virtual.email_full FROM mail_virtual WHERE mail_virtual.email = '%s' UNION SELECT mail_virtual.destination FROM mail_virtual WHERE mail_virtual.email = '%s'));
root@mail:/etc/postfix# cat mysql-virtual_alias_maps.cf
user = froxlor
password = secret 
dbname = froxlor
hosts = localhost
query = SELECT destination FROM mail_virtual WHERE email = '%s' AND trim(destination) <> ''

And a quick test with postmap seems to succeed and returns the correct destination...

root@mail:/etc/postfix# postmap -q foo@bar.com mysql:/etc/postfix/mysql-virtual_alias_maps.cf 
lorem@bar.com

Anybody else? This is just strange.

 

Thanks

 

Did you just upgrade froxlor or all the configs of your services too?

Yep, configs as well.

 

It's kinda strange imho because the query and everything seems to work fine.

When i perform a test with postmap for example, i get the correct destination address from the mail_virtual table.

why update configs if everything worked before? anyway, never had this issue on my system nor on new setups i've done with 0.9.36

Thanks for the hints.

 

Just found that in fact the virtual_alias_maps do work on port 25 without any issues, but not on port 587.  

 

Will dig a bit deeper into the master.cf now.

Short update - problem solved.

 

Was not related to froxlor, but to our anti-spam measures.  Basically the issue was caused by the directive 

 

receive_override_options=no_address_mappings

 

which was used in the global scope within main.cf and therefor was used for both submission and the regular smtpd.

 

 

"The "receive_override_options" line disables address manipulation before the content filter, so that the content filter sees the original mail addresses instead of the result of virtual alias expansion, canonical mapping, automatic bcc, address masquerading, etc."

 

Source: http://www.postfix.org/FILTER_README.html

 

 

The solution simply was to remove the line from the main.cf and instead move it into the master.cf beneath the correct daemon:

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
### tcp 25 for incoming mail ###
smtp      inet  n       -       -       -       -       smtpd
  -o content_filter=smtp-amavis:[127.0.0.1]:10024
  -o receive_override_options=no_address_mappings
...
### tcp 587 for mail submission ###
submission inet n       -       -       -       -       smtpd
  -o content_filter= 
  -o syslog_name=postfix/submission
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  -o smtp_header_checks=regexp:${config_directory}/smtp_header_checks
...

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.