Find the answer to your Linux question:
Results 1 to 3 of 3
What is the minimum I have to do to configure postfix to accept incoming SMTP messages and store them somewhere? I need to set up a mail server in a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    274

    Postfix minimal configuration


    What is the minimum I have to do to configure postfix to accept incoming SMTP messages and store them somewhere? I need to set up a mail server in a real hurry, it doesn't have to do anything fancy, just be the MX record for a domain containing 3 mailboxes for a couple of weeks. I don't really need pop or imap access to begin with if I can log on to the localhost and read it on there.

    Or if it's easier to do this using sendmail let me know what I need to do ...

    The only tutorials I can find are extremely long winded and involve steps that aren't necessary for what I want to achieve.

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Insert this in your /etc/postfix/main.cf last of all
    Code:
    myhostname = your.host.and.domain
    mydomain = your.domain
    mydestination = $mydomain
    mynetworks = 127.0.0.0/8
    This would be the absolut minmal configuration that you would need to do.
    All emails would end up att $LOCALUSER@$mydomain
    If you want to set some alias on emails a simple VHOST configuration would be quite easy to set up as well.
    Code:
    virtual_maps = hash:/etc/postfix/virtual
    Create the file /etc/postfix/virtual
    And this file should look like something like this:
    Code:
    your.domain                         anything
    donald.duck@your.domain      usr1
    mickey.mouse@your.domain   usr2
    Then you have to enter the directory /etc/postfix and issue command
    Code:
    postmap virtual
    Re-start your postfix server and you are set.
    If you wish that all e-mails with unknown recipient address to be forwarded into a certain user add one line in your virtual file like this
    Code:
    your.domain                         anything
    donald.duck@your.domain      usr1
    mickey.mouse@your.domain   usr2
    @your.domain                       usr3
    You have to re-run the postmap command as described above on each change you do in your virtual file

  3. #3
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    274
    Thanks!

    I've done as you suggested and restarted the postfix server service, but it seems that port 25 is not open on the computer as I can't telnet on to it from the Internet. I have configured port forwarding on my firewall to route port 25 to the NAT address of my Mandrake box. How can I open the port? I had read that once you have configured your MTA the port would just open but it seems that is not the case!

    The strange thing is nmap shows port 25 is open?!

    Code:
    [root@mandrake postfix]# nmap localhost
    
    Starting nmap 3.55 ( http://www.insecure.org/nmap/ ) at 2005-05-04 16:42 BST
    Interesting ports on mandrake (127.0.0.1):
    (The 1634 ports scanned but not shown below are in state: closed)
    PORT      STATE SERVICE
    21/tcp    open  ftp
    22/tcp    open  ssh
    25/tcp    open  smtp
    80/tcp    open  http
    110/tcp   open  pop3

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •