Postfix still forwarding emails even after I've removed the address from all configuration files

felwithe asked:

I’m having a strange problem that can only be explained by caching or some kind of hidden variables.

  • I was forwarding mail to my gmail account with a virtual alias file, /etc/postfix/virtual.

  • I decided to change this behavior, so I removed that line. But it still forwards to my gmail address.

  • I removed the entire virtual alias file. It still forwards to my gmail address. (I do postmap /etc/postfix/virtual after every change.)

  • Confused, I put the virtual file back and tried putting a different address in instead. This worked, and started forwarding to the new address.

  • When I removed the new address, it started forwarding to the original address again, despite the fact that that address is nowhere to be found anywhere and hasn’t been through several changes.

  • I blank out the virtual_alias_domains and virtual_alias_maps lines altogether in main.cf. It still forwards to the original gmail address.

  • It’s not in /etc/aliases either, by the way, although I did newalises and checked that the timestamp updated just in case.

I am lost here, and stumped. I’ve been checking timestamps on the virtual alias database file, and the aliases database file (virtual.db and aliases.db) after each refresh to make sure that they are in fact being updated.

I don’t know where it’s getting my gmail address from. Most bizarre to me is how when I changed the address to a new one, it updated correctly, but then when I removed the new address it went back to using the old one.

I even resorted to doing a grep of my email address on the entire system, but it shows up in too many places, and that won’t even find it if it’s in a binary database file.

My answer:


Look for a file named .forward in your home directory. This file lets ordinary users set up their own email forwarding without involving the system administrator.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.