June 3, 201610 yr 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
June 3, 201610 yr 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.
June 3, 201610 yr 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
June 3, 201610 yr 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.
June 7, 201610 yr 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.