I followed the tutorial here: https://help.ubuntu.com/community/PostfixCompleteVirtualMailSystemHowto#Create_a_vmail_user to set up Postfix on a new ubuntu installation but it won't start, whenever i try to start it with postfix start say: fatal: mail system startup failed

here is my error log: SYSERR(root): collect: Cannot write ./dfr2IIHHJB029721 (bfcommit, uid=0, gid=125): No such file or directory

and fatal: bind port 25: Address already in use And smtp is running on port 25, i checked. Please what should i do? I need to get this mail server up and runnning

3 Answers 3


See what's got that port open. In Linux:

$ sudo netstat -lnp |grep :25

You will see something like:

tcp        0      0    *               LISTEN      1624/master     
tcp6       0      0 :::25                   :::*                    LISTEN      1624/master  

In this case, 1624 is the process id (pid). So:

$ ps aux |grep 1624

root 1624 0.0 0.0 25160 1636 ? Ss Jul17 0:00 /usr/lib/postfix/master

You can kill or restart that process (or decide, heh, it's already running....).

  • I've checkd it, it's sendmail that's running on port 25: sendmail: MTA
    – samceena
    Commented Jul 18, 2013 at 18:54
  • Is that the Postfix MTA service or smtp, or which service is it? because postfix is trying to connect to this port, but this particular service is blocking postfix it from connecting to the port
    – samceena
    Commented Jul 18, 2013 at 18:57
  • Postfix has a sendmail compatibility interface, but that should not be interfering. Try stopping it and see if postfix will start.
    – xofer
    Commented Jul 18, 2013 at 19:39
  • Yeah I just stopped the sendmail and started postfix, and it started. But how do permanentely disable/uninstall it, and enable/install the postfix sendmail interface
    – samceena
    Commented Jul 18, 2013 at 20:20
  • In that case, as @Fox said, you should be safe to uninstall sendmail. If you prefer to leave it installed but prevent it from starting on boot: sudo update-rc.d -f sendmail remove
    – xofer
    Commented Jul 18, 2013 at 22:02

Normally, Postfix automatically disables Sendmail when it is installed. Sendmail is also a mail server, so there can't be two of them handling your emails on the same port.

Since Postfix automatically provides a sendmail compatibility program, your system and your users (eg. mail PHP function) can continue to call it, but you don't need the sendmail MTA anymore, since Postfix will do its job now.

I recommend you uninstall the Sendmail MTA to avoid problems :

apt-get remove sendmail

If you want to make sure which sendmail command do you have (the Postfix one, or the true sendmail), you can use following command:

user@linux:~# ldd /usr/sbin/sendmail
libpostfix-global.so.1 => /usr/lib/libpostfix-global.so.1 (0x00007f890e1b1000)
libpostfix-util.so.1 => /usr/lib/libpostfix-util.so.1 (0x00007f890df7b000)

If you see something like libpostfix, then you have the right sendmail program installed.

  • I just stopped sendmail for now: sudo /etc/init.d/sendmail stop
    – Jason
    Commented Sep 6, 2023 at 13:27

You can also run

lsof -Pni | grep LIST | grep ":25"

And than use 'ps' to check what is running there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .