Help understanding how mail server should be setup

Discussion in 'Server Operation' started by micko_escalade, Jan 28, 2006.

  1. micko_escalade

    micko_escalade New Member

    Hi all!

    I spent couple of hours reading thru whole forum trying to figure out what are steps to get it running, but no joy,
    I have VPS (virtual private server) with Fedora 4 installed on it, I installed webmin, apache2, mysql, php and they're working fine,
    now Dovecot IMAP/POP3 Server is giving me headache,
    can someone give me a list of required modules to get mail working.

    Thanks!
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Have a look at this tutorial: http://www.howtoforge.com/perfect_setup_fedora_core_4

    In the tutorial I install the package imap; leave it out as you have installed Dovecot. You should then add these steps after the Postfix configuration because Dovecot uses Maildir:

    Code:
    postconf -e 'home_mailbox = Maildir/'
    postconf -e 'mailbox_command ='
    /etc/init.d/postfix restart
    If you want to install ISPConfig afterwards, you can create your mailboxes with the ISPConfig web interface; if you want to create your mailboxes manually, have a look here: http://www.howtoforge.com/forums/showthread.php?t=2
     
  3. micko_escalade

    micko_escalade New Member

    Thanks for the reply falko!

    so in putty I should run this code bellow ?
    Code:
    postconf -e 'home_mailbox = Maildir/'
    postconf -e 'mailbox_command ='
    /etc/init.d/postfix restart
    and since my VPS has only 128MB of ram I think I shouldn't install ISPConfig,
    or I can install it but not run on a boot ?
     
    Last edited: Jan 29, 2006
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Yes.

    It depends on how much RAM is eaten up by your other applications.
    You can install it and then remove the system startup links so that it doesn't get started at boot time.
     
  5. micko_escalade

    micko_escalade New Member

    I run the code and everrything went ok, with no errors,

    but when I send test email from yahoo.com to my VPS it newer gets there,
    outlook shows this error screenshot when I try to send email from outlook
    www.dnsstuff.com gives this error link
    also www.dnsreport.com at the buttom gives gives error for MX record link

    I have 3 virtual domains, maybe that's causing problems?
     
    Last edited: Nov 13, 2006
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Is 207.210.228.31 your server's IP address, or does it belong to another server?
    Is your server connected directly to the internet, or is it behind a router?
     
  7. micko_escalade

    micko_escalade New Member

    That ip is my VPS (virtual private server) ip, which is located somewhere in the US, and from what I've read looks like the problem is with Reverse DNS not set up for that ip.
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    That is likely. You can ask your ISP/hoster to set up a reverse record for that IP address.
     
  9. micko_escalade

    micko_escalade New Member

    Ok, I asked my provider and they set reverse dns, but still can't get it to work,
    this is error log from Webmin: System > System Logs > /var/log/maillog > View Logfile
    Code:
    Jan 29 10:11:13 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:18 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:18 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:23 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:23 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:28 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:28 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:33 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:33 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:38 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:38 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:43 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:43 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:48 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:48 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:53 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
    Jan 29 10:11:53 m5-fedora4-04 sendmail[1652]: daemon MTA: problem creating SMTP socket
    Jan 29 10:11:53 m5-fedora4-04 sendmail[1652]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting
    and www.dnsreport.com
    still says Mail Fail ERROR: I could not complete a connection to any of your mailservers!
     
  10. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    It might take up to 72 hours until the changes propagate.

    You seem to have Sendmail installed. The things I posted above are for Postfix... :confused: Now which Mail server is really installed on your system?

    Also, please post the output of
    Code:
    netstat -tap
     
  11. micko_escalade

    micko_escalade New Member

    Looks like I had sendmail and postfix both running at boot,
    so I stopped sendmail and now I get those errors
    Code:
    Jan 29 12:20:40 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/qmgr: bad command startup -- throttling
    Jan 29 12:20:54 m5-fedora4-04 postfix/smtpd[1885]: fatal: match_list_parse: open file /etc/postfix/local-host-names: No such file or directory
    Jan 29 12:20:55 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 1885 exit status 1
    Jan 29 12:20:55 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 12:21:40 m5-fedora4-04 postfix/pickup[1886]: fatal: match_list_parse: open file /etc/postfix/local-host-names: No such file or directory
    Jan 29 12:21:40 m5-fedora4-04 postfix/qmgr[1887]: fatal: match_list_parse: open file /etc/postfix/local-host-names: No such file or directory
    Jan 29 12:21:41 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/pickup pid 1886 exit status 1
    Jan 29 12:21:41 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
    Jan 29 12:21:41 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/qmgr pid 1887 exit status 1
    Jan 29 12:21:41 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/qmgr: bad command startup -- throttling
    Jan 29 12:21:55 m5-fedora4-04 postfix/smtpd[1888]: fatal: match_list_parse: open file /etc/postfix/local-host-names: No such file or directory
    Jan 29 12:21:56 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 1888 exit status 1
    Jan 29 12:21:56 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 12:22:41 m5-fedora4-04 postfix/pickup[1892]: fatal: match_list_parse: open file /etc/postfix/local-host-names: No such file or directory
    Jan 29 12:22:41 m5-fedora4-04 postfix/qmgr[1893]: fatal: match_list_parse: open file /etc/postfix/local-host-names: No such file or directory
    Jan 29 12:22:42 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/pickup pid 1892 exit status 1
    Jan 29 12:22:42 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/pickup: bad comm
     
  12. micko_escalade

    micko_escalade New Member

    Sorry about that you were faster :) now I have only postfix, sendmail is not running anymore,

    here's the netstat -tap screenshot
     
  13. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    First create /etc/postfix/local-host-names:
    Code:
    touch /etc/postfix/local-host-names
    Then post /etc/postfix/main.cf here.
     
  14. micko_escalade

    micko_escalade New Member

    Ok, local-host-names is created

    here's the attached main.cf
     

    Attached Files:

  15. micko_escalade

    micko_escalade New Member

    Here's my error log again if it can help solve my problem,
    Code:
    Jan 29 13:01:41 m5-fedora4-04 pop3-login: Login: user1 [67.171.7.xxx]
    Jan 29 13:02:35 m5-fedora4-04 postfix/smtpd[2198]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:02:36 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2198 exit status 1
    Jan 29 13:02:36 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:03:36 m5-fedora4-04 postfix/smtpd[2214]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:03:37 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2214 exit status 1
    Jan 29 13:03:37 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:04:37 m5-fedora4-04 postfix/smtpd[2239]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:04:38 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2239 exit status 1
    Jan 29 13:04:38 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:05:38 m5-fedora4-04 postfix/smtpd[2240]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:05:39 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2240 exit 
     
  16. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Does /etc/postfix/virtusertable exist? If so, run
    Code:
    postmap /etc/postfix/virtusertable
    and restart Postfix.

    Can you post your main.cf directly to this forum instead of as an attachment? This makes it easier for everyone to read it.:)
     
  17. micko_escalade

    micko_escalade New Member

    I tried that first time but then it gave error that it is too long
    No, it doesn't exist, this is what's in postfix folder screenshot

    but then like 10 minutes ago I rebooted VPS, and those errors are gone,
    Code:
    Jan 29 13:04:38 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2239 exit status 1
    Jan 29 13:04:38 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:05:38 m5-fedora4-04 postfix/smtpd[2240]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:05:39 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2240 exit status 1
    Jan 29 13:05:39 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:06:39 m5-fedora4-04 postfix/smtpd[2249]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:06:40 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2249 exit status 1
    Jan 29 13:06:40 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:07:40 m5-fedora4-04 postfix/smtpd[2250]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Jan 29 13:07:41 m5-fedora4-04 postfix/master[1625]: warning: process /usr/libexec/postfix/smtpd pid 2250 exit status 1
    Jan 29 13:07:41 m5-fedora4-04 postfix/master[1625]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jan 29 13:08:30 m5-fedora4-04 postfix/postfix-script: stopping the Postfix mail system
    Jan 29 13:08:30 m5-fedora4-04 postfix/master[1625]: terminating on signal 15
    Jan 29 13:08:31 m5-fedora4-04 dovecot: Killed with signal 15
    Jan 29 13:14:27 m5-fedora4-04 dovecot: Dovecot starting up
    Jan 29 13:14:29 m5-fedora4-04 postfix/postfix-script: starting the Postfix mail system
    Jan 29 13:14:29 m5-fedora4-04 postfix/master[1625]: daemon started -- version 2.2.2, configuration /etc/postfix
    Jan 29 13:23:58 m5-fedora4-04 pop3-login: Login: user1 [67.171.7.xxx]
    Jan 29 13:24:48 m5-fedora4-04 pop3-login: Login: user1 [67.171.7.xxx]
    Jan 29 13:26:00 m5-fedora4-04 last message repeated 2 times
    btw, falko I really appreciate your help!
     
  18. micko_escalade

    micko_escalade New Member

    Some additonal info,

    I followed instruction Testing Postfix
    here
    when I try to telnet from windows command prompt to my vps ip
    Code:
    telnet 207.210.228.XX 25
    I get no responde, but when I SSH to my vps using putty and use
    Code:
    telnet localhost 25
    I get welcome message
    Code:
    220 m5-fedora4-04.myxen.com ESMTP Postfix
    and I was able to send test email to yahoo account as instructed in above link
     
  19. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    If your vps is behind a router, you will have to forward port 25 to your vps.

    Otherwise i guess your provider blocks connections on port 25 or your windows or linux firewall blocks the connections.
     
  20. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Leave out all the comments in the file, then it should fit without problems.

    In the netstat output I saw that Postfix is listening only on localhost, so I guess you haven't set inet_interfaces to all in /etc/postfix/main.cf (that's why I asked for it). Please set
    Code:
    inet_interfaces = all
    in /etc/postfix/main.cf and restart Postfix.


    BTW, when I ask you for some output of some command, please post it as plain text here, not as screenshot. This makes it easier for us to see what is wrong.
     

Share This Page