PDA

View Full Version : [ubuntu] can't start postfix



said76
August 28th, 2012, 07:12 AM
Hi,

I was wondering if I could get some help here. I was trying to start postfix service by running the following code

$ /etc/init.d/postfix start
bash: /etc/init.d/postfix: /bin/bash^M: bad interpreter: No such file or directory

I wonder what I need to do to resolve the problem so that I can start postfix service using the start-up script.

Any help would be greatly appreciated.

Thank you

lisati
August 28th, 2012, 07:23 AM
What version of Ubuntu are you using?
In newer releases, the proper command is:

sudo start service postfix

steeldriver
August 28th, 2012, 07:25 AM
did you by any chance copy the postfix script from (or via) a Windows machine? The ^M code usually indicates a DOS-style (CR-LF) line termination

said76
August 28th, 2012, 07:57 AM
Thank you for your reply.

Sorry that I forgot to tell you my Ubuntu version. it's Ubuntu server 12-04 LTS.

I actually installed postfix from source so I use my own bash start-up script.

hmm. you got me thinking about ^M code. I'll double check again in my script. I use nano editor to edit it.

Thank you