3 Replies Latest reply: Oct 14, 2012 5:18 AM by Mark23
EBL Level 1 Level 1 (10 points)

On a stock Mountain Lion Server system, is /etc/aliases a link or a file?  If it's a link, what does it point to?  Thanks.

  • 1. Re: Easy questions: /etc/aliases
    redshift82r Level 2 Level 2 (325 points)

    It's a file and is ignored. You need /library/server/mail /config/postfix/aliases

  • 2. Re: Easy questions: /etc/aliases
    Mark23 Level 3 Level 3 (975 points)

    I got this working thanks to Jaydisc's comment elsewhere:


    "All of this is doable by manipulating postfix underneatht the hood. I haven't seen what file Mountain Lion specifically creates when you turn on virtual hosting, but traditionally these kind of mappings are stored in /etc/postfix/virtual. You need to postmap the file after making changes and restart postfix.


    Jonathan, mailman is seemingly no longer included in OS X Server whicih would ahve been perfect. That means you need to manually build your list in /etc/postfix/virtual or install a 3rd party solution as far as I'm aware. In /etc/postfix/virtual, you could so something like:



    group@virtualdomain1.com               user@domain1.com, user1@virtualdomain1.com, user3@host.com



    Levin, you don't want to do a catch-all, but if you insist, assuming it's with a virtual domain, you'd put in

    @domein.com                   owner@domein.com



    When done, run:


    postmap /etc/postfix/virtual

    postfix reload


    Do all of this as root or using the sudo command. If you don't know what I'm talking about, you probably shouldn't do it."




    I edited /etc/postfix/virtual via the command line, like:

    sudo nano /etc/postfix/virtual


    And add the group and the users like in the example above.

  • 3. Re: Easy questions: /etc/aliases
    Mark23 Level 3 Level 3 (975 points)

    I now do want to catch all email as it has become my lives work to report spam.



    So I figured out an easier way to catch all email using simply the serveradmin command-line tool (this only takes email that would otherwise bounce):



    sudo serveradmin settings mail:imap:lmtp_luser_relay_enabled = yes

    sudo serveradmin settings mail:imap:lmtp_luser_relay = catchallusername

    sudo postfix reload