Postfix ERROR! - Need fix for this!

Discussion in 'General' started by hagel, Aug 11, 2005.

  1. hagel

    hagel New Member

    I've been trying to understand why I've been having so much problems with postfix since I installed ISPConfig and created mail-accounts through it.
    It turns out ISPConfig doesn't make an entry with only the domain which is demanded when using smtp-auth etc.

    A line like this should be added by ISPConfig when creating the first account on a new domain:
    "example.com"
    That's all that's required but without it all you'll get is a whole lot of 554 : Relay access denied
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Which file do you mean?
    ISPConfig adds all the domains that Postfix should handle to /etc/postfix/local-host-names.
     
  3. hagel

    hagel New Member

    I'm talking about /etc/postfix/virtual_maps

    I have no 'local-host-names' in my /etc/postfix directory, and I can't find any references to it anywhere.

    Searched in Postfix: The ultimate guide by O'Reilly, couldn't find it there either.



    --

    Tried creating local-host-names but no changes were made to it..
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Then your ISPConfig installation went wrong, or your system isn't configured properly for the use of ISPConfig. ISPConfig does not use a virtualmaps file, it uses /etc/postfix/local-host-names and /etc/postfix/virtusertable, and the ISPConfig installer includes these two files in /etc/postfix/main.cf so that Postfix can use them.
     
  5. hagel

    hagel New Member

    Sounds strange, since ISPConfig actually rewrites my virtual_maps and then runs postmap virtual_maps to activate the changes.

    Which script is activated when creating a new e-mail account? 'll have a look at it if someone can point out the path.
     
  6. hagel

    hagel New Member

    And after searching postfix.org for virtusertable and virtual_maps I strongly advise you to change ISPConfig for the use of virtual_maps instead, since that seems to be the correct way, not virtusertable.

    Maybe my Postfix conf isn't compatible with ISPConfig, but I'd rather say ISPConfig isn't compatible with my standard installation of Postfix.
     
  7. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    It doesn't matter at all how the file is called as long as it's included in /etc/postfix/main.cf.

    And no, ISPConfig does definitely not write anything to virtual_maps!

    We've been working with Postfix for years, so we _do_know_ what we're doing.

    So I repeat it here:

    You can have a look at /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php if that is helpful for you.
     
  8. hagel

    hagel New Member

    Thank you for all your help, but again, ISPConfig writes to my virtual_maps file, it seems ISPConfig treats it like as if it was virtusertable

    Here is a part of my virtual_maps file, which is automatically updated by ISPConfig every time I add a new email.

    Code:
    ###################################
    #
    # ISPConfig virtusertable Configuration File
    #         Version 1.0
    #
    ###################################
    bertil@www.schewenius.se    web16_bertil
    web16_bertil@www.schewenius.se    web16_bertil
    bertil@schewenius.se    web16_bertil
    web16_bertil@schewenius.se    web16_bertil
    info@www.hagel.cc    web15_info
    web15_info@www.hagel.cc    web15_info
    info@hagel.cc    web15_info
    web15_info@hagel.cc    web15_info
    mobil@www.hagel.cc    web15_mobil
    web15_mobil@www.hagel.cc    web15_mobil
    mobil@hagel.cc    web15_mobil
    
     
  9. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer


    Is it possible that you put a symlink from virtusertable to virtual_maps?

    What did you enter when the ISPConfig installer asked you for the Postfix virtusertable file? /etc/postfix/virtual_maps?
    Which value do you see in ISPConfig (Management -> Server -> Settings -> EMail)?
     
  10. hagel

    hagel New Member

    Ah, there it is! :)

    I've entered /etc/postfix/virtual_maps

    But then again, I still have the problem with the domain not being added anywhere.. What changes should ISPConfig setup have done to main.cf??
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You should have the lines

    Code:
    virtual_maps = hash:/etc/postfix/virtual_maps
    mydestination = /etc/postfix/local-host-names
    in /etc/postfix/main.cf. Don't forget to restart Postfix after you edit /etc/postfix/main.cf.
     
  12. bearau

    bearau New Member

    I have a similar issue, and a stock install of ispconfig on fedora 4, it is writing to my virtusertable instead of virtual_maps, should i copy all the entries from virtusertable to virtual_maps or recreate all email accounts using the interface?
     
  13. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You should then have
    Code:
    virtual_maps = hash:/etc/postfix/virtusertable
    mydestination = /etc/postfix/local-host-names
    in /etc/postfix/main.cf, if ISPConfig is writing to /etc/postfix/virtusertable. Don't copy entries to virtual_maps, and don't re-create the accounts in the web interface!
     

Share This Page