postfix - getting started

Discussion in 'Installation/Configuration' started by martinvidic, Jan 30, 2012.

  1. martinvidic

    martinvidic New Member

    Hi.

    I got almost everything running on my new server; proftpd, bind, php and phpmyadmin etc.
    Now the next problem is postfix 2.6.6

    For now I'm using a very simple redirect.

    I added this to main.cf
    virtual_alias_domains = mydomain.com
    virtual_alias_maps = hash:/etc/postfix/virtual

    and this to virtual
    [email protected] [email protected]
    @mydomain.com [email protected]

    Is there anything else i have to do?
    Because postfix is running, but i think my email doesnt even reach postfix.
    I also tried creating an A record and a MX record for mail.mydomain.com

    Help would be much appreciated :)
    Thanx
    martin
     
  2. martinvidic

    martinvidic New Member

    Could it be my firewall?

    Because when i telnet myIpAddress 25, i get this

    telnet: connect to address XX.XX.XX.XXX: Connection refused
    telnet: Unable to connect to remote host

    I'm on centOs 6.2 and all i have in my firewall settings i only have this

    Code:
    # Generated by iptables-save v1.4.7 on Mon Jan 23 13:43:54 2012
    *filter
    :INPUT ACCEPT [267:20951]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [251:23840]
    -A INPUT -d 127.0.0.1/32 -p tcp -m tcp --sport 1024:65535 --dport 953 -m state --state NEW,ESTABLISHED -j ACCEPT 
    COMMIT
    # Completed on Mon Jan 23 13:43:54 2012
    # Generated by iptables-save v1.4.7 on Mon Jan 23 13:43:54 2012
    *mangle
    :PREROUTING ACCEPT [22310:1910799]
    :INPUT ACCEPT [21420:1821360]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [19832:3026581]
    :POSTROUTING ACCEPT [19832:3026581]
    COMMIT
    # Completed on Mon Jan 23 13:43:54 2012
    # Generated by iptables-save v1.4.7 on Mon Jan 23 13:43:54 2012
    *nat
    :PREROUTING ACCEPT [18072:1253709]
    :POSTROUTING ACCEPT [11:680]
    :OUTPUT ACCEPT [11:680]
    COMMIT
    # Completed on Mon Jan 23 13:43:54 2012
     
  3. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ?

    Can you disable the firewall for testing purposes?
     
  4. martinvidic

    martinvidic New Member

    Thanx for the answer.
    I figured that telnet ip 25 problem out, but it still doesnt work.
    the problem btw was that in the main.cf file... i had
    inet_interfaces = localhost
    only
    I changed it to all and now my mail reaches postfix (i think)

    because now i get a mail failed message... LOL

    all i want to do is
    virtual_alias_domains = mydomain.com
    virtual_alias_maps = hash:/etc/postfix/virtual

    in the main.cf file
    and
    [email protected] [email protected]
    at the end of virtual
     
  5. martinvidic

    martinvidic New Member

    The last 3 lines in my error log are

    Jan 31 07:31:08 server postfix/smtpd[962]: fatal: open database /etc/postfix/virtual.db: No such file or directory
    Jan 31 07:31:09 server postfix/master[952]: warning: process /usr/libexec/postfix/smtpd pid 962 exit status 1
    Jan 31 07:31:09 server postfix/master[952]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling


    but im not refering to virtual.db in main.cf
    im only refering to virtual

    I also tried to rename virtual to virtualdb and restarted postfix, but that gave me even more errors.

    maybe my virtual file is not configured correctly?
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Please try
    Code:
    postmap /etc/postfix/virtual
    /etc/init.d/postfix restart
     
  7. martinvidic

    martinvidic New Member

    Hi Falco
    THANX that was it...
    It works now.

    There was also another problem in case sombody is having the same problem.
    On default, main.cf was configured to listen to localhost only.
     
  8. martinvidic

    martinvidic New Member

    Hi Falco
    THANX that was it...
    It works now.

    There was also another issue (in case sombody is having the same problem)
    On default, main.cf was configured to listen to "localhost" only.
     

Share This Page